浏览代码

修改售后详情

pangqijun 1 年之前
父节点
当前提交
cfb5a7b16e
共有 2 个文件被更改,包括 35 次插入8 次删除
  1. 6 0
      api/groupon.js
  2. 29 8
      pages/users/user_return_list/module/mescrollUni-item.vue

+ 6 - 0
api/groupon.js

@@ -19,6 +19,12 @@ export function reasonList() {
 
 //获取售后原因列表
 export function afterSalesSubmit(data) {
+    return request.post("/v1/after-sales/bindLogisticsNo",data);
+}
+
+
+//绑定物流单号
+export function bindLogisticsNo(data) {
     return request.post("/v1/after-sales/submit",data);
 }
 

+ 29 - 8
pages/users/user_return_list/module/mescrollUni-item.vue

@@ -64,27 +64,27 @@
       </view>
 
 		</view>
-
-    <u-popup :show="show" :round="10" mode="top" @close="close" @open="open">
+    <u-popup :show="show" :round="10" mode="center" @close="close">
       <view>
         <u--input
-            placeholder="请输入内容"
+            placeholder="请输入物流单号"
             border="surround"
             clearable
         ></u--input>
-        <u-button class="custom-style" text="提交"></u-button>
+        <u-button class="custom-style" :value="wlNo" text="提交" @click="bindLogistics"></u-button>
       </view>
     </u-popup>
-
 	</mescroll-uni>
 
 
+
 </template>
 
 <script>
 	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
 	import MescrollMoreItemMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mixins/mescroll-more-item.js"
-	import {getUserAfterSalesList} from '@/api/groupon.js'
+	import {getUserAfterSalesList, bindLogisticsNo} from '@/api/groupon.js'
+
 	export default {
 		mixins: [MescrollMixin, MescrollMoreItemMixin], // 注意此处还需使用MescrollMoreItemMixin (必须写在MescrollMixin后面)
 		components: {
@@ -94,6 +94,7 @@
 			return {
         show: false,
         wlNo: '',
+        afterSalesNo: '',
 				downOption: {
 					auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback)
 				},
@@ -139,11 +140,30 @@
 		},
 
 		methods: {
-      bindLogisticsShow(no) {
-        this.wlNo = no;
+      bindLogisticsShow(item) {
+        this.afterSalesNo = item;
         this.show = true;
       },
 
+      bindLogistics() {
+        let that = this;
+        console.log(that.wlNo)
+        if (that.wlNo.trim().length < 1) {
+          return that.$util.Tips({
+            title: '请输入物流单号'
+          });
+        }
+        bindLogisticsNo({
+          afterSalesNo: '',
+          logisticsNo: that.wlNo
+        }).then(res => {
+          return that.$util.Tips({
+            title: '绑定成功',
+            icon: 'success'
+          });
+        })
+      },
+
 			goDetail(item){
 				uni.navigateTo({
 					url:'/pages/users/user_return_list/detail/detail?id='+item.id
@@ -222,6 +242,7 @@
   }
 
   .custom-style{
+    background-color: #ff0000;
     color: #ff0000;
   }
 </style>