瀏覽代碼

修改确认回款

zs 1 年之前
父節點
當前提交
98492b0bbe
共有 1 個文件被更改,包括 36 次插入3 次删除
  1. 36 3
      pagesMy/record/index.vue

+ 36 - 3
pagesMy/record/index.vue

@@ -48,8 +48,11 @@
 								</view>
 							</view>
 						</view>
-						<view class="bottom" v-if="item.status=='-7'||item.status=='-8'">
-							<button size="mini" type="default" @tap.stop="toExam(item)">重新申请回款</button>
+						<view class="bottom">
+							<button v-if="item.status=='-7'||item.status=='-8'" size="mini" type="default"
+								@tap.stop="toExam(item)">重新申请回款</button>
+							<button v-if="item.status=='8'||item.status=='9'" size="mini" type="default"
+								@tap.stop="toCollection(item)">确认回款</button>
 						</view>
 					</view>
 					<view class="is_bottom" v-if="is_bottom">
@@ -210,7 +213,37 @@
 				that.clearPage();
 				that.search();
 			},
-			// 审批
+			// 回款确认
+			async toCollection(item) {
+				const that = this;
+				let user = that.user;
+				let obj = {
+					status: '10'
+				};
+				uni.showModal({
+					title: '提示',
+					content: '确定回款成功吗?',
+					success: async function(res) {
+						if (res.confirm) {
+							const res = await that.$api(`/OrderDetail/${item._id}`, 'POST', obj);
+							if (res.errcode == '0') {
+								uni.showToast({
+									title: '维护信息成功',
+									icon: 'none'
+								})
+								that.clearPage()
+								that.search()
+							} else {
+								uni.showToast({
+									title: res.errmsg,
+									icon: 'none'
+								})
+							}
+						}
+					}
+				});
+			},
+			// 重新申请回款
 			async toExam(item) {
 				const that = this;
 				let user = that.user;