Browse Source

add mall order

account
刘嘉炜 3 years ago
parent
commit
77977b1c18
  1. 1
      src/components/order_list/mall/mall.vue
  2. 8
      src/subpackage/order/pages/mall/detail/detail.vue
  3. 79
      src/subpackage/order/pages/mall/send_out/send_out.vue

1
src/components/order_list/mall/mall.vue

@ -112,7 +112,6 @@ export default {
width: 152upx;
height: 152upx;
border-radius: 10upx;
background-color: skyblue;
}
.rs-view{
@include textHide(3);

8
src/subpackage/order/pages/mall/detail/detail.vue

@ -32,7 +32,11 @@
<view>¥{{ e.product_price || '0' }}</view>
</view>
<view class="mi-spec">
<view>比赛专用黑色</view>
<view v-if="e.product_spec_multi_info&&e.product_spec_multi_info.spec_info&&e.product_spec_multi_info.spec_info.length">
<block v-for="(k, j) in e.product_spec_multi_info.spec_info" :key="j">
{{ k + ';' }}
</block>
</view>
<view>×{{ e.product_nums || 0 }}</view>
</view>
<view class="mi-amount">
@ -113,7 +117,7 @@ export default {
methods: {
toSendOut(){
let { orderInfo } = this;
util.routeTo(`/subpackage/order/pages/mall/send_out/send_out?order_no=${orderInfo.order_no}`, 'nT');
util.routeTo(`/subpackage/order/pages/mall/send_out/send_out?order_no=${orderInfo.order_no}&brand_id=${orderInfo.brand_id}`, 'nT');
},
payTypeTxt: util.order_pay_type_txt,
getInfo(order_no){

79
src/subpackage/order/pages/mall/send_out/send_out.vue

@ -46,7 +46,11 @@
<image mode="aspecfFill" :src="e.product_imgs"></image>
<view class="oi-info">
<view class="oi-tit">{{ e.product_name || '-' }}</view>
<view class="oi-spec">比赛专用黑色</view>
<view class="oi-spec" v-if="e.product_spec_multi_info&&e.product_spec_multi_info.spec_info&&e.product_spec_multi_info.spec_info.length">
<block v-for="(k, j) in e.product_spec_multi_info.spec_info" :key="j">
{{ k + ';' }}
</block>
</view>
</view>
</view>
</view>
@ -54,9 +58,9 @@
<view class="oh-box ow-warehouse" >
<view class="oh-tit"><text>*</text>发货仓库</view>
<picker :range="warehouseList" range-key="esh_name" @change="warehouseChange">
<picker :range="warehouseList" range-key="erp_name" @change="warehouseChange">
<view class="ow-picker">
<input disabled placeholder="请选择发货仓库" :value="selectedWarehouse.esh_name" />
<input disabled placeholder="请选择发货仓库" :value="selectedWarehouse.erp_name" />
<image mode="aspectFit" src="/subpackage/order/static/images/down_arrow.png"></image>
</view>
</picker>
@ -123,16 +127,18 @@
<view>无已发货</view>
</view>
<view class="package-list" v-else>
<view class="pl-item" v-for="i in 2" :key="i">
<view class="pi-tit">包裹1</view>
<view class="pi-express"><view>快递顺丰速递 SF1090317923085</view><view>复制</view></view>
<view class="pl-item" v-for="(e, i) in shippedLs" :key="i">
<view class="pi-tit">包裹{{ i+1 }}</view>
<view class="pi-express">
<view>快递{{ e.logistics_info.logistics_name || '-' }} {{ e.logistics_info.logistics_no || '-' }}</view>
<view @click="copyNo(e.logistics_info.logistics_no || '-')">复制</view></view>
<view class="pi-goods">
<view class="pg-item" v-for="i in 4" :key="i">
<image></image>
<view>克洛羽毛球</view>
<view class="pg-item" v-for="(k, j) in e.logistics_product_lite_list" :key="j">
<image mode="aspectFill" :src="k.product_imgs"></image>
<view>{{ k.product_name || '-' }}</view>
</view>
</view>
<view class="pi-total">10件商品</view>
<view class="pi-total">{{ e.logistics_product_lite_list.length || 0 }}件商品</view>
</view>
</view>
@ -162,8 +168,8 @@ export default {
//
shippedLs(){
let { orderInfo } = this;
let _list = orderInfo.product_order_goods || [];
return _list.filter(e=>e.product_logistics_end == 1) || [];
let _list = orderInfo.product_order_logistics_data || [];
return _list;
},
// id
selectedSendOutIds(){
@ -197,10 +203,14 @@ export default {
onLoad(options){
this.order_no = options.order_no || '';
this.getInfo(options.order_no);
this.getWarehouse({});
this.getWarehouse({ brand_id: options.brand_id });
this.getLogisticsCompanyLs({});
},
methods: {
//
copyNo(num){
uni.setClipboardData({ data: num })
},
logisticsChange(e){
let { logisticsCompanyLs } = this;
this.curlogisticsName = logisticsCompanyLs[e.detail.value] || '';
@ -217,12 +227,12 @@ export default {
this.getInfo(order_no);
},
confirmSendOutBtn: util.debounce(function(){
let { order_no, selectedSendOutIds, selectedWarehouse, sendOutMethod, curlogisticsName, logisticsOrderNum, sendOutRemark } = this;
let { order_no, selectedSendOutLs, selectedWarehouse, sendOutMethod, curlogisticsName, logisticsOrderNum, sendOutRemark } = this;
let _query = {
order_no,
ids: selectedSendOutIds,
esh_type: selectedWarehouse.esh_type,
esh_id: selectedWarehouse.esh_id,
ids: selectedSendOutLs.map(ele=>ele.product_cart_id),
esh_type: selectedWarehouse.erp_type,
esh_id: selectedWarehouse.erp_id,
logistics_type: sendOutMethod,
}
@ -233,27 +243,21 @@ export default {
if(sendOutMethod == 1)_query['mark'] = sendOutRemark;
this.shop2OrderLogistics(_query);
}, 300,true),
shop2OrderLogistics({
order_no = '',
ids = [],
esh_type = '',
esh_id = '',
logistics_type = '',
logistics_name = '',
logistics_no = '',
}){
shop2OrderLogistics(_query){
server.post({
url: ORDER_API.shop2OrderLogistics,
data: {
order_no, //
ids, // ID
esh_type, // 0/1 - /
esh_id, // / ID
logistics_type, // 0/1 - /
logistics_name, //
logistics_no, //
},
isDefaultGet: false
data: _query,
// {
// order_no, //
// ids, // ID
// esh_type, // 0/1 - /
// esh_id, // / ID
// logistics_type, // 0/1 - /
// logistics_name, //
// logistics_no, //
// mark, //
// },
isDefaultGet: false
})
.then(res=>{
if(res.data.code == 0){
@ -286,12 +290,13 @@ export default {
},
//
getWarehouse({
brand_id = '',
page_size = 9999,
page = 1,
}){
server.get({
url: ORDER_API.erpshList,
data: { page_size, page },
data: { brand_id, page_size, page },
failMsg: '加载仓库列表失败!'
})
.then(res=>{

Loading…
Cancel
Save