????作者:計(jì)算機(jī)源碼社
????個(gè)人簡(jiǎn)介:本人 八年開(kāi)發(fā)經(jīng)驗(yàn)屋谭,擅長(zhǎng)Java脚囊、Python、PHP桐磁、.NET悔耘、Node.js、Android我擂、微信小程序衬以、爬蟲(chóng)缓艳、大數(shù)據(jù)、機(jī)器學(xué)習(xí)等看峻,大家有這一塊的問(wèn)題可以一起交流阶淘!
????學(xué)習(xí)資料、程序開(kāi)發(fā)互妓、技術(shù)解答溪窒、文檔報(bào)告
1、選題背景
??近年來(lái)冯勉,隨著人們生活水平的不斷提高和城市化進(jìn)程的加快澈蚌,寵物市場(chǎng)呈現(xiàn)出蓬勃發(fā)展的態(tài)勢(shì)。據(jù)統(tǒng)計(jì)灼狰,中國(guó)寵物行業(yè)市場(chǎng)規(guī)模已超過(guò)2000億元惜浅,寵物飼養(yǎng)人數(shù)突破1億。然而伏嗜,傳統(tǒng)的寵物服務(wù)模式已難以滿足現(xiàn)代寵物主人對(duì)高效坛悉、便捷、多樣化服務(wù)的需求承绸。同時(shí)裸影,寵物服務(wù)行業(yè)面臨著信息不對(duì)稱(chēng)、服務(wù)質(zhì)量參差不齊军熏、管理效率低下等諸多問(wèn)題轩猩。在此背景下,結(jié)合當(dāng)前移動(dòng)互聯(lián)網(wǎng)技術(shù)的快速發(fā)展荡澎,特別是微信小程序的廣泛應(yīng)用均践,開(kāi)發(fā)一個(gè)集寵物信息管理、服務(wù)預(yù)約摩幔、用品購(gòu)買(mǎi)彤委、在線咨詢(xún)等功能于一體的綜合性平臺(tái)成為了必然趨勢(shì)』蚝猓基于SpringBoot焦影、Vue、MySQL和微信小程序技術(shù)框架的寵物服務(wù)中心應(yīng)運(yùn)而生封断,旨在通過(guò)技術(shù)創(chuàng)新解決行業(yè)痛點(diǎn)斯辰,為寵物主人提供一站式服務(wù)解決方案,同時(shí)為服務(wù)提供商提供高效的管理工具坡疼,促進(jìn)整個(gè)寵物服務(wù)生態(tài)系統(tǒng)的健康發(fā)展和數(shù)字化轉(zhuǎn)型彬呻。
2、研究目的和意義
??本項(xiàng)目旨在開(kāi)發(fā)一個(gè)基于微信小程序的寵物服務(wù)中心,以滿足日益增長(zhǎng)的寵物服務(wù)需求。隨著人們生活水平的提高,寵物飼養(yǎng)已成為一種普遍現(xiàn)象,但傳統(tǒng)的寵物服務(wù)模式往往存在信息不對(duì)稱(chēng)闸氮、服務(wù)質(zhì)量參差不齊等問(wèn)題剪况。通過(guò)整合SpringBoot、Vue湖苞、MySQL等先進(jìn)技術(shù),結(jié)合微信小程序的便捷性和普及性,我們旨在構(gòu)建一個(gè)全面拯欧、高效的寵物服務(wù)平臺(tái)详囤。該平臺(tái)將為用戶提供寵物信息管理财骨、服務(wù)預(yù)約、用品購(gòu)買(mǎi)藏姐、在線咨詢(xún)等一站式服務(wù),同時(shí)為管理員提供完善的后臺(tái)管理功能隆箩。這不僅能提高服務(wù)效率,降低運(yùn)營(yíng)成本,還能為寵物主人和服務(wù)提供者搭建一個(gè)互信互利的橋梁,最終實(shí)現(xiàn)寵物服務(wù)行業(yè)的數(shù)字化轉(zhuǎn)型和升級(jí)。
??開(kāi)發(fā)基于微信小程序的寵物服務(wù)中心具有重要的社會(huì)和經(jīng)濟(jì)意義羔杨。它順應(yīng)了移動(dòng)互聯(lián)網(wǎng)時(shí)代的發(fā)展趨勢(shì),利用微信小程序的廣泛覆蓋率,能夠快速觸達(dá)大量用戶,提高寵物服務(wù)的可及性和便利性捌臊。其次,通過(guò)整合各類(lèi)寵物服務(wù)資源,如寵物醫(yī)療、美容兜材、寄養(yǎng)等,平臺(tái)能夠標(biāo)準(zhǔn)化服務(wù)流程,提升服務(wù)質(zhì)量,促進(jìn)行業(yè)規(guī)范化發(fā)展理澎。該平臺(tái)的數(shù)據(jù)分析功能可為寵物行業(yè)提供valuable insights,助力相關(guān)企業(yè)優(yōu)化經(jīng)營(yíng)策略,推動(dòng)產(chǎn)業(yè)升級(jí)。從用戶角度來(lái)看,這種一站式服務(wù)模式不僅節(jié)省了時(shí)間和精力,還能獲得更專(zhuān)業(yè)曙寡、更個(gè)性化的寵物care建議糠爬。在促進(jìn)經(jīng)濟(jì)發(fā)展的同時(shí),平臺(tái)還能培養(yǎng)人們對(duì)寵物的責(zé)任感,提高社會(huì)的文明程度【偈總的來(lái)說(shuō),這個(gè)項(xiàng)目不僅是對(duì)寵物服務(wù)行業(yè)的創(chuàng)新和改革,更是對(duì)現(xiàn)代城市生活方式的一種積極回應(yīng)执隧。
3、系統(tǒng)功能設(shè)計(jì)
基于微信小程序的寵物服務(wù)中心功能模塊簡(jiǎn)介
1. 管理員功能模塊
1.1 用戶管理
管理員可以查看户侥、編輯用戶信息镀琉,以及控制用戶賬號(hào)的狀態(tài)。這個(gè)模塊確保了系統(tǒng)用戶的有效管理和監(jiān)控蕊唐。
1.2 寵物類(lèi)別管理
支持添加屋摔、編輯和刪除寵物類(lèi)別,為系統(tǒng)提供標(biāo)準(zhǔn)化的寵物分類(lèi)替梨。這有助于組織和檢索寵物相關(guān)信息凡壤。
1.3 寵物信息管理
允許管理員查看和審核用戶添加的寵物信息,確保信息的準(zhǔn)確性和適當(dāng)性耙替。管理員可以編輯或刪除不合規(guī)的信息亚侠。
1.4 服務(wù)類(lèi)型管理
管理員可以設(shè)置和更新各種寵物服務(wù)類(lèi)型,包括定價(jià)和描述俗扇。這為用戶提供了清晰的服務(wù)選擇硝烂。
1.5 服務(wù)中心管理
支持添加和管理服務(wù)中心的信息,包括位置铜幽、聯(lián)系方式和可用服務(wù)滞谢。這確保了線下服務(wù)點(diǎn)的有效管理串稀。
1.6 服務(wù)預(yù)約管理
允許查看和管理用戶的服務(wù)預(yù)約,包括確認(rèn)狮杨、取消和調(diào)整預(yù)約母截。這有助于優(yōu)化服務(wù)資源分配。
1.7 用品分類(lèi)管理
管理員可以創(chuàng)建和維護(hù)寵物用品的分類(lèi)體系橄教,便于用戶瀏覽和購(gòu)買(mǎi)清寇。這提高了商品管理的效率。
1.8 寵物用品管理
支持添加护蝶、編輯和管理寵物用品信息华烟,包括價(jià)格、庫(kù)存等持灰。這確保了商品信息的準(zhǔn)確性和及時(shí)更新盔夜。
1.9 訂單管理
允許查看和處理用戶訂單,包括發(fā)貨堤魁、退款等操作喂链。管理員還可以生成訂單報(bào)表進(jìn)行分析。
1.10 在線咨詢(xún)管理
管理員可以查看和回復(fù)用戶的咨詢(xún)妥泉,并管理常見(jiàn)問(wèn)題解答椭微。這提高了客戶服務(wù)的效率和質(zhì)量。
2. 用戶功能模塊
2.1 添加寵物信息
用戶可以輸入自己寵物的基本信息涛漂,上傳照片赏表,記錄健康狀況。這為個(gè)性化服務(wù)提供了基礎(chǔ)匈仗。
2.2 查看寵物服務(wù)類(lèi)型
支持瀏覽和搜索各種寵物服務(wù)瓢剿,查看詳情和價(jià)格。用戶可以方便地了解可用的服務(wù)選項(xiàng)悠轩。
2.3 預(yù)約寵物服務(wù)
用戶可以選擇服務(wù)類(lèi)型间狂、時(shí)間和地點(diǎn)進(jìn)行預(yù)約。系統(tǒng)提供簡(jiǎn)單直觀的預(yù)約流程火架。
2.4 查看寵物用品類(lèi)型
支持瀏覽寵物用品分類(lèi)鉴象,使用篩選和搜索功能查找商品。這為用戶提供了便捷的購(gòu)物體驗(yàn)何鸡。
2.5 購(gòu)買(mǎi)寵物用品
用戶可以查看商品詳情纺弊,添加到購(gòu)物車(chē),并完成下單支付骡男。整個(gè)購(gòu)買(mǎi)流程簡(jiǎn)單易用淆游。
2.6 在線咨詢(xún)
允許用戶提交咨詢(xún)問(wèn)題,查看歷史記錄,并接收回復(fù)通知犹菱。這提供了便捷的客戶支持渠道拾稳。
2.7 查看個(gè)人訂單
用戶可以瀏覽自己的訂單歷史,查看詳情腊脱,進(jìn)行取消或退款操作访得。這方便用戶管理自己的購(gòu)買(mǎi)記錄。
4陕凹、系統(tǒng)頁(yè)面設(shè)計(jì)
5悍抑、參考文獻(xiàn)
[1]陳宇佳.基于Web服務(wù)器的寵物托管服務(wù)管理系統(tǒng)設(shè)計(jì)[J].電腦編程技巧與維護(hù),2024,(02):80-82+120.DOI:10.16184/j.cnki.comprg.2024.02.043.
[2]顏惠.基于Web的寵物店信息管理系統(tǒng)設(shè)計(jì)[J].軟件,2023,44(02):147-149.
[3]平欣,宋育斌,孔維賓,等.基于GPS與微信小程序的智能寵物管理系統(tǒng)設(shè)計(jì)[J].軟件導(dǎo)刊,2023,22(02):121-126.
[4]尹彭.基于微服務(wù)的社區(qū)物業(yè)管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)[D].首都經(jīng)濟(jì)貿(mào)易大學(xué),2022. DOI:10.27338/d.cnki.gsjmu.2022.000469.
[5]安琪.基于服務(wù)設(shè)計(jì)思維的城市流浪動(dòng)物助養(yǎng)系統(tǒng)設(shè)計(jì)研究[D].北京化工大學(xué),2022. DOI:10.26939/d.cnki.gbhgu.2022.001964.
[6]莊帥.寵物管理系統(tǒng)的設(shè)計(jì)及實(shí)現(xiàn)[J].福建電腦,2022,38(05):68-72.DOI:10.16707/j.cnki.fjpc.2022.05.017.
[7]游秋龍.NJ智能寵物管理系統(tǒng)商業(yè)計(jì)劃書(shū)[D].廈門(mén)大學(xué),2022. DOI:10.27424/d.cnki.gxmdu.2022.001007.
[8]吳進(jìn)朝.寵物航空服務(wù)系統(tǒng)設(shè)計(jì)研究[D].福建工程學(xué)院,2021. DOI:10.27865/d.cnki.gfgxy.2021.000130.
[9]李?lèi)?張麗娟,史忠超,等.移動(dòng)互聯(lián)網(wǎng)背景下寵物管家平臺(tái)服務(wù)設(shè)計(jì)研究[C]//工業(yè)設(shè)計(jì)產(chǎn)業(yè)研究中心2019年論文匯編.西南科技大學(xué);,2021:5. DOI:10.26914/c.cnkihy.2021.003612.
[10]蔣筱涵.基于服務(wù)設(shè)計(jì)理念的“寵友”APP設(shè)計(jì)實(shí)踐探究[J].美與時(shí)代(上),2021,(02):44-47.DOI:10.16129/j.cnki.mysds.2021.02.016.
[11]王亞文,趙翠.基于SSM框架的社區(qū)寵物信息管理系統(tǒng)設(shè)計(jì)與分析[J].電腦編程技巧與維護(hù),2021,(01):103-105.DOI:10.16184/j.cnki.comprg.2021.01.036.
[12]吳文洋,劉世宇.基于B/S架構(gòu)寵物領(lǐng)養(yǎng)管理系統(tǒng)設(shè)計(jì)[J].軟件,2020,41(11):85-87.
[13]馬海珠.小型寵物店管理系統(tǒng)的設(shè)計(jì)[J].電腦知識(shí)與技術(shù),2019,15(36):93-94+108.DOI:10.14004/j.cnki.ckt.2019.4297.
[14]王凱.服務(wù)設(shè)計(jì)思維下的寵物生活服務(wù)APP設(shè)計(jì)與研究[D].西安工程大學(xué),2019. DOI:10.27390/d.cnki.gxbfc.2019.000016.
[15]楊瑩.寵物托管數(shù)字化服務(wù)平臺(tái)設(shè)計(jì)[D].中南大學(xué),2014.
6、核心代碼
<template>
<view class="content">
<view :style='{"minHeight":"100vh","width":"100%","padding":"0 0 132rpx","position":"relative","background":"url(http://codegen.caihongy.cn/20221112/286392d539b94f04bcf52c9a98e1d573.png) no-repeat right top,url(http://codegen.caihongy.cn/20221112/e866eac60553442587c2b20f0b4f151b.png) no-repeat right bottom,#fdfaf0","height":"auto"}'>
<form :style='{"width":"100%","padding":"100rpx 40rpx","background":"none","display":"block","height":"auto"}' class="app-update-pv">
<view :style='{"padding":"12rpx 0","margin":"0 0 24rpx 0","borderColor":"#ccc","alignItems":"center","borderWidth":"0 0 2rpx 0","display":"flex","width":"100%","borderStyle":"dashed","height":"auto"}' class="">
<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">服務(wù)名稱(chēng)</view>
<input :style='{"border":"0","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx","height":"80rpx"}' :disabled="ro.fuwumingcheng" v-model="ruleForm.fuwumingcheng" placeholder="服務(wù)名稱(chēng)"></input>
</view>
<view :style='{"padding":"12rpx 0","margin":"0 0 24rpx 0","borderColor":"#ccc","alignItems":"center","borderWidth":"0 0 2rpx 0","display":"flex","width":"100%","borderStyle":"dashed","height":"auto"}' class="">
<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">服務(wù)類(lèi)型</view>
<input :style='{"border":"0","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx","height":"80rpx"}' :disabled="ro.fuwuleixing" v-model="ruleForm.fuwuleixing" placeholder="服務(wù)類(lèi)型"></input>
</view>
<view :style='{"padding":"12rpx 0","margin":"0 0 24rpx 0","borderColor":"#ccc","alignItems":"center","borderWidth":"0 0 2rpx 0","display":"flex","width":"100%","borderStyle":"dashed","height":"auto"}' class="" @tap="fuwutupianTap">
<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">服務(wù)圖片</view>
<image :style='{"width":"80rpx","borderRadius":"100%","objectFit":"cover","display":"block","height":"80rpx"}' class="avator" v-if="ruleForm.fuwutupian" :src="baseUrl+ruleForm.fuwutupian.split(',')[0]" mode="aspectFill"></image>
<image :style='{"width":"80rpx","borderRadius":"100%","objectFit":"cover","display":"block","height":"80rpx"}' class="avator" v-else src="../../static/gen/upload.png" mode="aspectFill"></image>
</view>
<view :style='{"padding":"12rpx 0","margin":"0 0 24rpx 0","borderColor":"#ccc","alignItems":"center","borderWidth":"0 0 2rpx 0","display":"flex","width":"100%","borderStyle":"dashed","height":"auto"}' class="">
<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">可約時(shí)間</view>
<input :style='{"border":"0","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx","height":"80rpx"}' :disabled="ro.keyueshijian" v-model="ruleForm.keyueshijian" placeholder="可約時(shí)間"></input>
</view>
<view :style='{"padding":"12rpx 0","margin":"0 0 24rpx 0","borderColor":"#ccc","alignItems":"center","borderWidth":"0 0 2rpx 0","display":"flex","width":"100%","borderStyle":"dashed","height":"auto"}' class="">
<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">服務(wù)價(jià)格</view>
<input :style='{"border":"0","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx","height":"80rpx"}' :disabled="ro.fuwujiage" v-model="ruleForm.fuwujiage" placeholder="服務(wù)價(jià)格"></input>
</view>
<view :style='{"padding":"12rpx 0","margin":"0 0 24rpx 0","borderColor":"#ccc","alignItems":"center","borderWidth":"0 0 2rpx 0","display":"flex","width":"100%","borderStyle":"dashed","height":"auto"}' class="">
<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">折扣</view>
<input :style='{"border":"0","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx","height":"80rpx"}' :disabled="ro.zhekou" v-model="ruleForm.zhekou" placeholder="折扣"></input>
</view>
<view :style='{"padding":"12rpx 0","margin":"0 0 24rpx 0","borderColor":"#ccc","alignItems":"center","borderWidth":"0 0 2rpx 0","display":"flex","width":"100%","borderStyle":"dashed","height":"auto"}' class="">
<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">總價(jià)格</view>
<view :style='{"padding":"0px 24rpx","margin":"0px","lineHeight":"80rpx","fontSize":"28rpx","color":"rgb(0, 0, 0)","flex":"1"}' class="right-input">
{{zongjiage}}
</view>
</view>
<view :style='{"padding":"12rpx 0","margin":"0 0 24rpx 0","borderColor":"#ccc","alignItems":"center","borderWidth":"0 0 2rpx 0","display":"flex","width":"100%","borderStyle":"dashed","height":"auto"}' class="">
<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">預(yù)約時(shí)間</view>
<input :style='{"border":"0","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx","height":"80rpx"}' v-model="ruleForm.yuyueshijian" placeholder="預(yù)約時(shí)間" @tap="toggleTab('yuyueshijian')"></input>
</view>
<view :style='{"padding":"12rpx 0","margin":"0 0 24rpx 0","borderColor":"#ccc","alignItems":"center","borderWidth":"0 0 2rpx 0","display":"flex","width":"100%","borderStyle":"dashed","height":"auto"}' class=" select">
<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">訂單狀態(tài)</view>
<picker :style='{"width":"100%","flex":"1","height":"auto"}' @change="dingdanzhuangtaiChange" :value="dingdanzhuangtaiIndex" :disabled="true" :range="dingdanzhuangtaiOptions">
<view :style='{"width":"100%","lineHeight":"80rpx","fontSize":"28rpx","color":"rgb(255, 170, 51)"}' class="uni-input">{{ruleForm.dingdanzhuangtai?ruleForm.dingdanzhuangtai:"請(qǐng)選擇訂單狀態(tài)"}}</view>
</picker>
</view>
<view :style='{"padding":"12rpx 0","margin":"0 0 24rpx 0","borderColor":"#ccc","alignItems":"center","borderWidth":"0 0 2rpx 0","display":"flex","width":"100%","borderStyle":"dashed","height":"auto"}' class="">
<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">賬號(hào)</view>
<input :style='{"border":"0","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx","height":"80rpx"}' :disabled="ro.zhanghao" v-model="ruleForm.zhanghao" placeholder="賬號(hào)"></input>
</view>
<view :style='{"padding":"12rpx 0","margin":"0 0 24rpx 0","borderColor":"#ccc","alignItems":"center","borderWidth":"0 0 2rpx 0","display":"flex","width":"100%","borderStyle":"dashed","height":"auto"}' class="">
<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">姓名</view>
<input :style='{"border":"0","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx","height":"80rpx"}' :disabled="ro.xingming" v-model="ruleForm.xingming" placeholder="姓名"></input>
</view>
<view :style='{"padding":"12rpx 0","margin":"0 0 24rpx 0","borderColor":"#ccc","alignItems":"center","borderWidth":"0 0 2rpx 0","display":"flex","width":"100%","borderStyle":"dashed","height":"auto"}' class="">
<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">手機(jī)</view>
<input :style='{"border":"0","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx","height":"80rpx"}' :disabled="ro.shouji" v-model="ruleForm.shouji" placeholder="手機(jī)"></input>
</view>
<view :style='{"padding":"12rpx 0","margin":"0 0 24rpx 0","borderColor":"#ccc","alignItems":"center","borderWidth":"0 0 2rpx 0","display":"flex","width":"100%","borderStyle":"dashed","height":"auto"}' class="">
<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">地址</view>
<input :style='{"border":"0","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx","height":"80rpx"}' :disabled="ro.dizhi" v-model="ruleForm.dizhi" placeholder="地址"></input>
</view>
<!-- 否 -->
<view :style='{"width":"100%","margin":"40rpx 0 0 0","justifyContent":"space-between","display":"flex","height":"auto"}' class="btn" >
<button :style='{"border":"0","padding":"0px","margin":"0","color":"rgb(255, 255, 255)","borderRadius":"8rpx","background":"rgb(255, 170, 51)","width":"48%","lineHeight":"80rpx","fontSize":"28rpx","height":"80rpx"}' @tap="onSubmitTap" class="bg-red">提交</button>
</view>
</form>
<w-picker mode="dateTime" step="1" :current="false" :hasSecond="false" @confirm="yuyueshijianConfirm" ref="yuyueshijian" themeColor="#333333"></w-picker>
</view>
</view>
</template>
<script>
import wPicker from "@/components/w-picker/w-picker.vue";
import xiaEditor from '@/components/xia-editor/xia-editor';
export default {
data() {
return {
cross:'',
ruleForm: {
fuwumingcheng: '',
fuwuleixing: '',
fuwutupian: '',
keyueshijian: '',
fuwujiage: '',
zhekou: '',
zongjiage: '',
yuyueshijian: '',
dingdanzhuangtai: '未受理',
zhanghao: '',
xingming: '',
shouji: '',
dizhi: '',
shhf: '',
ispay: '',
userid: '',
},
dingdanzhuangtaiOptions: [],
dingdanzhuangtaiIndex: 0,
// 登陸用戶信息
user: {},
ro:{
fuwumingcheng : false,
fuwuleixing : false,
fuwutupian : false,
keyueshijian : false,
fuwujiage : false,
zhekou : false,
zongjiage : false,
yuyueshijian : false,
dingdanzhuangtai : false,
zhanghao : false,
xingming : false,
shouji : false,
dizhi : false,
sfsh : false,
shhf : false,
ispay : false,
userid : false,
},
}
},
components: {
wPicker,
xiaEditor
},
computed: {
baseUrl() {
return this.$base.url;
},
zongjiage:{
get: function () {
return 1*this.ruleForm.fuwujiage*this.ruleForm.zhekou
}
},
},
async onLoad(options) {
this.ruleForm.yuyueshijian = this.$utils.getCurDateTime();
let table = uni.getStorageSync("nowTable");
// 獲取用戶信息
let res = await this.$api.session(table);
this.user = res.data;
// ss讀取
this.ruleForm.zhekou = this.user.zhekou
this.ro.zhekou = true;
this.ruleForm.zhanghao = this.user.zhanghao
this.ro.zhanghao = true;
this.ruleForm.xingming = this.user.xingming
this.ro.xingming = true;
this.ruleForm.shouji = this.user.shouji
this.ro.shouji = true;
this.ruleForm.dizhi = this.user.dizhi
this.ro.dizhi = true;
this.ro.dingdanzhuangtai = true;
// 自定義下拉框值
this.dingdanzhuangtaiOptions = "未受理,進(jìn)行中,已完成".split(',')
// 如果有登陸捆姜,獲取登陸后保存的userid
this.ruleForm.userid = uni.getStorageSync("userid")
if (options.refid) {
// 如果上一級(jí)頁(yè)面?zhèn)鬟f了refid传趾,獲取改refid數(shù)據(jù)信息
this.ruleForm.refid = options.refid;
this.ruleForm.nickname = uni.getStorageSync("nickname");
}
// 如果是更新操作
if (options.id) {
this.ruleForm.id = options.id;
// 獲取信息
res = await this.$api.info(`fuwuyuyue`, this.ruleForm.id);
this.ruleForm = res.data;
}
// 跨表
this.cross = options.cross;
if(options.cross){
var obj = uni.getStorageSync('crossObj');
for (var o in obj){
if(o=='fuwumingcheng'){
this.ruleForm.fuwumingcheng = obj[o];
this.ro.fuwumingcheng = true;
continue;
}
if(o=='fuwuleixing'){
this.ruleForm.fuwuleixing = obj[o];
this.ro.fuwuleixing = true;
continue;
}
if(o=='fuwutupian'){
this.ruleForm.fuwutupian = obj[o].split(",")[0];
this.ro.fuwutupian = true;
continue;
}
if(o=='keyueshijian'){
this.ruleForm.keyueshijian = obj[o];
this.ro.keyueshijian = true;
continue;
}
if(o=='fuwujiage'){
this.ruleForm.fuwujiage = obj[o];
this.ro.fuwujiage = true;
continue;
}
if(o=='zhekou'){
this.ruleForm.zhekou = obj[o];
this.ro.zhekou = true;
continue;
}
if(o=='zongjiage'){
this.ruleForm.zongjiage = obj[o];
this.ro.zongjiage = true;
continue;
}
if(o=='yuyueshijian'){
this.ruleForm.yuyueshijian = obj[o];
this.ro.yuyueshijian = true;
continue;
}
if(o=='dingdanzhuangtai'){
this.ruleForm.dingdanzhuangtai = obj[o];
this.ro.dingdanzhuangtai = true;
continue;
}
if(o=='zhanghao'){
this.ruleForm.zhanghao = obj[o];
this.ro.zhanghao = true;
continue;
}
if(o=='xingming'){
this.ruleForm.xingming = obj[o];
this.ro.xingming = true;
continue;
}
if(o=='shouji'){
this.ruleForm.shouji = obj[o];
this.ro.shouji = true;
continue;
}
if(o=='dizhi'){
this.ruleForm.dizhi = obj[o];
this.ro.dizhi = true;
continue;
}
if(o=='userid'){
this.ruleForm.userid = obj[o];
this.ro.userid = true;
continue;
}
}
}
this.styleChange()
},
methods: {
styleChange() {
this.$nextTick(()=>{
// document.querySelectorAll('.app-update-pv . .uni-input-input').forEach(el=>{
// el.style.backgroundColor = this.addUpdateForm.input.content.backgroundColor
// })
})
},
// 多級(jí)聯(lián)動(dòng)參數(shù)
// 日長(zhǎng)控件選擇日期時(shí)間
yuyueshijianConfirm(val) {
console.log(val)
this.ruleForm.yuyueshijian = val.result;
this.$forceUpdate();
},
// 下拉變化
dingdanzhuangtaiChange(e) {
this.dingdanzhuangtaiIndex = e.target.value
this.ruleForm.dingdanzhuangtai = this.dingdanzhuangtaiOptions[this.dingdanzhuangtaiIndex]
},
fuwutupianTap() {
let _this = this;
this.$api.upload(function(res) {
_this.ruleForm.fuwutupian = 'upload/' + res.file;
_this.$forceUpdate();
_this.$nextTick(()=>{
_this.styleChange()
})
});
},
getUUID () {
return new Date().getTime();
},
async onSubmitTap() {
this.ruleForm.zongjiage = this.zongjiage
//跨表計(jì)算判斷
var obj;
if(this.ruleForm.fuwujiage&&(!this.$validate.isIntNumer(this.ruleForm.fuwujiage))){
this.$utils.msg(`服務(wù)價(jià)格應(yīng)輸入整數(shù)`);
return
}
if(this.ruleForm.zongjiage&&(!this.$validate.isNumber(this.ruleForm.zongjiage))){
this.$utils.msg(`總價(jià)格應(yīng)輸入數(shù)字`);
return
}
if(this.ruleForm.shouji&&(!this.$validate.isMobile(this.ruleForm.shouji))){
this.$utils.msg(`手機(jī)應(yīng)輸入手機(jī)格式`);
return
}
//更新跨表屬性
var crossuserid;
var crossrefid;
var crossoptnum;
if(this.cross){
var statusColumnName = uni.getStorageSync('statusColumnName');
var statusColumnValue = uni.getStorageSync('statusColumnValue');
if(statusColumnName!='') {
if(!obj) {
obj = uni.getStorageSync('crossObj');
}
if(!statusColumnName.startsWith("[")) {
for (var o in obj){
if(o==statusColumnName){
obj[o] = statusColumnValue;
}
}
var table = uni.getStorageSync('crossTable');
await this.$api.update(`${table}`, obj);
} else {
crossuserid=Number(uni.getStorageSync('userid'));
crossrefid=obj['id'];
crossoptnum=uni.getStorageSync('statusColumnName');
crossoptnum=crossoptnum.replace(/\[/,"").replace(/\]/,"");
}
}
}
if(crossrefid && crossuserid) {
this.ruleForm.crossuserid=crossuserid;
this.ruleForm.crossrefid=crossrefid;
let params = {
page: 1,
limit:10,
crossuserid:crossuserid,
crossrefid:crossrefid,
}
let res = await this.$api.list(`fuwuyuyue`, params);
if (res.data.total >= crossoptnum) {
this.$utils.msg(uni.getStorageSync('tips'));
return false;
} else {
//跨表計(jì)算
if(this.ruleForm.id){
await this.$api.update(`fuwuyuyue`, this.ruleForm);
}else{
await this.$api.add(`fuwuyuyue`, this.ruleForm);
}
this.$utils.msgBack('提交成功');
}
} else {
//跨表計(jì)算
if(this.ruleForm.id){
await this.$api.update(`fuwuyuyue`, this.ruleForm);
}else{
await this.$api.add(`fuwuyuyue`, this.ruleForm);
}
this.$utils.msgBack('提交成功');
}
},
optionsChange(e) {
this.index = e.target.value
},
bindDateChange(e) {
this.date = e.target.value
},
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year - 60;
} else if (type === 'end') {
year = year + 2;
}
month = month > 9 ? month : '0' + month;;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
},
toggleTab(str) {
this.$refs[str].show();
}
}
}
</script>
<style lang="scss" scoped>
.content {
min-height: calc(100vh - 44px);
box-sizing: border-box;
}
</style>