发票
Showing
11 changed files
with
549 additions
and
37 deletions
| ... | @@ -134,5 +134,40 @@ export function cancelOrder2(orderId) { | ... | @@ -134,5 +134,40 @@ export function cancelOrder2(orderId) { |
| 134 | params: orderId | 134 | params: orderId |
| 135 | }) | 135 | }) |
| 136 | } | 136 | } |
| 137 | export function addressList(userId) { | ||
| 138 | return request({ | ||
| 139 | url: `/ota/invoiceInfo/list`, | ||
| 140 | method: 'get', | ||
| 141 | params: { | ||
| 142 | createById: userId | ||
| 143 | } | ||
| 144 | }) | ||
| 145 | } | ||
| 137 | 146 | ||
| 138 | 147 | export function submitInvoice(form) { | |
| 148 | return request({ | ||
| 149 | url: `/ota/invoice`, | ||
| 150 | method: 'post', | ||
| 151 | data: form | ||
| 152 | }) | ||
| 153 | } | ||
| 154 | export function editInvoice(form) { | ||
| 155 | return request({ | ||
| 156 | url: `/ota/invoice`, | ||
| 157 | method: 'put', | ||
| 158 | data: form | ||
| 159 | }) | ||
| 160 | } | ||
| 161 | export function addAddress(form) { | ||
| 162 | return request({ | ||
| 163 | url: `/ota/invoiceInfo`, | ||
| 164 | method: 'post', | ||
| 165 | data: form | ||
| 166 | }) | ||
| 167 | } | ||
| 168 | export function delAddress(ids) { | ||
| 169 | return request({ | ||
| 170 | url: `/ota/invoiceInfo/${ids}`, | ||
| 171 | method: 'delete' | ||
| 172 | }) | ||
| 173 | } | ... | ... |
| ... | @@ -426,6 +426,12 @@ export const constantRoutes = [ | ... | @@ -426,6 +426,12 @@ export const constantRoutes = [ |
| 426 | component: () => import('@/viewsPc/booking/invoicing'), | 426 | component: () => import('@/viewsPc/booking/invoicing'), |
| 427 | name: 'invoice', | 427 | name: 'invoice', |
| 428 | meta: { title: '我的发票' } | 428 | meta: { title: '我的发票' } |
| 429 | }, | ||
| 430 | { | ||
| 431 | path: 'addInvoice/:id', | ||
| 432 | component: () => import('@/viewsPc/booking/addInvoice'), | ||
| 433 | name: 'addInvoice', | ||
| 434 | meta: { title: '编辑发票' } | ||
| 429 | } | 435 | } |
| 430 | ] | 436 | ] |
| 431 | }, | 437 | }, | ... | ... |
| ... | @@ -84,7 +84,11 @@ function goAdd() { | ... | @@ -84,7 +84,11 @@ function goAdd() { |
| 84 | } | 84 | } |
| 85 | function getChoosed(list) { | 85 | function getChoosed(list) { |
| 86 | console.log(list) | 86 | console.log(list) |
| 87 | if(list.length>0){ | ||
| 88 | // 去开票 | ||
| 89 | } | ||
| 87 | } | 90 | } |
| 91 | |||
| 88 | </script> | 92 | </script> |
| 89 | 93 | ||
| 90 | <style scoped lang="scss"> | 94 | <style scoped lang="scss"> | ... | ... |
src/viewsPc/booking/addInvoice.vue
0 → 100644
| 1 | <template> | ||
| 2 | <div> | ||
| 3 | <div class="box"> | ||
| 4 | <el-card :body-style="{ padding: '0px' }" class="mt20"> | ||
| 5 | <div slot="header"> | ||
| 6 | <div class="bg-lineg">{{ language == 0 ? '发票开具' : 'Invoice application' }}</div> | ||
| 7 | </div> | ||
| 8 | <el-row class="pd20" :gutter="20"> | ||
| 9 | <el-col :span="24"> | ||
| 10 | <!--已选订单--> | ||
| 11 | <div class="border-info" v-for="b in list" :key="b.id"> | ||
| 12 | <h3>{{ b.name }}</h3> | ||
| 13 | <!-- 酒店订单--> | ||
| 14 | <div v-if="b.orderType == 0"> | ||
| 15 | <p>{{b.messageObj.roomInfo}}</p> | ||
| 16 | <p>{{b.messageObj.roomStayDate}}</p> | ||
| 17 | <p class="poPrice">¥{{b.total}}</p> | ||
| 18 | </div> | ||
| 19 | <!-- 接送订单--> | ||
| 20 | <div v-if="b.orderType == 1"> | ||
| 21 | <p v-for="(car,index) in b.messageObj.carsList" :key="index" v-show="car.num>0"> | ||
| 22 | <span>{{car.name}}:{{car.num}} 辆</span> | ||
| 23 | </p> | ||
| 24 | <p class="poPrice">¥{{b.total}}</p> | ||
| 25 | </div> | ||
| 26 | <!-- 餐饮订单--> | ||
| 27 | <div v-if="b.orderType == 2"> | ||
| 28 | <p v-for="(n,index) in b.messageObj.foodsList" :key="index"> | ||
| 29 | <span v-if="n.num > 0"> | ||
| 30 | {{n.name}}({{n.categoryName}}) <span>{{n.num}} 份</span> | ||
| 31 | </span> | ||
| 32 | </p> | ||
| 33 | <p class="poPrice">¥{{b.total}}</p> | ||
| 34 | </div> | ||
| 35 | </div> | ||
| 36 | |||
| 37 | <div class="leftboderTT">{{ language == 0 ? '开票信息' : 'Invoice information' }}</div> | ||
| 38 | <div class="border-rr mt20 pd20"> | ||
| 39 | <el-form class="mw500" :model="form" :label-width="language == 0 ?'100':'150'" :rules="rules" ref="formRef"> | ||
| 40 | <el-form-item :label="'开票金额'"> | ||
| 41 | <span class="bigprice">¥{{totalMoney}}</span> | ||
| 42 | </el-form-item> | ||
| 43 | |||
| 44 | <el-form-item :label="`发票形式`" required> | ||
| 45 | <el-radio-group v-model="form.invoiceForm"> | ||
| 46 | <el-radio value="1">{{ language == 0 ? '电子发票' : 'E-invoice' }}</el-radio> | ||
| 47 | <el-radio value="2">{{ language == 0 ? '纸质普票' : 'Paper-invoice' }}</el-radio> | ||
| 48 | <el-radio value="3">{{ language == 0 ? '纸质专票' : 'Paper-special-invoice' }}</el-radio> | ||
| 49 | </el-radio-group> | ||
| 50 | </el-form-item> | ||
| 51 | <el-form-item :label="`邮箱`" required> | ||
| 52 | <el-input v-model="form.contacts"/> | ||
| 53 | </el-form-item> | ||
| 54 | <el-form-item :label="`邮寄地址`" required> | ||
| 55 | <el-button plain type="primary" size="small" v-if="addrList.length==0" @click="goEditAddress"> | ||
| 56 | +{{ language==0?'添加地址':'Add' }} | ||
| 57 | </el-button> | ||
| 58 | <div v-else class="flexCenter"> | ||
| 59 | <div> | ||
| 60 | <div class="bigSize">{{nowAddress.contact}} {{nowAddress.phone}}</div> | ||
| 61 | <div class="smallSize">{{nowAddress.addName}}</div> | ||
| 62 | </div> | ||
| 63 | <a @click="goEditAddress" class="text-primary"> | ||
| 64 | <el-icon><Switch /></el-icon>切换 | ||
| 65 | </a> | ||
| 66 | </div> | ||
| 67 | </el-form-item> | ||
| 68 | <el-form-item :label="`发票类型`" required> | ||
| 69 | <el-radio-group v-model="form.invoiceType"> | ||
| 70 | <el-radio value="0">{{ language == 0 ? '企业' : 'Company' }}</el-radio> | ||
| 71 | <el-radio value="1">{{ language == 0 ? '个人非企业' : 'Individual' }}</el-radio> | ||
| 72 | </el-radio-group> | ||
| 73 | </el-form-item> | ||
| 74 | <el-form-item :label="`发票抬头`" required> | ||
| 75 | <el-input v-model="form.invoiceTitle"/> | ||
| 76 | </el-form-item> | ||
| 77 | <el-form-item :label="`税号`" required v-if="form.invoiceType=='0'"> | ||
| 78 | <el-input v-model="form.invoiceTfn"/> | ||
| 79 | </el-form-item> | ||
| 80 | <div v-if="form.invoiceForm=='3'&&form.invoiceType=='0'"> | ||
| 81 | <el-form-item :label="`地址`" required> | ||
| 82 | <el-input v-model="form.invoiceAddress"/> | ||
| 83 | </el-form-item> | ||
| 84 | <el-form-item :label="`电话`" required> | ||
| 85 | <el-input v-model="form.invoicePhone"/> | ||
| 86 | </el-form-item> | ||
| 87 | <el-form-item :label="`开户行`" required> | ||
| 88 | <el-input v-model="form.invoiceBank"/> | ||
| 89 | </el-form-item> | ||
| 90 | <el-form-item :label="`账户`" required> | ||
| 91 | <el-input v-model="form.invoiceAccount"/> | ||
| 92 | </el-form-item> | ||
| 93 | </div> | ||
| 94 | </el-form> | ||
| 95 | </div> | ||
| 96 | </el-col> | ||
| 97 | </el-row> | ||
| 98 | |||
| 99 | <el-row justify="center" align="middle" class="pd20"> | ||
| 100 | <el-col :span="12" class="text-center"> | ||
| 101 | <el-button type="primary" class="btn-lineG w200px" size="large" round @click="submit"> | ||
| 102 | {{ language==0?'提交':'Submit' }} | ||
| 103 | </el-button> | ||
| 104 | </el-col> | ||
| 105 | </el-row> | ||
| 106 | </el-card> | ||
| 107 | <div style="height: 60px;"></div> | ||
| 108 | |||
| 109 | </div> | ||
| 110 | </div> | ||
| 111 | <address-list-dialog ref="dialogAddressListRef" @submit="getAddress"/> | ||
| 112 | </template> | ||
| 113 | |||
| 114 | <script setup> | ||
| 115 | import {useRouter, useRoute} from "vue-router"; | ||
| 116 | import {ref, reactive, onMounted} from "vue"; | ||
| 117 | import {useStorage} from "@vueuse/core/index"; | ||
| 118 | import AddressListDialog from "./component/addressList" | ||
| 119 | import dayjs from 'dayjs' | ||
| 120 | import {ElMessage,ElMessageBox} from "element-plus"; | ||
| 121 | import useUserStore from "@/store/modules/user"; | ||
| 122 | import {getCurrentInstance} from "@vue/runtime-core"; | ||
| 123 | import {addressList, editInvoice, submitInvoice} from "@/apiPc/booking"; | ||
| 124 | const {proxy} = getCurrentInstance() | ||
| 125 | |||
| 126 | const user = useUserStore().user | ||
| 127 | const language = useStorage('language', 0) | ||
| 128 | const router = useRouter() | ||
| 129 | const route = useRoute() | ||
| 130 | const form = ref({ | ||
| 131 | invoiceForm: '1', | ||
| 132 | invoiceType: '0' | ||
| 133 | }) | ||
| 134 | const list = ref([]) | ||
| 135 | const addrList = ref([]) | ||
| 136 | const nowAddress = ref({}) | ||
| 137 | const totalMoney = ref(0) | ||
| 138 | const choseDays = ref([]) | ||
| 139 | const rules = ref({}) | ||
| 140 | const isEdit = ref(false) | ||
| 141 | |||
| 142 | onMounted(() => { | ||
| 143 | if(route.query.orders){ | ||
| 144 | list.value = JSON.parse(decodeURIComponent(route.query.orders)) || [] | ||
| 145 | } | ||
| 146 | if (route.query.totalMoney) { | ||
| 147 | totalMoney.value = route.query.totalMoney | ||
| 148 | } | ||
| 149 | getAddrList() | ||
| 150 | }) | ||
| 151 | function goEditAddress(id) { | ||
| 152 | var obj = { | ||
| 153 | title: language.value==0?'地址列表':'Address list', | ||
| 154 | show: true, | ||
| 155 | id: id | ||
| 156 | } | ||
| 157 | proxy.$refs['dialogAddressListRef'].open(obj) | ||
| 158 | } | ||
| 159 | function getAddrList() { | ||
| 160 | addressList(user.userId).then(res=>{ | ||
| 161 | addrList.value = res.rows | ||
| 162 | if(addrList.value.length>0){ | ||
| 163 | nowAddress.value = addrList.value[0] | ||
| 164 | } | ||
| 165 | }) | ||
| 166 | } | ||
| 167 | function getAddress(obj) { | ||
| 168 | console.log(obj) | ||
| 169 | nowAddress.value = obj | ||
| 170 | console.log(nowAddress.value) | ||
| 171 | } | ||
| 172 | function submit() { | ||
| 173 | if(!user){ | ||
| 174 | useUserStore().setReLogin() | ||
| 175 | return | ||
| 176 | } | ||
| 177 | |||
| 178 | // 提交确认 | ||
| 179 | ElMessageBox.confirm(language.value == 0 ? '确认提交订单吗?' : 'Confirm to submit the order?', { | ||
| 180 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', | ||
| 181 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | ||
| 182 | type: 'warning' | ||
| 183 | }).then(() => { | ||
| 184 | form.value.total = totalMoney.value | ||
| 185 | form.value.version = 2 | ||
| 186 | if (isEdit.value) { | ||
| 187 | update() | ||
| 188 | } else { | ||
| 189 | add() | ||
| 190 | } | ||
| 191 | }) | ||
| 192 | } | ||
| 193 | |||
| 194 | function update() { | ||
| 195 | editInvoice(form.value).then(res=>{ | ||
| 196 | //返回列表 | ||
| 197 | backList() | ||
| 198 | }) | ||
| 199 | } | ||
| 200 | function add() { | ||
| 201 | submitInvoice(form.value).then(res=>{ | ||
| 202 | //返回列表 | ||
| 203 | backList() | ||
| 204 | }) | ||
| 205 | } | ||
| 206 | function backList() { | ||
| 207 | router.push({ | ||
| 208 | name: 'invoice' | ||
| 209 | }) | ||
| 210 | } | ||
| 211 | </script> | ||
| 212 | |||
| 213 | <style scoped lang="scss"> | ||
| 214 | .bigMoney { | ||
| 215 | font-size: 36px !important; | ||
| 216 | font-family: 'DIN Alternate'; | ||
| 217 | font-weight: bold; | ||
| 218 | } | ||
| 219 | .btn-lineG{font-size: 16px} | ||
| 220 | .bg-lineg { | ||
| 221 | height: 40px; | ||
| 222 | line-height: 40px; | ||
| 223 | font-size: 18px; | ||
| 224 | text-align: center; | ||
| 225 | } | ||
| 226 | |||
| 227 | .leftboderTT { | ||
| 228 | font-weight: 600; | ||
| 229 | font-size: 16px; | ||
| 230 | color: #453DEA; | ||
| 231 | } | ||
| 232 | |||
| 233 | .border-rr { | ||
| 234 | border-radius: 5px; | ||
| 235 | border: 1px solid #DCDFE6; | ||
| 236 | } | ||
| 237 | |||
| 238 | .room { | ||
| 239 | font-weight: 400; | ||
| 240 | font-size: 14px; | ||
| 241 | color: #929AA0; | ||
| 242 | } | ||
| 243 | |||
| 244 | .ccitemBox { | ||
| 245 | overflow: auto; | ||
| 246 | |||
| 247 | label { | ||
| 248 | margin: 10px 0; | ||
| 249 | display: block; | ||
| 250 | min-height: 30px; | ||
| 251 | |||
| 252 | span { | ||
| 253 | color: #FF8124; | ||
| 254 | font-family: DIN Alternate; | ||
| 255 | font-size: 24px; | ||
| 256 | } | ||
| 257 | } | ||
| 258 | } | ||
| 259 | |||
| 260 | .ccitem { | ||
| 261 | display: flex; | ||
| 262 | justify-content: space-between; | ||
| 263 | font-size: 15px; | ||
| 264 | color: #666; | ||
| 265 | margin: 5px 0 10px; | ||
| 266 | |||
| 267 | label { | ||
| 268 | font-size: 16px; | ||
| 269 | color: #000; | ||
| 270 | } | ||
| 271 | |||
| 272 | span { | ||
| 273 | font-size: 13px; | ||
| 274 | } | ||
| 275 | } | ||
| 276 | |||
| 277 | .red { | ||
| 278 | color: #FF8124; | ||
| 279 | } | ||
| 280 | .tip{font-size: 14px;color: #666;padding: 0 10px;} | ||
| 281 | .mw500{max-width: 500px;margin: auto} | ||
| 282 | .bigSize { | ||
| 283 | font-size: 16px; | ||
| 284 | margin-bottom: 5px; | ||
| 285 | } | ||
| 286 | |||
| 287 | .smallSize { | ||
| 288 | font-size: 14px; | ||
| 289 | color: #999; | ||
| 290 | } | ||
| 291 | |||
| 292 | .flexCenter { | ||
| 293 | display: flex; | ||
| 294 | width: 100%; | ||
| 295 | align-items: center; | ||
| 296 | justify-content: space-between; | ||
| 297 | background: #f4f4f4; | ||
| 298 | padding: 10px; | ||
| 299 | box-sizing: border-box; | ||
| 300 | } | ||
| 301 | .bigprice { | ||
| 302 | font-size: 20px; | ||
| 303 | line-height: 2; | ||
| 304 | } | ||
| 305 | </style> |
| 1 | <template> | ||
| 2 | <el-dialog v-model="show" :title="title" width="1000px" append-to-body> | ||
| 3 | <el-button @click="add" type="primary" plain class="mb20"> | ||
| 4 | {{language==0?'新建':'Add'}} | ||
| 5 | </el-button> | ||
| 6 | <el-table height="50vh" ref="allBills" :data="tableData" v-loading="loading"> | ||
| 7 | <el-table-column prop="contact" :label="language==0?'联系人':'Contact'" min-width="100px"> | ||
| 8 | <template #default="scope"> | ||
| 9 | <div v-if="scope.row.id">{{scope.row.contact}}</div> | ||
| 10 | <el-input v-else v-model="scope.row.contact"/> | ||
| 11 | </template> | ||
| 12 | </el-table-column> | ||
| 13 | <el-table-column prop="phone" :label="language==0?'联系电话':'Phone'" min-width="120px"> | ||
| 14 | <template #default="scope"> | ||
| 15 | <div v-if="scope.row.id">{{scope.row.phone}}</div> | ||
| 16 | <el-input v-else v-model="scope.row.phone"/> | ||
| 17 | </template> | ||
| 18 | </el-table-column> | ||
| 19 | <el-table-column prop="id" :label="language==0?'地区':'Detail'" min-width="150px"> | ||
| 20 | <template #default="scope"> | ||
| 21 | <div v-if="scope.row.id">{{scope.row.provinceName}}{{scope.row.cityName}}{{scope.row.areaName}}</div> | ||
| 22 | <el-cascader v-else v-model="scope.row.regionArr" style="width: 100%;" :options="regionsList" | ||
| 23 | :props="{ label:'text' }" @change="changeRegion" | ||
| 24 | /> | ||
| 25 | </template> | ||
| 26 | </el-table-column> | ||
| 27 | <el-table-column prop="address" :label="language==0?'详细地址':'Address'" min-width="150px"> | ||
| 28 | <template #default="scope"> | ||
| 29 | <div v-if="scope.row.id">{{scope.row.address}}</div> | ||
| 30 | <el-input v-else type="textarea" rows="1" v-model="scope.row.address"/> | ||
| 31 | </template> | ||
| 32 | </el-table-column> | ||
| 33 | <el-table-column prop="total" :label="language==0?'操作':'Operation'" fixed="right" align="center" width="100"> | ||
| 34 | <template #default="scope"> | ||
| 35 | <div v-if="scope.row.id"> | ||
| 36 | <a class="text-primary mr10" @click="del(scope.row.id)">{{language==0?'删除':'Delete'}}</a> | ||
| 37 | <!-- <el-button text type="primary" @click="edit(scope.row.id)">{{language==0?'编辑':'Edit'}}</el-button>--> | ||
| 38 | <a class="text-primary" @click="choose(scope.row)">{{language==0?'选择':'Choose'}}</a> | ||
| 39 | </div> | ||
| 40 | <div v-else> | ||
| 41 | <a class="text-primary mr10" @click="save(scope.row)">{{language==0?'保存':'Save'}}</a> | ||
| 42 | <a class="text-primary" @click="saveCancel(scope.row.id)">{{language==0?'取消':'Cancel'}}</a> | ||
| 43 | </div> | ||
| 44 | </template> | ||
| 45 | </el-table-column> | ||
| 46 | </el-table> | ||
| 47 | <paginationPc | ||
| 48 | v-show="total>0" | ||
| 49 | v-model:page="query.pageNum" | ||
| 50 | v-model:limit="query.pageSize" | ||
| 51 | :total="total" | ||
| 52 | @pagination="getList" | ||
| 53 | /> | ||
| 54 | </el-dialog> | ||
| 55 | </template> | ||
| 56 | |||
| 57 | <script setup> | ||
| 58 | import {reactive, ref, toRefs, watch} from 'vue' | ||
| 59 | import {getCurrentInstance} from "@vue/runtime-core"; | ||
| 60 | import {useStorage} from "@vueuse/core/index"; | ||
| 61 | import {addAddress, addressList, delAddress, getCanInvoiceBills} from "@/apiPc/booking"; | ||
| 62 | import {ElMessage, ElMessageBox} from "element-plus"; | ||
| 63 | import useUserStore from "@/store/modules/user"; | ||
| 64 | import * as match from "@/apiPc/match"; | ||
| 65 | const {proxy} = getCurrentInstance() | ||
| 66 | const emit = defineEmits([ 'submit']) | ||
| 67 | const language= useStorage('language',0) | ||
| 68 | const user = useUserStore().user | ||
| 69 | const data = reactive({ | ||
| 70 | tableData: [], | ||
| 71 | regionsList:[], | ||
| 72 | show: false, | ||
| 73 | loading: false, | ||
| 74 | title: '', | ||
| 75 | query:{ | ||
| 76 | status:1 | ||
| 77 | }, | ||
| 78 | total:0 | ||
| 79 | }) | ||
| 80 | const { tableData,regionsList,show,loading,title,query,total} = toRefs(data) | ||
| 81 | |||
| 82 | const open = (params) => { | ||
| 83 | title.value = params.title | ||
| 84 | show.value = true | ||
| 85 | if(params.id == '0'){ | ||
| 86 | // 新建 | ||
| 87 | |||
| 88 | } else { | ||
| 89 | getList() | ||
| 90 | } | ||
| 91 | getRegionsList() | ||
| 92 | } | ||
| 93 | defineExpose({ | ||
| 94 | open | ||
| 95 | }) | ||
| 96 | const getList = () => { | ||
| 97 | loading.value = true | ||
| 98 | addressList(user.userId).then(res=>{ | ||
| 99 | loading.value = false | ||
| 100 | tableData.value = res.rows | ||
| 101 | }) | ||
| 102 | } | ||
| 103 | function getRegionsList() { | ||
| 104 | match.regionsList().then(res => { | ||
| 105 | regionsList.value = res.data | ||
| 106 | }) | ||
| 107 | } | ||
| 108 | const changeRegion = (val) => { | ||
| 109 | console.log(val) | ||
| 110 | } | ||
| 111 | const save = (row) => { | ||
| 112 | console.log(row) | ||
| 113 | row.province = row.regionArr[0] | ||
| 114 | row.city = row.regionArr[1]||'' | ||
| 115 | row.area = row.regionArr[2]||'' | ||
| 116 | addAddress(row).then(res=>{ | ||
| 117 | ElMessage.success('保存成功') | ||
| 118 | getList() | ||
| 119 | }) | ||
| 120 | } | ||
| 121 | const choose = (row) => { | ||
| 122 | emit('submit',row) | ||
| 123 | show.value = false | ||
| 124 | } | ||
| 125 | const add = () => { | ||
| 126 | tableData.value.push({}) | ||
| 127 | } | ||
| 128 | const edit = (row) => { | ||
| 129 | |||
| 130 | } | ||
| 131 | const del = (row) => { | ||
| 132 | ElMessageBox.confirm('确认删除?').then(() => { | ||
| 133 | delAddress(row.id).then(res=>{ | ||
| 134 | ElMessage.success('删除成功') | ||
| 135 | getList() | ||
| 136 | }) | ||
| 137 | }) | ||
| 138 | } | ||
| 139 | const saveCancel = (row) => { | ||
| 140 | //删除最后一条 | ||
| 141 | getList() | ||
| 142 | } | ||
| 143 | </script> | ||
| 144 | |||
| 145 | <style scoped lang="scss"> | ||
| 146 | |||
| 147 | </style> |
| ... | @@ -68,8 +68,8 @@ const props = defineProps({ | ... | @@ -68,8 +68,8 @@ const props = defineProps({ |
| 68 | }) | 68 | }) |
| 69 | const language= useStorage('language',0) | 69 | const language= useStorage('language',0) |
| 70 | function goBooking(n) { | 70 | function goBooking(n) { |
| 71 | ElMessage.warning(language.value==0?'建设中,敬请期待':'Building!') | 71 | // ElMessage.warning(language.value==0?'建设中,敬请期待':'Building!') |
| 72 | return | 72 | // return |
| 73 | switch (n) { | 73 | switch (n) { |
| 74 | case 0: | 74 | case 0: |
| 75 | // 票务 | 75 | // 票务 | ... | ... |
| ... | @@ -83,6 +83,9 @@ function init(){ | ... | @@ -83,6 +83,9 @@ function init(){ |
| 83 | getWeather().then(res=>{ | 83 | getWeather().then(res=>{ |
| 84 | weatherObj.value = JSON.parse(res.data).data | 84 | weatherObj.value = JSON.parse(res.data).data |
| 85 | console.log(weatherObj.value) | 85 | console.log(weatherObj.value) |
| 86 | }).catch(err=>{ | ||
| 87 | console.log(err) | ||
| 88 | showgg.value = false | ||
| 86 | }) | 89 | }) |
| 87 | } | 90 | } |
| 88 | const popWeather = () => { | 91 | const popWeather = () => { | ... | ... |
| ... | @@ -5,7 +5,7 @@ | ... | @@ -5,7 +5,7 @@ |
| 5 | destroy-on-close | 5 | destroy-on-close |
| 6 | > | 6 | > |
| 7 | <!-- 国际赛事随行人员--> | 7 | <!-- 国际赛事随行人员--> |
| 8 | <el-form ref="dialogRef" :model="form" :rules="language==0?rules:rules_cn" label-width="140px" | 8 | <el-form ref="dialogRef" :model="form" :rules="language==0?rules_cn:rules" label-width="140px" |
| 9 | > | 9 | > |
| 10 | <el-row :gutter="30" class="mt30"> | 10 | <el-row :gutter="30" class="mt30"> |
| 11 | <el-col :lg="12" class="touxiang"> | 11 | <el-col :lg="12" class="touxiang"> |
| ... | @@ -165,10 +165,10 @@ const data = reactive({ | ... | @@ -165,10 +165,10 @@ const data = reactive({ |
| 165 | // countryId: 240, | 165 | // countryId: 240, |
| 166 | // sex: '0' | 166 | // sex: '0' |
| 167 | }, | 167 | }, |
| 168 | rules: { | 168 | rules_cn: { |
| 169 | // xing: [{required: true, message: '必填', trigger: 'blur'}], | 169 | xing: [{required: true, message: '必填', trigger: 'blur'}], |
| 170 | ming: [{required: true, message: '必填', trigger: 'blur'}], | 170 | ming: [{required: true, message: '必填', trigger: 'blur'}], |
| 171 | // countryId: [{required: true, message: '必填', trigger: 'change'}], | 171 | countryId: [{required: true, message: '必填', trigger: 'change'}], |
| 172 | // idcType: [{required: true, message: '必填', trigger: 'change'}], | 172 | // idcType: [{required: true, message: '必填', trigger: 'change'}], |
| 173 | // idcCode: [{required: true, message: '必填', trigger: 'blur'}], | 173 | // idcCode: [{required: true, message: '必填', trigger: 'blur'}], |
| 174 | // phone: [{required: true, message: '必填', trigger: 'blur'}], | 174 | // phone: [{required: true, message: '必填', trigger: 'blur'}], |
| ... | @@ -179,8 +179,8 @@ const data = reactive({ | ... | @@ -179,8 +179,8 @@ const data = reactive({ |
| 179 | sex: [{required: true, message: '必填', trigger: 'change'}], | 179 | sex: [{required: true, message: '必填', trigger: 'change'}], |
| 180 | labelArr: [{required: true, message: '必填', trigger: 'change'}] | 180 | labelArr: [{required: true, message: '必填', trigger: 'change'}] |
| 181 | }, | 181 | }, |
| 182 | rules_cn: { | 182 | rules: { |
| 183 | // xing: [{required: true, message: 'required', trigger: 'blur'}], | 183 | xing: [{required: true, message: 'required', trigger: 'blur'}], |
| 184 | ming: [{required: true, message: 'required', trigger: 'blur'}], | 184 | ming: [{required: true, message: 'required', trigger: 'blur'}], |
| 185 | countryId: [{required: true, message: 'required', trigger: 'change'}], | 185 | countryId: [{required: true, message: 'required', trigger: 'change'}], |
| 186 | // idcType: [{required: true, message: 'required', trigger: 'change'}], | 186 | // idcType: [{required: true, message: 'required', trigger: 'change'}], |
| ... | @@ -368,7 +368,7 @@ function giveBirthDay() { | ... | @@ -368,7 +368,7 @@ function giveBirthDay() { |
| 368 | // 判断身份证正确性/赋值生日 | 368 | // 判断身份证正确性/赋值生日 |
| 369 | if (form.value.idcType == '0') { | 369 | if (form.value.idcType == '0') { |
| 370 | if (!(/(^\d{15}$)|(^\d{17}([0-9]|X)$)/.test(form.value.idcCode))) { | 370 | if (!(/(^\d{15}$)|(^\d{17}([0-9]|X)$)/.test(form.value.idcCode))) { |
| 371 | ElMessage.warning('请输入正确的身份证号码') | 371 | ElMessage.warning(language.value == 0 ? '请输入正确的身份证号码' :'Please enter the correct Resident ID card') |
| 372 | } else { | 372 | } else { |
| 373 | let tmpStr = '' | 373 | let tmpStr = '' |
| 374 | if (form.value.idcCode.length == 15) { | 374 | if (form.value.idcCode.length == 15) { | ... | ... |
| ... | @@ -224,8 +224,8 @@ const submitForm = (n) => { | ... | @@ -224,8 +224,8 @@ const submitForm = (n) => { |
| 224 | }) | 224 | }) |
| 225 | return | 225 | return |
| 226 | } | 226 | } |
| 227 | ElMessageBox.confirm(language.value == 0 ? '确定提交吗?' : 'Are you sure to submit?', | 227 | ElMessageBox.confirm(language.value == 0 ? '请谨慎提交!请务必确保所有成员全部报名后,一次性提交。提交后不可修改!' : 'Please be cautious! Please make sure that all members have signed up ,it cannot be modified after submission!', |
| 228 | language.value == 0 ? '提示' : 'Tip', | 228 | language.value == 0 ? '注意' : 'Note', |
| 229 | { | 229 | { |
| 230 | confirmButtonText: language.value == 0 ? '确定' : 'Yes', | 230 | confirmButtonText: language.value == 0 ? '确定' : 'Yes', |
| 231 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | 231 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | ... | ... |
| ... | @@ -11,20 +11,20 @@ | ... | @@ -11,20 +11,20 @@ |
| 11 | <!-- <el-tab-pane v-for="(tab,index) in list" :key="index" :label="tab.name" :name="index" />--> | 11 | <!-- <el-tab-pane v-for="(tab,index) in list" :key="index" :label="tab.name" :name="index" />--> |
| 12 | <!-- </el-tabs>--> | 12 | <!-- </el-tabs>--> |
| 13 | <div class="pd20"> | 13 | <div class="pd20"> |
| 14 | <el-row class="mb20"> | 14 | <!-- <el-row class="mb20">--> |
| 15 | <el-col :lg="24" :xs="24"> | 15 | <!-- <el-col :lg="24" :xs="24">--> |
| 16 | <div v-for="(n,index) in newsList?.slice(0,1)" v-show="index<1" :key="index" class="firstItem" @click="goDetail(n)"> | 16 | <!-- <div v-for="(n,index) in newsList?.slice(0,1)" v-show="index<1" :key="index" class="firstItem" @click="goDetail(n)">--> |
| 17 | <div class="date"> | 17 | <!-- <div class="date">--> |
| 18 | <p>{{ n.belongTime }}</p> | 18 | <!-- <p>{{ n.belongTime }}</p>--> |
| 19 | </div> | 19 | <!-- </div>--> |
| 20 | <div class="item-body"> | 20 | <!-- <div class="item-body">--> |
| 21 | <h3 class="esp_2"> | 21 | <!-- <h3 class="esp_2">--> |
| 22 | <span class="istop" v-if="n.isTop == '1'">{{ language==0?'置顶':'TOP' }}</span> | 22 | <!-- <span class="istop" v-if="n.isTop == '1'">{{ language==0?'置顶':'TOP' }}</span>--> |
| 23 | {{n.name}}</h3> | 23 | <!-- {{n.name}}</h3>--> |
| 24 | </div> | 24 | <!-- </div>--> |
| 25 | <a class="go">{{ language==0?'查看详情':'DETAIL' }} ⇀</a> | 25 | <!-- <a class="go">{{ language==0?'查看详情':'DETAIL' }} ⇀</a>--> |
| 26 | </div> | 26 | <!-- </div>--> |
| 27 | </el-col> | 27 | <!-- </el-col>--> |
| 28 | <!-- <el-col :lg="8" :xs="24" class="forPc">--> | 28 | <!-- <el-col :lg="8" :xs="24" class="forPc">--> |
| 29 | <!-- <div class="searchPark">--> | 29 | <!-- <div class="searchPark">--> |
| 30 | <!-- <h3>通知搜索</h3>--> | 30 | <!-- <h3>通知搜索</h3>--> |
| ... | @@ -56,12 +56,22 @@ | ... | @@ -56,12 +56,22 @@ |
| 56 | <!-- </el-form>--> | 56 | <!-- </el-form>--> |
| 57 | <!-- </div>--> | 57 | <!-- </div>--> |
| 58 | <!-- </el-col>--> | 58 | <!-- </el-col>--> |
| 59 | </el-row> | 59 | <!-- </el-row>--> |
| 60 | |||
| 61 | <div class="newsLine"> | ||
| 62 | 60 | ||
| 61 | <div class="newsLine" v-for="(n,index) in newsList" :key="index"> | ||
| 62 | <div v-if="n.isTop == '1'" class="firstItem" @click="goDetail(n)"> | ||
| 63 | <div class="date"> | ||
| 64 | <p>{{ n.belongTime }}</p> | ||
| 65 | </div> | ||
| 66 | <div class="item-body"> | ||
| 67 | <h3 class="esp_2"> | ||
| 68 | <span class="istop" v-if="n.isTop == '1'">{{ language==0?'置顶':'TOP' }}</span> | ||
| 69 | {{n.name}}</h3> | ||
| 70 | </div> | ||
| 71 | <a class="go">{{ language==0?'查看详情':'DETAIL' }} ⇀</a> | ||
| 72 | </div> | ||
| 63 | 73 | ||
| 64 | <div v-for="(n,index) in newsList" v-show="index>0" :key="index" class="item" @click=" goDetail(n)"> | 74 | <div v-else class="item" @click=" goDetail(n)"> |
| 65 | <div class="date"> | 75 | <div class="date"> |
| 66 | <div class="day">{{ n.belongTime?.substring(8, 10) }}</div> | 76 | <div class="day">{{ n.belongTime?.substring(8, 10) }}</div> |
| 67 | <p>{{ n.belongTime?.substring(0, 7).replace(/-/g, '/') }}</p> | 77 | <p>{{ n.belongTime?.substring(0, 7).replace(/-/g, '/') }}</p> |
| ... | @@ -145,15 +155,17 @@ const goDetail = (n) => { | ... | @@ -145,15 +155,17 @@ const goDetail = (n) => { |
| 145 | background: #F8F4FF;height: 100%;padding: 10px 20px; | 155 | background: #F8F4FF;height: 100%;padding: 10px 20px; |
| 146 | .date{font-weight: bold;transform: scaleX(0.7);transform-origin: left; | 156 | .date{font-weight: bold;transform: scaleX(0.7);transform-origin: left; |
| 147 | font-size: 18px; | 157 | font-size: 18px; |
| 148 | color: var(--el-color-primary);} | 158 | color: var(--el-color-primary); |
| 159 | p{margin: 5px 0;} | ||
| 160 | } | ||
| 149 | h3{margin: 10px 0; | 161 | h3{margin: 10px 0; |
| 150 | font-size: 22px;} | 162 | font-size: 22px;} |
| 151 | .go{color: var(--el-color-primary); | 163 | .go{color: var(--el-color-primary); |
| 152 | font-size: 14px;padding: 0 0 5px;} | 164 | font-size: 14px;padding: 0 0 5px;} |
| 165 | &:hover{background: linear-gradient(90deg, #8623fc3d, #453dea36);} | ||
| 153 | } | 166 | } |
| 154 | |||
| 155 | |||
| 156 | .newsLine{ | 167 | .newsLine{ |
| 168 | .firstItem{margin-bottom: 10px;} | ||
| 157 | .item{display: flex;position: relative;width: 100%;height: 90px; | 169 | .item{display: flex;position: relative;width: 100%;height: 90px; |
| 158 | align-items: center;cursor: pointer;border-bottom: 1px dashed #EEEEEE; | 170 | align-items: center;cursor: pointer;border-bottom: 1px dashed #EEEEEE; |
| 159 | .date{width: 60px;height: 60px;text-align: center;background: #FAFAFA;margin: 0 10px; | 171 | .date{width: 60px;height: 60px;text-align: center;background: #FAFAFA;margin: 0 10px; | ... | ... |
| ... | @@ -70,19 +70,19 @@ export default defineConfig(({ mode, command }) => { | ... | @@ -70,19 +70,19 @@ export default defineConfig(({ mode, command }) => { |
| 70 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-train/, '') | 70 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-train/, '') |
| 71 | }, | 71 | }, |
| 72 | '/dev-api/ztx-match': { | 72 | '/dev-api/ztx-match': { |
| 73 | target: 'http://192.168.1.131:8083', | 73 | target: 'http://192.168.1.118:8083', |
| 74 | // target: 'http://192.168.1.132:8081', | 74 | // target: 'http://192.168.1.132:8081', |
| 75 | changeOrigin: true, | 75 | changeOrigin: true, |
| 76 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-match/, '') | 76 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-match/, '') |
| 77 | }, | 77 | }, |
| 78 | '/dev-api/ztx-webSite': { | 78 | '/dev-api/ztx-webSite': { |
| 79 | target: 'https://dance.itechtop.cn/stage-api', | 79 | // target: 'https://dance.itechtop.cn/stage-api', |
| 80 | // target: 'http://192.168.1.96:9083/', | 80 | target: 'http://192.168.1.118:8081/', |
| 81 | changeOrigin: true, | 81 | changeOrigin: true, |
| 82 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') | 82 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') |
| 83 | }, | 83 | }, |
| 84 | '/dev-api': { | 84 | '/dev-api': { |
| 85 | target: 'http://192.168.1.131:8081/', | 85 | target: 'http://192.168.1.118:8081/', |
| 86 | // target: 'https://dance.itechtop.cn/stage-api', | 86 | // target: 'https://dance.itechtop.cn/stage-api', |
| 87 | // target: 'https://wdsfwuxicenter.com/stage-api', | 87 | // target: 'https://wdsfwuxicenter.com/stage-api', |
| 88 | changeOrigin: true, | 88 | changeOrigin: true, | ... | ... |
-
Please register or sign in to post a comment