Browse Source

零售订单调整

tags/v1.1.30
张家华 3 years ago
parent
commit
914cb3ab8f
  1. 2
      src/components/order_list/retail/retail.vue
  2. 1
      src/subpackage/order/js/api.js
  3. 64
      src/subpackage/order/pages/retail/detail/detail.vue
  4. 2
      src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue
  5. 2
      src/subpackage/retail/pages/confirm_goods/confirm_goods.vue
  6. 13
      src/subpackage/retail/pages/confirm_order/confirm_order.vue
  7. 2
      src/subpackage/retail/pages/index/index.vue

2
src/components/order_list/retail/retail.vue

@ -33,7 +33,7 @@ export default {
getGoodsName(){
let { orderInfo } = this;
let _ls = orderInfo&&orderInfo.retail_order_goods || [];
let _str = _ls.map(e=>`${e.name}${e.spec}】x${e.nums}`).join(';');
let _str = _ls.map(e=>`${e.erp_retail_goods ? e.erp_retail_goods.goods_name : e.name}${e.spec}】x${e.nums}`).join(';');
if(_ls.length)_str += ';'
return _str
}

1
src/subpackage/order/js/api.js

@ -24,6 +24,7 @@ export const ORDER_API = {
rentballOrderEnd:`${ORIGIN}/admin/assistant/rentball/order/end`, // 租球机-结束计费
leaseOrderEnd:`${ORIGIN}/admin/stadium/leaseOrder/endBill`, // 租售柜-结束计费
retailOrderInfo:`${ORIGIN}/admin/erp/retailOrder/info`, // 订单管理-零售订单详情
retailOrderInfoRefundList: `${ORIGIN}/admin/stadium/order/refundList`, // 订单管理-零售订单详情退款列表
userMonthlyCardInfo:`${ORIGIN}/admin/userMonthlyCard/get`, // 详情用户年月卡-后台
ymCardInfoFace:`${ORIGIN}/upload/file/ym_card_face`, // 年月卡用户头像上传
ymCardInfoFaceSave:`${ORIGIN}/admin/userMonthlyCard/updateFace`, // 年月卡用户头像保存

64
src/subpackage/order/pages/retail/detail/detail.vue

@ -10,7 +10,7 @@
<view class="rh-name-line">
<view>
<view>微信昵称</view>
<text>{{ orderInfo.sys_optuname || '-' }}</text>
<text>{{ orderInfo.nickname || '-' }}</text>
</view>
<view :style="{color:getStatus(orderInfo.pay_status)==='已退款'?'#EA5061':'#9C9C9F'}">{{ getStatus(orderInfo.pay_status) }}</view>
</view>
@ -20,16 +20,16 @@
<text>{{ orderInfo.mobile || '-' }}</text>
</view>
</view>
<view class="rh-name-line">
<!-- <view class="rh-name-line">
<view>
<view>身份</view>
<text>{{ orderInfo.sys_optuname || '-' }}</text>
</view>
</view>
</view> -->
<view class="rh-name-line">
<view>
<view>下单途径</view>
<text>{{ orderInfo.operator || '-' }}</text>
<text>{{ orderInfo.retail_source || '-' }}</text>
</view>
</view>
</view>
@ -39,12 +39,12 @@
<view class="rgi-goods-ls">
<view class="rgl-item" v-for="(e, i) in orderInfo.retail_order_goods" :key="i">
<view class="rgl-item-desc">
<view>{{ e.name || '-' }}</view>
<view>{{ e.price || 0 }}</view>
<view>{{ e.erp_retail_goods ? (e.erp_retail_goods.goods_name || '-') : (e.name || '-') }}</view>
<view>{{ e.erp_retail_goods ? (e.erp_retail_goods.erp_goods ? e.erp_retail_goods.erp_goods.erp_goods_price : 0) : 0 }}</view>
</view>
<view class="rgl-item-sku">sku{{ e.sku || '-' }}</view>
<view class="rgl-item-sku">sku{{ e.erp_retail_goods ? (e.erp_retail_goods.erp_goods ? e.erp_retail_goods.erp_goods.erp_goods_sku : '-') : '-' }}</view>
<view class="rgl-item-type-spec">
<view>型号{{ e.unit || '-' }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;规格{{ e.spec || '-' }}</view>
<view>型号{{ e.erp_retail_goods ? (e.erp_retail_goods.erp_goods ? e.erp_retail_goods.erp_goods.erp_goods_type : '-') : '-' }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;规格{{ e.spec || '-' }}</view>
<text>x{{ e.nums || 0 }}</text>
</view>
<view v-if="orderInfo.retail_order_goods.length - 1 == i ? false : true" class="rgl-item-bottom-line"></view>
@ -58,7 +58,7 @@
</view>
<view class="rc-total-amount-line">
<view>积分抵扣</view>
<text>{{ orderInfo.deduction_integral || 0 }}</text>
<text>{{ orderInfo.deduction_amount || 0 }}</text>
</view>
<view class="rc-total-amount-line">
<view>折扣金额</view>
@ -74,17 +74,36 @@
<!-- 订单编号 -->
<view class="rpi-tit">支付详情</view>
<p-line :keyname="'订单编号'" :value="orderInfo.order_no || '-'" isbtn></p-line>
<p-line :keyname="'支付方式'" :value="payTypeTxt(orderInfo.pay_type, orderInfo.card_no)"></p-line>
<!-- <p-line :keyname="'支付方式'" :value="payTypeTxt(orderInfo.pay_type, orderInfo.card_no)"></p-line> -->
<p-line :keyname="'支付方式'" :value="orderInfo.extension ? orderInfo.extension.pay_type_text || '-' : '-'"></p-line>
<p-line :keyname="'支付时间'" :value="orderInfo.pay_time || '-'"></p-line>
</view>
<view v-if="orderInfo.refunds&&orderInfo.refunds.length">
<!-- <view v-if="orderInfo.refunds&&orderInfo.refunds.length">
<view class="rc-refund-info" v-for="(item, index) in orderInfo.refunds" :key="index">
<view class="rpi-tit">退款信息{{ index + 1 }}</view>
<p-line :keyname="'退款金额:'" :value="item.refund_amount ? '¥' + item.refund_amount : '0'"></p-line>
<p-line :keyname="'退款金额:'" :value="item.refund_amount ? '¥' + item.refund_amount : '0'"></p-line>
<p-line :keyname="'退款单号:'" :value="item.refund_no || '-'"></p-line>
<p-line :keyname="'退款时间:'" :value="item.refund_time || '-'"></p-line>
<p-line :keyname="'退款原因:'" :value="item.refund_reason || '-'"></p-line>
</view>
</view> -->
<!-- <view v-if="orderInfo.refund_no">
<view class="rc-refund-info">
<view class="rpi-tit">退款信息</view>
<p-line :keyname="'退款金额:'" :value="orderInfo.refund_amount ? '¥' + orderInfo.refund_amount : '¥0'"></p-line>
<p-line :keyname="'退款单号:'" :value="orderInfo.refund_no || '-'"></p-line>
<p-line :keyname="'退款时间:'" :value="orderInfo.refund_time || '-'"></p-line>
<p-line :keyname="'退款原因:'" :value="orderInfo.refund_reason || '商家主动退款'"></p-line>
</view>
</view> -->
<view v-if="refundList.length">
<view class="rc-refund-info" v-for="(item, index) in refundList" :key="index">
<view class="rpi-tit">退款信息{{ index + 1 }}</view>
<p-line :keyname="'退款金额:'" :value="item.refund_amount ? '¥' + item.refund_amount : '¥0'"></p-line>
<p-line :keyname="'退款单号:'" :value="item.refund_no || '-'"></p-line>
<p-line :keyname="'退款时间:'" :value="item.refund_time || '-'"></p-line>
<p-line :keyname="'退款原因:'" :value="item.refund_reason || '商家主动退款'"></p-line>
</view>
</view>
</view>
</template>
@ -95,6 +114,7 @@ import server from '../../../js/server';
import util from '../../../../../utils/util';
import s_line from '../../../components/s_line/s_line.vue';
import p_line from '../../../components/p_line/p_line.vue';
import { mapState } from 'vuex';
export default {
components: {
's-line': s_line,
@ -102,9 +122,13 @@ export default {
},
data(){
return {
orderInfo: {}
orderInfo: {},
refundList: []
}
},
computed:{
...mapState([ 'brandInfo',])
},
onLoad(options){
this.getOrderInfo(options.order_no);
},
@ -131,17 +155,25 @@ export default {
util.showLoad();
server.get({
url: ORDER_API.retailOrderInfo,
data: { order_no },
data: { order_no, brand_id: this.brandInfo.brand.id },
failMsg: '加载失败!'
})
.then(res=>{
util.hideLoad();
this.orderInfo = res || {};
// this.orderInfo.refunds = [
// { refund_amount: this.orderInfo.refund_amount, refund_no: this.orderInfo.refund_no, refund_time: this.orderInfo.refund_time, refund_reason: this.orderInfo.refund_reason },
// { refund_amount: this.orderInfo.refund_amount, refund_no: this.orderInfo.refund_no, refund_time: this.orderInfo.refund_time, refund_reason: this.orderInfo.refund_reason }
// ];
})
server.get({
url: ORDER_API.retailOrderInfoRefundList,
data: { order_no, brand_id: this.brandInfo.brand.id },
failMsg: '加载失败!'
})
.then(res=>{
util.hideLoad();
this.refundList = res.list;
});
});
},
}

2
src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue

@ -15,7 +15,7 @@
<view class="item-right">
<view class="item-right-top">
<view class="item-right-name">{{ item.goods_name }}</view>
<view class="item-right-spec">{{ item.erp_goods.erp_goods_specs }}</view>
<view class="item-right-spec">{{ `${item.erp_goods.erp_goods_specs}/${item.erp_goods.erp_goods_type}/${item.erp_goods.erp_goods_sku}` }}</view>
</view>
<view class="item-right-price-count">

2
src/subpackage/retail/pages/confirm_goods/confirm_goods.vue

@ -16,7 +16,7 @@
<view class="item-right-top">
<view class="item-right-name">{{ item.goods_name }}</view>
<view class="item-right-spec">
<view>{{ item.erp_goods.erp_goods_specs }}</view>
<view>{{ `${item.erp_goods.erp_goods_specs}/${item.erp_goods.erp_goods_type}/${item.erp_goods.erp_goods_sku}` }}</view>
<view>x{{ item.count }}</view>
</view>
</view>

13
src/subpackage/retail/pages/confirm_order/confirm_order.vue

@ -116,8 +116,10 @@
let goods_data = [];
for (let i = 0; i < this.cartListFinal.length; ++i) {
goods_data.push({
id: this.cartListFinal[i].erp_goods.erp_goods_cid,
name: this.cartListFinal[i].erp_goods.erp_goods_name,
// id: this.cartListFinal[i].erp_goods.erp_goods_cid,
id: this.cartListFinal[i].id,
// name: this.cartListFinal[i].erp_goods.erp_goods_name,
name: this.cartListFinal[i].goods_name,
price: this.cartListFinal[i].erp_goods.erp_goods_price,
nums: this.cartListFinal[i].count,
unit: this.cartListFinal[i].erp_goods.erp_goods_unit,
@ -130,9 +132,10 @@
data: {
goods_data,
brand_id: _this.brandInfo.brand.id, store_id: _this.curStore.id,
amount: _this.totalPrice, pay_type: info.type,
amount: parseFloat(_this.totalPrice), pay_type: info.type,
other_pay_type: info.inputValue,
card_no: info.cardNo
card_no: info.cardNo,
mark: ''
},
isDefaultGet: false,
failMsg: '出库失败!'
@ -158,7 +161,7 @@
},
//
confirmPay() {
let info = { type: 0, inputValue: "default", cardNo: "default" };
let info = { type: 0, inputValue: "", cardNo: "" };
switch (this.curChoose.name) {
case "微信支付": info.type = 0; break;

2
src/subpackage/retail/pages/index/index.vue

@ -40,7 +40,7 @@
<view class="item-right">
<view class="item-right-top">
<view class="item-right-name">{{ item.goods_name }}</view>
<view class="item-right-spec">{{ item.erp_goods.erp_goods_specs }}</view>
<view class="item-right-spec">{{ `${item.erp_goods.erp_goods_specs}/${item.erp_goods.erp_goods_type}/${item.erp_goods.erp_goods_sku}` }}</view>
<!-- <view class="item-right-special">特价</view> -->
</view>

Loading…
Cancel
Save