Commit 154148656c61ab60d8d6af3f2299f2828a8fdba5

Authored by abson
1 parent e783c7a9

专享礼包单品核销

pages/giftpack/giftpacklist/giftpacklist.js
@@ -340,13 +340,17 @@ Page({ @@ -340,13 +340,17 @@ Page({
340 qc_com.open(obj) 340 qc_com.open(obj)
341 }, 341 },
342 //获取核销码 342 //获取核销码
343 - getcode: function() { 343 + getcode: function(e) {
344 var th = this; 344 var th = this;
345 var orderSn = th.data.orderSn; //订单号 345 var orderSn = th.data.orderSn; //订单号
  346 + let codeId=e.currentTarget.dataset.codeid;
346 var json = { 347 var json = {
347 "storeId": a.stoid, 348 "storeId": a.stoid,
348 - "orderSn": orderSn  
349 - }; 349 + "orderSn": orderSn,
  350 + }
  351 + if(codeId && codeId !=="" ){
  352 + json.id=codeId
  353 + }
350 var data = JSON.stringify(json); 354 var data = JSON.stringify(json);
351 var url = th.data.url + "/api/weshop/marketing/gift/goods/verify/code/get"; //预约接口地址 355 var url = th.data.url + "/api/weshop/marketing/gift/goods/verify/code/get"; //预约接口地址
352 getApp().request.json_post(url, json, 356 getApp().request.json_post(url, json,
pages/giftpack/giftpacklist/giftpacklist.wxml
@@ -47,7 +47,7 @@ @@ -47,7 +47,7 @@
47 <view class="box_ware_title data-v-3a5b7e36"> 47 <view class="box_ware_title data-v-3a5b7e36">
48 <text class="data-v-3a5b7e36">礼包内容</text> 48 <text class="data-v-3a5b7e36">礼包内容</text>
49 </view> 49 </view>
50 - <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="index"> 50 + <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="Id">
51 <view wx:if="{{item.couponName!=undefined}}" class="box_ware_box data-v-3a5b7e36"> 51 <view wx:if="{{item.couponName!=undefined}}" class="box_ware_box data-v-3a5b7e36">
52 <view class="box_ware_img data-v-3a5b7e36"> 52 <view class="box_ware_img data-v-3a5b7e36">
53 <block wx:if="{{item.lbType==1}}"> 53 <block wx:if="{{item.lbType==1}}">
@@ -73,15 +73,21 @@ @@ -73,15 +73,21 @@
73 <view class="box_ware_item_price data-v-3a5b7e36"> 73 <view class="box_ware_item_price data-v-3a5b7e36">
74 <text class="data-v-3a5b7e36"></text> 74 <text class="data-v-3a5b7e36"></text>
75 </view> 75 </view>
76 - <view class="box_ware_item_qty data-v-3a5b7e36"> 76 + <view class="box_ware_item_qty data-v-3a5b7e36 flex">
77 <text class="data-v-3a5b7e36 ellipsis-1"> 77 <text class="data-v-3a5b7e36 ellipsis-1">
78 - {{"数量:"+item.num}}  
79 - </text> 78 + {{"数量:"+item.num}}
  79 + </text>
  80 + <text style="margin-left:10rpx" wx:if="{{item.useState}}">
  81 + 已核销
  82 + </text>
  83 + <text style="margin-left:10rpx" wx:else>
  84 + 未核销
  85 + </text>
80 </view> 86 </view>
81 <view class="box_ware_code data-v-3a5b7e36"> 87 <view class="box_ware_code data-v-3a5b7e36">
82 <!-- <block wx:if="{{c_state==0}}"> --> 88 <!-- <block wx:if="{{c_state==0}}"> -->
83 <block wx:if="{{isBuy==0&item.lbType==1}}"> 89 <block wx:if="{{isBuy==0&item.lbType==1}}">
84 - <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" lazy-load="true" bindtap="getcode" class="data-v-3a5b7e36"></image> 90 + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" lazy-load="true" bindtap="getcode" data-codeId="{{item.Id}}" class="data-v-3a5b7e36"></image>
85 </block> 91 </block>
86 <!-- </block> --> 92 <!-- </block> -->
87 <!-- 93 <!--
pages/user/plus/plus.js
@@ -289,7 +289,7 @@ Page({ @@ -289,7 +289,7 @@ Page({
289 select_serviceman(e) { 289 select_serviceman(e) {
290 let StaffNo = e.currentTarget.dataset.staffno; 290 let StaffNo = e.currentTarget.dataset.staffno;
291 let {req_data,req} = this.data; 291 let {req_data,req} = this.data;
292 - if (StaffNo || StaffNo !== "") { 292 + if (StaffNo && StaffNo !== "") {
293 req_data.staffNo = StaffNo; 293 req_data.staffNo = StaffNo;
294 req.serviceman = StaffNo; 294 req.serviceman = StaffNo;
295 }; 295 };