diff --git a/App.vue b/App.vue
index 7a31b6d..981a835 100644
--- a/App.vue
+++ b/App.vue
@@ -5,6 +5,7 @@
onShow: function() {
// this.$store.commit('initConfig')
this.$store.commit('getPosition')
+ this.$store.commit('categoryList')
if(uni.getStorageSync('token')){
this.$store.commit('getUserInfo')
}
diff --git a/api/api.js b/api/api.js
index 445c529..a829550 100644
--- a/api/api.js
+++ b/api/api.js
@@ -265,6 +265,26 @@ const config = {
method: 'POST',
auth: true,
},
+
+
+ // 水洗店账号绑定微信
+ bindWx: {
+ url: '/shop/bind/wx',
+ method: 'POST',
+ auth: true,
+ },
+ // 上传自己的桌布
+ tablecloth: {
+ url: '/order/upload/tablecloth',
+ method: 'POST',
+ auth: true,
+ },
+ // 水洗店确认接单
+ orderConfirmAccept: {
+ url: '/order/confirm/accept',
+ method: 'POST',
+ auth: true,
+ },
}
diff --git a/mixins/list.js b/mixins/list.js
new file mode 100644
index 0000000..4f072f9
--- /dev/null
+++ b/mixins/list.js
@@ -0,0 +1,70 @@
+
+
+
+function query(self, queryParams){
+ // return (self.beforeGetData && self.beforeGetData()) ||
+ // queryParams || self.queryParams
+
+ // 深度合并对象
+ return self.$utils.deepMergeObject(
+
+ self.$utils.deepMergeObject(self.queryParams,
+
+ (self.beforeGetData && self.beforeGetData()) || {}),
+
+ queryParams)
+}
+
+
+
+export default {
+ data() {
+ return {
+ queryParams: {
+ pageNo: 1,
+ pageSize: 10,
+ },
+ total : 0,
+ list : [],
+ }
+ },
+ onPullDownRefresh() {
+ this.getData()
+ },
+ onReachBottom() {
+ this.loadMoreData()
+ },
+ onShow() {
+ this.getData()
+ },
+ methods: {
+ getData(queryParams){
+ return new Promise((success, error) => {
+ if(!this.mixinsListApi){
+ return console.error('mixinsListApi 缺失');
+ }
+ this.$api(this.mixinsListApi,
+ query(this, queryParams), res => {
+ uni.stopPullDownRefresh()
+ if(res.code == 200){
+
+ this.getDataThen && this.getDataThen(res.result.records, res.result.total, res.result)
+
+ success(res.result)
+
+ this[this.mixinsListKey || 'list'] = res.result.records
+
+ this.total = res.result.total
+ }
+ })
+ })
+ },
+ loadMoreData(){
+ console.log('loadMoreData----', this.queryParams.pageSize < this.total);
+ if(this.queryParams.pageSize < this.total){
+ this.queryParams.pageSize += 10
+ this.getData()
+ }
+ },
+ }
+}
\ No newline at end of file
diff --git a/mixins/order.js b/mixins/order.js
new file mode 100644
index 0000000..b7ecfd1
--- /dev/null
+++ b/mixins/order.js
@@ -0,0 +1,98 @@
+
+
+export default {
+ methods: {
+ // 酒店支付订单
+ payOrder(id){
+ let self = this
+ this.$api('orderPay', {
+ id
+ }, res => {
+ if (res.code == 200) {
+ uni.requestPayment({
+ provider: 'wxpay', // 服务提提供商
+ timeStamp: res.result.timeStamp, // 时间戳
+ nonceStr: res.result.nonceStr, // 随机字符串
+ package: res.result.packageValue,
+ signType: res.result.signType, // 签名算法
+ paySign: res.result.paySign, // 签名
+ success: function(res) {
+
+ self.getData()
+
+ },
+ fail: function(err) {
+ console.log('支付失败', err);
+ // self.$refs.confirmationPopup.close()
+ uni.showToast({
+ icon: 'none',
+ title: "支付失败"
+ })
+ }
+ });
+ }
+ })
+ },
+ // 确认收货
+ confirmReceiveGoods(item) {
+ let self = this
+
+ uni.showModal({
+ title: '您收到货了吗?',
+ success(res) {
+ if (res.confirm) {
+ self.$api('orderConfirm', {
+ id: item.id
+ }, res => {
+ if (res.code == 200) {
+ self.getData()
+ }
+ })
+ }
+ }
+ })
+ },
+ // 水洗店确认接单
+ orderConfirmAccept(item){
+ let self = this
+ this.$api('orderConfirmAccept', {
+ id: item.id
+ }, res => {
+ if (res.code == 200) {
+ uni.showToast({
+ title: '接单成功',
+ icon: 'none'
+ })
+ self.getData()
+ }
+ })
+ },
+ // 水洗店确认破损0无破损,1破损
+ orderConfirmedDamage(item, flag){
+ let self = this
+ this.$api('orderConfirmAccept', {
+ id: item.id,
+ flag,
+ }, res => {
+ if (res.code == 200) {
+ uni.showToast({
+ title: '上报成功',
+ icon: 'none'
+ })
+ self.getData()
+ }
+ })
+ },
+ // 水洗店完成水洗
+ orderFinishedWashing(item){
+ let self = this
+ self.$api('orderConfirm', {
+ id: item.id
+ }, res => {
+ if (res.code == 200) {
+ self.getData()
+ }
+ })
+ },
+ }
+}
\ No newline at end of file
diff --git a/pages.json b/pages.json
index a438904..490bd07 100644
--- a/pages.json
+++ b/pages.json
@@ -9,13 +9,15 @@
{
"path": "pages/index/order",
"style": {
- "navigationBarTitleText": ""
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh" : true
}
},
{
"path": "pages/index/category",
"style": {
- "navigationBarTitleText": ""
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh" : true
}
},
{
@@ -39,8 +41,12 @@
},
"subPackages": [{
"root": "pages_order",
- "pages": [{
- "path": "order/orderDetail"
+ "pages": [
+ {
+ "path": "order/orderDetail",
+ "style": {
+ "enablePullDownRefresh" : true
+ }
},
{
"path": "mine/purse"
@@ -71,6 +77,12 @@
},
{
"path": "order/applyLaundryStore"
+ },
+ {
+ "path": "order/createWash"
+ },
+ {
+ "path": "order/damageReport"
}
]
}],
diff --git a/pages/index/category.vue b/pages/index/category.vue
index 2f130c9..1dfd3cc 100644
--- a/pages/index/category.vue
+++ b/pages/index/category.vue
@@ -35,14 +35,14 @@
@@ -271,8 +334,12 @@
.bottom {
display: flex;
- justify-content: space-between;
+ justify-content: flex-end;
font-size: 25rpx;
+ .pay{
+ margin: 12rpx;
+ margin-right: auto;
+ }
.price {
font-weight: 900;
text {
@@ -290,7 +357,7 @@
}
.b2 {
- background: linear-gradient(178deg, #4FD3BC, #60C285);
+ background: $uni-color;
color: #fff;
}
diff --git a/pages_order/auth/loginAndRegisterAndForgetPassword.vue b/pages_order/auth/loginAndRegisterAndForgetPassword.vue
index a9fbf75..5b21c5e 100644
--- a/pages_order/auth/loginAndRegisterAndForgetPassword.vue
+++ b/pages_order/auth/loginAndRegisterAndForgetPassword.vue
@@ -6,19 +6,19 @@
- {{title}}
+ {{titleList[titleIndex]}}
-
+
-
@@ -26,12 +26,18 @@
clearable :customStyle="{ backgroundColor: '#f6f6f6'}">
-
+
-
-
- 请你阅读并同意我们的《隐私条款》和《服务协议》
+
+
+ 请你阅读并同意我们的《隐私条款》和《服务协议》
@@ -39,29 +45,12 @@
-
-
-
-
-
-
-
- 注册账号
- |
- 账号登录
- |
- 忘记密码
-
-
- {{title}}
+ {{titleList[titleIndex]}}
@@ -94,50 +83,52 @@
-
-
-
-
-
-
-
- 注册账号
- |
- 账号登录
- |
- 忘记密码
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_order/mine/purse.vue b/pages_order/mine/purse.vue
index b10e61e..780343c 100644
--- a/pages_order/mine/purse.vue
+++ b/pages_order/mine/purse.vue
@@ -84,7 +84,6 @@
text-align: left;
color: #333333;
// line-height: 40px;
- padding-bottom: 160rpx;
.from-line {
margin-top: 40rpx;
diff --git a/pages_order/mine/runningWater.vue b/pages_order/mine/runningWater.vue
index 54d9c8f..9e3ea4b 100644
--- a/pages_order/mine/runningWater.vue
+++ b/pages_order/mine/runningWater.vue
@@ -5,7 +5,7 @@
+ :value="x[item.type] + item.balance" :label="item.createTime" />
@@ -21,28 +21,29 @@
return {
title: ['余额记录', '提现记录', '佣金记录'],
agentFlow: {
- total: 1,
- records: [{
- type: 0,
- money: 100,
- createTime: '2024-04-02 20:00',
- title: "佣金提现",
- },
- {
- type: 0,
- money: 100,
- createTime: '2024-04-02 20:00',
- title: "佣金提现",
- },
- {
- type: 0,
- money: 100,
- createTime: '2024-04-02 20:00',
- title: "佣金提现",
- },
+ total: 0,
+ records: [
+ // {
+ // type: 0,
+ // money: 100,
+ // createTime: '2024-04-02 20:00',
+ // title: "佣金提现",
+ // },
+ // {
+ // type: 0,
+ // money: 100,
+ // createTime: '2024-04-02 20:00',
+ // title: "佣金提现",
+ // },
+ // {
+ // type: 0,
+ // money: 100,
+ // createTime: '2024-04-02 20:00',
+ // title: "佣金提现",
+ // },
]
},
- x: ['+', '-', '-', '+'],
+ x: ['+', '-', '+', '+'],
status: 0,
}
},
diff --git a/pages_order/order/applyLaundryStore.vue b/pages_order/order/applyLaundryStore.vue
index bd6b407..0455774 100644
--- a/pages_order/order/applyLaundryStore.vue
+++ b/pages_order/order/applyLaundryStore.vue
@@ -27,6 +27,12 @@
+
+ 设置密码
+
+
+
+
所在地区
@@ -78,6 +84,7 @@
address: '',
latitude: '',
longitude: '',
+ password : '',
},
bottomBtnStyle: {
@@ -102,6 +109,18 @@
// 提交按钮
submitApplication() {
+
+ if (this.$utils.verificationAll(this.form, {
+ userName: '请输入您的姓名',
+ name: '请输入店铺名称',
+ phone: '请输入联系方式',
+ currentRegion: '请选择所在地区',
+ address: '请输入详细地址',
+ password : '请设置密码',
+ })) {
+ return
+ }
+
this.form.address = this.form.currentRegion + this.form.address
this.$api('applyShopHotel', this.form, res => {
if (res.code == 200) {
diff --git a/pages_order/order/createWash.vue b/pages_order/order/createWash.vue
new file mode 100644
index 0000000..65df994
--- /dev/null
+++ b/pages_order/order/createWash.vue
@@ -0,0 +1,448 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.goodsName }}
+
+
+ 数量:{{ item.num }}
+
+
+
+ 规格:{{ item.sku }}
+
+
+
+ 确认收货后,方可水洗
+
+
+ {{ statusText[item.status] }}
+
+
+
+ 租金¥
+ {{ item.zujin }}
+ 元
+
+
+ 水洗费¥
+ {{ item.washPrice }}
+ 元
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ checkboxValue.length }}
+
+
+
+ 合计
+
+ ¥
+ {{ price }}
+
+
+
+
+ 含租金{{zujin}}¥,水洗费{{washPrice}}¥
+
+
+ 结算
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_order/order/damageReport.vue b/pages_order/order/damageReport.vue
new file mode 100644
index 0000000..ea4bfae
--- /dev/null
+++ b/pages_order/order/damageReport.vue
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传图片
+ *
+
+
+
+
+
+
+
+
+
+
+
+ 提交审核
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_order/order/orderDetail.vue b/pages_order/order/orderDetail.vue
index e3abaf8..fb3b594 100644
--- a/pages_order/order/orderDetail.vue
+++ b/pages_order/order/orderDetail.vue
@@ -3,7 +3,7 @@
-
+
@@ -13,18 +13,57 @@
待送回
-->
-
+ :detail="order"> -->
+
+
+
+ 确认接单
+
+
+
+
+
+ 确认收货
+
+
+ 查看物流
+
+
+
+
+
+
+ 确认无破损
+
+
+
+ 破损上报
+
+
+
+
+ 水洗完成
+
+
+
+
-
+
-
+
-
+ v-for="(item, index) in steps">
@@ -127,7 +166,7 @@
-
+
实付款
@@ -137,7 +176,7 @@
-
+
租赁费用
@@ -146,7 +185,7 @@
-
+
水洗费用
@@ -216,11 +255,12 @@
mapGetters
} from 'vuex'
import orderTypeBtn from "../components/order/orderTypeBtn.vue"
-
+ import mixinOrder from '@/mixins/order.js'
export default {
components: {
orderTypeBtn
},
+ mixins : [mixinOrder],
computed: {
...mapGetters(['userShop']),
},
@@ -228,31 +268,31 @@
return {
stepsCurrent: 0,
steps: [//水洗店看到的步骤条
- [//租赁订单
- '客户待支付',
- '平台待发货',
- '待收货',//确认收货接口
- '服务完成',
- ],
- [//水洗订单
- '客户待支付',
- '检查破损',//确认破损状态接口
- '开始清洗',//开始清洗接口
- '服务完成',
- ],
- [//换货
- '下单',
- '寄回商品',//快递接口
- '平台待收货',
- '客户待支付',
- '服务完成',
- ],
- [//退货
- '下单',
- '寄回商品',//快递接口
- '平台待收货',
- '服务完成',
- ],
+ // [//租赁订单
+ // '客户待支付',
+ // '平台待发货',
+ // '待收货',//确认收货接口
+ // '服务完成',
+ // ],
+ // [//水洗订单
+ // '客户待支付',
+ // '检查破损',//确认破损状态接口
+ // '开始清洗',//开始清洗接口
+ // '服务完成',
+ // ],
+ // [//换货
+ // '下单',
+ // '寄回商品',//快递接口
+ // '平台待收货',
+ // '客户待支付',
+ // '服务完成',
+ // ],
+ // [//退货
+ // '下单',
+ // '寄回商品',//快递接口
+ // '平台待收货',
+ // '服务完成',
+ // ],
],
order: {},
orderId: 0,
@@ -273,6 +313,11 @@
},
onLoad(agrs) {
this.orderId = agrs.id
+ },
+ onShow() {
+ this.getData()
+ },
+ onPullDownRefresh() {
this.getData()
},
methods: {
@@ -282,8 +327,17 @@
this.$api('orderOne', {
id: this.orderId
}, res => {
+ uni.stopPullDownRefresh()
if (res.code == 200) {
this.order = res.result
+
+ res.result.hotelOrderFlows.forEach((n, i) => {
+ if(this.order.status == n.value){
+ this.stepsCurrent = i
+ }
+ })
+
+ this.steps = res.result.hotelOrderFlows
}
})
},
@@ -293,7 +347,6 @@