diff --git a/components/order-status/index.vue b/components/order-status/index.vue index 3cb80cc..45face0 100644 --- a/components/order-status/index.vue +++ b/components/order-status/index.vue @@ -10,16 +10,17 @@ - {{ statusText }} + {{ statusText() }} - + - + @@ -40,17 +41,19 @@ pageType: { type: String, default: 'job-order' // 'job-order' 或 'order' - } + }, }, computed: { - stepsIndex() { + }, + methods: { + getStepsIndex() { return this.orderData.status || 0; }, statusText() { const statusTextMap = { '0' : {//先付后用 'job-order': { - 0: '等待师傅确认',//师傅操作 + 0: '待待师傅确认',//师傅操作 1: '企业待支付',//企业操作 2: '订单进行中',//师傅操作 3: '试工完成',//企业操作 @@ -59,8 +62,8 @@ 6: '订单已取消' }, default: { - 0: '等待企业确认并支付',//企业操作 - 1: '',//暂无 + 0: '等待企业确认',//企业操作 + 1: '企业待支付',//暂无 2: '订单进行中',//师傅操作 3: '试工完成',//企业操作 4: '',//暂无 @@ -92,7 +95,7 @@ let i = this.orderData ? this.orderData.payType : '1'; let statusTextMapItem = statusTextMap[i] || statusTextMap[1]; const pageTypeMap = statusTextMapItem[this.pageType] || statusTextMapItem.default; - return pageTypeMap[this.stepsIndex] || '未知状态'; + return pageTypeMap[this.getStepsIndex()] || '未知状态'; }, statusImage() { const statusImageMap = { @@ -104,25 +107,26 @@ 5: '/static/images/order/46525.png', 6: '/static/images/order/46525.png' }; - return statusImageMap[this.stepsIndex] || '/static/images/order/46524.png'; + return statusImageMap[this.getStepsIndex()] || '/static/images/order/46524.png'; }, stepsList() { const stepsListMap = { 0 : {//先付后用 'job-order': [ { title: "师傅确认", date: "" }, + { title: "企业支付", date: "" }, { title: "进行", date: "" }, { title: "试工完成", date: "" }, - { title: "企业支付", date: "" }, + // { title: "企业确认", date: "" }, { title: "订单完成", date: "" } ], default: [ { title: "接单", date: "" }, + { title: "企业支付", date: "" }, { title: "进行", date: "" }, { title: "试工完成", date: "" }, - { title: "企业确认", date: "" }, - { title: "企业支付", date: "" }, - { title: "企业完成", date: "" } + // { title: "企业确认", date: "" }, + { title: "订单完成", date: "" } ] }, 1 : {//试用以后支付 @@ -130,6 +134,7 @@ { title: "师傅确认", date: "" }, { title: "进行", date: "" }, { title: "试工完成", date: "" }, + { title: "企业确认", date: "" }, { title: "企业支付", date: "" }, { title: "订单完成", date: "" } ], @@ -139,15 +144,15 @@ { title: "试工完成", date: "" }, { title: "企业确认", date: "" }, { title: "企业支付", date: "" }, - { title: "企业完成", date: "" } + { title: "订单完成", date: "" } ] }, }; let i = this.orderData ? this.orderData.payType : '1'; let stepsListMapItem = stepsListMap[i] || stepsListMap[1]; return stepsListMapItem[this.pageType] || stepsListMapItem.default; - } - } + }, + } } diff --git a/pages/order/component/enterprise.vue b/pages/order/component/enterprise.vue index 535c0c4..3348464 100644 --- a/pages/order/component/enterprise.vue +++ b/pages/order/component/enterprise.vue @@ -19,7 +19,7 @@ - {{items.status_dictText}} + {{ getStatusText(items) }} @@ -57,6 +57,10 @@ import { bossOrderList } from "@/common/api.js" + import { + getStatusText + } from "@/utils/statusText.js" + export default { components: { @@ -107,6 +111,8 @@ this.onOrder(); }, methods: { + getStatusText, + onReach() { this.pageNo = this.pageNo + 1 this.onOrder() diff --git a/pages/order/component/master.vue b/pages/order/component/master.vue index 9cfa7bd..3ac4171 100644 --- a/pages/order/component/master.vue +++ b/pages/order/component/master.vue @@ -21,7 +21,7 @@ - {{ item.status_dictText }} + {{ getStatusText(item) }} @@ -59,6 +59,10 @@ import { bossOrderList } from "@/common/api.js" + import { + getStatusText + } from "@/utils/statusText.js" + export default { components: { @@ -110,6 +114,7 @@ this.onOrder() }, methods: { + getStatusText, onReach() { this.pageNo = this.pageNo + 1 this.onOrder() diff --git a/pages_subpack/hire/order-list.vue b/pages_subpack/hire/order-list.vue index f5b946c..224051e 100644 --- a/pages_subpack/hire/order-list.vue +++ b/pages_subpack/hire/order-list.vue @@ -41,7 +41,7 @@ - {{getStatusText(item.status)}} + {{ getStatusText(item) }} @@ -67,7 +67,10 @@ import { getTaskById } from "@/common/api.js" - + import { + getStatusText + } from "@/utils/statusText.js" + export default { data() { return { @@ -128,6 +131,8 @@ this.getJobDetail(); }, methods: { + getStatusText, + getJobDetail() { getTaskById({ id: this.jobId }).then(response => { if (response.success) { @@ -151,18 +156,6 @@ }); }); }, - getStatusText(status) { - const statusMap = { - 0: '待聘用', - 1: '进行中', - 2: '试工完成', - 3: '企业确认', - 4: '已支付', - 5: '已完成', - 6: '已取消' - }; - return statusMap[status] || '未知状态'; - }, onOrderDetail(order) { uni.navigateTo({ url: `/pages_subpack/order-detail/boss?orderId=${order.id}&type=true` diff --git a/pages_subpack/job-hunt/order-list.vue b/pages_subpack/job-hunt/order-list.vue index 9f03289..a62a7c1 100644 --- a/pages_subpack/job-hunt/order-list.vue +++ b/pages_subpack/job-hunt/order-list.vue @@ -47,7 +47,8 @@ - {{getStatusText(item.status)}} + {{ getStatusText(item) }} + @@ -84,7 +85,10 @@ import { querySeekById } from "@/common/api.js" - + import { + getStatusText + } from "@/utils/statusText.js" + export default { data() { return { @@ -145,6 +149,8 @@ this.getSeekDetail(); }, methods: { + getStatusText, + getSeekDetail() { querySeekById({ id: this.seekId }).then(response => { if (response.success) { @@ -168,18 +174,6 @@ }); }); }, - getStatusText(status) { - const statusMap = { - 0: '待确认', - 1: '进行中', - 2: '试工完成', - 3: '企业确认', - 4: '已支付', - 5: '已完成', - 6: '已取消' - }; - return statusMap[status] || '未知状态'; - }, onOrderDetail(order) { uni.navigateTo({ url: `/pages_subpack/job-order-detail/index?orderId=${order.id}&type=true` diff --git a/pages_subpack/job-order-detail/index.vue b/pages_subpack/job-order-detail/index.vue index e300cb6..baabad6 100644 --- a/pages_subpack/job-order-detail/index.vue +++ b/pages_subpack/job-order-detail/index.vue @@ -1,11 +1,74 @@