diff --git a/pages.config.js b/pages.config.js
index aa9f9be..126d7c5 100755
--- a/pages.config.js
+++ b/pages.config.js
@@ -88,6 +88,13 @@ export default defineUniPages({
navigationBarTitleText: '订单完成',
},
},
+ {
+ path: 'search',
+ aliasPath: '/search',
+ style: {
+ navigationBarTitleText: '',
+ },
+ },
],
},
{
@@ -211,8 +218,8 @@ export default defineUniPages({
// "van-checkbox": "/wxcomponents/vant-weapp/checkbox",
// "van-cell-group": "/wxcomponents/vant-weapp/cell-group",
// "van-checkbox-group": "/wxcomponents/vant-weapp/checkbox-group",
- "van-rate": "/wxcomponents/vant-weapp/rate",
- "van-icon": "/wxcomponents/vant-weapp/icon"
+ // "van-rate": "/wxcomponents/vant-weapp/rate",
+ // "van-icon": "/wxcomponents/vant-weapp/icon"
// "van-tabbar": "/wxcomponents/@vant/weapp/tabbar/index",
// "van-tabbar-item": "/wxcomponents/@vant/weapp/tabbar-item/index"
}
diff --git a/src/App.vue b/src/App.vue
index 698a577..db4b865 100755
--- a/src/App.vue
+++ b/src/App.vue
@@ -18,6 +18,6 @@ export default {
@import 'uview-plus/index.scss';
/* #ifdef MP-WEIXIN */
-@import '@/wxcomponents/vant-weapp/common/index.wxss';
+// @import '@/wxcomponents/vant-weapp/common/index.wxss';
/* #endif */
diff --git a/src/api/base/index.js b/src/api/base/index.js
index 7e58fc9..aabfe17 100755
--- a/src/api/base/index.js
+++ b/src/api/base/index.js
@@ -84,4 +84,9 @@ export const fetchServerTypeList = params =>
* @desc 报告列表
*/
export const fetchReportTypelList = params =>
- request.get('/reporttype/listAll', params)
\ No newline at end of file
+ request.get('/reporttype/listAll', params)
+/**
+ * @desc 轮播图
+*/
+export const fetchSwiperList = params =>
+ request.get('/swiper/listAll', params)
\ No newline at end of file
diff --git a/src/api/order/index.js b/src/api/order/index.js
index 2e7cfc6..46488bb 100755
--- a/src/api/order/index.js
+++ b/src/api/order/index.js
@@ -17,6 +17,11 @@ export const orderPay = data =>
*/
export const orderInfo = params =>
request.get('/order/infomation', params)
+/**
+ * @description 开始服务
+*/
+export const startOrder = params =>
+ request.get('/order/start', params)
/**
* @description 获取取消原因列表
@@ -39,4 +44,29 @@ export const cancelOrder = data =>
* @description 申请退款
*/
export const orderRefund = data =>
- request.post('/refound', data)
\ No newline at end of file
+ request.post('/refound', data)
+/**
+ * @description 订单完成 & 打分
+*/
+export const orderComentSubmit = data =>
+ request.post('/comment/submit', data)
+/**
+ * @description 订单完成 & 打分 详情
+*/
+export const orderComentInfo = params =>
+ request.get('/comment/infomation', params)
+/**
+ * @description 今日收入
+*/
+export const orderTodayIncome = data =>
+ request.post('/order/todayIncome', data)
+/**
+ * @description 提现
+*/
+export const cashSubmit = data =>
+ request.post('/cash/submit', data)
+/**
+ * @description 提现记录
+*/
+export const cashSubmitRecord = data =>
+ request.post('/cash/record', data)
\ No newline at end of file
diff --git a/src/components/upload-img/upload-img.vue b/src/components/upload-img/upload-img.vue
index f4707d2..8e18b6b 100755
--- a/src/components/upload-img/upload-img.vue
+++ b/src/components/upload-img/upload-img.vue
@@ -4,11 +4,12 @@
@delete="deletePic"
accept="image"
uploadIconColor="#999"
- v-bind="omit($attrs, ['disabled', 'maxCount', 'maxSize'])"
+ v-bind="omit($attrs, ['maxCount', 'maxSize'])"
:fileList="fileList"
:deletable="!$attrs.disabled"
:maxSize="10 * 1024 * 1024"
:maxCount="$attrs.disabled ? fileList.length : $attrs.maxCount"
+ @clickPreview="clickPreview"
/>
@@ -23,7 +24,10 @@ const props = defineProps({
default: () => []
}
})
-const fileList = ref(props.modelValue)
+const fileList = ref([])
+watchEffect(() => {
+ fileList.value = props.modelValue
+})
// 删除图片
const deletePic = (event) => {
fileList.value.splice(event.index, 1)
@@ -74,6 +78,10 @@ const afterRead = async (event) => {
}))
)
}
+
+const clickPreview = (item) => {
+ console.log('🚀 ~ file: upload-img.vue:83 ~ item:', item)
+}
diff --git a/src/pages/form/index.vue b/src/pages/form/index.vue
index fb1e3de..515da98 100755
--- a/src/pages/form/index.vue
+++ b/src/pages/form/index.vue
@@ -1,7 +1,12 @@
-
-
+
+
@@ -114,7 +119,7 @@
v-model="model.remark"
placeholder=""
maxlength="300"
- :disabled="current > 1"
+ :disabled="current > 1 || roleName === 'common'"
count
:autoHeight="false"
/>
@@ -127,7 +132,10 @@
3. 服务地点为必填项
-
+
-
-
+
+
+ 预估收入
¥
- {{
+
+ {{ orderInfo.doctorPrice }}
+
+ {{
orderInfo.orderPrice || selTypeItem.price || 0
}}
支付
立即下单
{{ true ? '开始服务' : '订单已完成,提交工作记录' }}{{
+ orderInfo.receiveStatus !== 0
+ ? '开始服务'
+ : '订单已完成,提交工作记录'
+ }}
{{
- orderInfo.status === 3 ? '订单已提交,请耐心等待' : '服务完成,请评价'
+ orderInfo.status === 3
+ ? '订单已提交,请耐心等待'
+ : orderInfo.isEvaluate === 0
+ ? '查看评价'
+ : '服务完成,请评价'
}}
@@ -238,7 +269,7 @@
const instance = getCurrentInstance()
const { $u, $api, $Router, $Route, $dialog, $toast, $store, $loading } =
instance.proxy
-const roleName = $store.user.userInfo.roleName
+const roleName = computed(() => $store.user.userInfo.roleName)
// 填写订单 在线支付 服务中 服务完成
const list = ref([
{ label: '填写订单', id: 1 },
@@ -445,6 +476,8 @@ const serverTypelList = ref([])
const reportTypelList = ref([])
const dateKeyObj = {}
const orderId = ref($Route.query.id ? +$Route.query.id : '')
+const hospitaId = ref($Route.query.hospitaId ? +$Route.query.hospitaId : '')
+const hospitaName = ref($Route.query.hospitaName || '')
const orderInfo = ref({})
const getPzList = async () => {
@@ -453,7 +486,7 @@ const getPzList = async () => {
}
const getPzHospitalList = async () => {
- const res = await $api.fetchPzHospitalList()
+ const res = await $api.fetchPzHospitalList({ name: '' })
hospitalList.value = (res?.list || []).map((item) => ({
label: item.name,
id: item.id + ''
@@ -479,7 +512,6 @@ const getOrderInfo = async () => {
const res = await $api.orderInfo({ id: orderId.value })
if (res.success) {
const { order = {} } = res
- console.log('🚀 ~ file: index.vue:465 ~ order:', order.result)
orderInfo.value = order
curType.value = order.serverId
current.value = order.status || 1
@@ -488,11 +520,28 @@ const getOrderInfo = async () => {
$loading(false)
}
-getPzList()
-getPzHospitalList()
-getServerTypeList()
-getReportTypelList()
-getOrderInfo()
+const init = () => {
+ getPzList()
+ getPzHospitalList()
+ if (!roleName.value) {
+ $dialog('请先登录', {
+ showCancelButton: true,
+ confirmButtonText: '去登录',
+ cancelButtonText: '取消',
+ confirmColor: '#FF8CA6'
+ })
+ .then(() => {
+ $Router.push('/personal')
+ })
+ .catch(() => $Router.push('/'))
+ return
+ }
+ getServerTypeList()
+ getReportTypelList()
+ getOrderInfo()
+}
+
+init()
const orderPay = async () => {
const res = await $api.orderPay({
@@ -577,6 +626,34 @@ const onSubmit = () => {
})
}
+const handleOrder = async (type) => {
+ if (type === 'start') {
+ $dialog('确认开始服务吗?', {
+ showCancelButton: true,
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ confirmColor: '#FF8CA6'
+ })
+ .then(async () => {
+ const res = await $api.startOrder({
+ id: orderId.value
+ })
+ if (res.success) {
+ getOrderInfo()
+ $toast('开始服务成功!', { duration: 3000 })
+ }
+ })
+ .cahch(() => '')
+ } else if (type === 'end') {
+ if (orderInfo.value.status === 4) {
+ $Router.push({
+ path: '/complete',
+ query: { id: orderId.value, isEvaluate: orderInfo.value.isEvaluate }
+ })
+ }
+ }
+}
+
watchEffect(() => {
const cur = curType.value
const item = columns[0].find((item) => item.id === cur)
@@ -587,9 +664,12 @@ watchEffect(() => {
formItems.forEach((item) => {
const { required, key, keyName, message, trigger, type } = item
if (item.cur.includes(cur)) {
- if (key === 'hospitalId') item.options = [hospitalList.value]
- if (key === 'typeId') item.options = [serverTypelList.value]
- if (key === 'reportType') item.options = [reportTypelList.value]
+ if (key === 'hospitalId') {
+ item.options = [hospitalList.value]
+ model.value.hospitalId = hospitaId.value
+ item.val = hospitaName.value
+ } else if (key === 'typeId') item.options = [serverTypelList.value]
+ else if (key === 'reportType') item.options = [reportTypelList.value]
formList.value.push(item)
if (type !== 'string') {
dateAndSelectFormList.value.push(item)
diff --git a/src/pages/index/home/index.vue b/src/pages/index/home/index.vue
index 4745cec..8e36731 100755
--- a/src/pages/index/home/index.vue
+++ b/src/pages/index/home/index.vue
@@ -2,6 +2,7 @@
+
@@ -62,7 +65,7 @@
hoverClass="none"
>
-
+