|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <view class="sales-edit-wrap">
|
|
|
+ <view class="sales-edit-wrap flex flex_column">
|
|
|
<!-- 基础信息 -->
|
|
|
<view class="sales-info-con">
|
|
|
<u-section @click="infoModal=true" title="基础信息" sub-title="查看更多" :line-color="$config('primaryColor')"></u-section>
|
|
@@ -13,17 +13,18 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 产品列表 -->
|
|
|
- <view class="sales-product-con">
|
|
|
+ <view class="sales-product-con flex flex_column">
|
|
|
+ <view>
|
|
|
<!-- 标题 -->
|
|
|
<view class="sales-product-header border-b flex align_center justify_between">
|
|
|
<u-section title="产品列表" :right="pageData.type=='edit'" :line-color="$config('primaryColor')">
|
|
|
<template slot="right" v-if="pageData.type=='edit'">
|
|
|
<view class="sales-product-operation">
|
|
|
- <u-button @click="discountModal=true" size="mini" :hair-line="false" plain type="primary" hover-class="none">
|
|
|
+ <u-button @click="discountModal=true" size="mini" :hair-line="false" shape="circle" plain type="primary" hover-class="none">
|
|
|
打折
|
|
|
<text v-if="detailData&&detailData.discountAmount">:¥{{detailData.discountAmount}}</text>
|
|
|
</u-button>
|
|
|
- <u-button @click="handleProduct" size="mini" :hair-line="false" plain type="primary" hover-class="none">选择产品</u-button>
|
|
|
+ <u-button @click="handleProduct" size="mini" :hair-line="false" shape="circle" :custom-style="customBtnStyle" type="primary" hover-class="none">选择产品</u-button>
|
|
|
</view>
|
|
|
</template>
|
|
|
</u-section>
|
|
@@ -46,9 +47,10 @@
|
|
|
</view>
|
|
|
<text class="sales-total-btn" @click="toggle=!toggle" :style="{color: $config('primaryColor')}">{{ toggle ? '收起' : '展开' }}</text>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
<!-- 产品列表 -->
|
|
|
<view class="sales-list-box">
|
|
|
- <scroll-view class="sales-list-con" :style="{height: scrollH+'upx'}" scroll-y @scrolltolower="onreachBottom">
|
|
|
+ <scroll-view class="sales-list-con" :style="{height:scrollH+'upx'}" scroll-y @scrolltolower="onreachBottom">
|
|
|
<view class="sales-list-item border-b flex align_center justify_between" v-for="(item, index) in listData" :key="item.id">
|
|
|
<view class="font_13 flex_1 flex justify_between" @click="handleEdit(item)">
|
|
|
<view class="pimgs">
|
|
@@ -64,32 +66,36 @@
|
|
|
<view class="sales-item-txt flex align_center justify_between">
|
|
|
<view class="sales-item-priceInfo">
|
|
|
<view :style="{color: $config('errorColor'), display: 'inline-block'}">¥<text style="font-size: 30upx;">{{toThousands(item.price||0, 2)}}</text></view>
|
|
|
- <text style="display: inline-block;margin: 0 10upx;">*</text>
|
|
|
+ <text style="display: inline-block;margin: 0 10upx;">X</text>
|
|
|
<text style="font-size: 30upx;">{{toThousands(item.qty||0)}}</text>
|
|
|
{{item.productUnit}}
|
|
|
</view>
|
|
|
<view class="sales-item-price">¥{{toThousands(item.totalAmount||0, 2)}}</view>
|
|
|
</view>
|
|
|
- <view class="sales-item-price" v-if="detailData&&detailData.discountAmount">折后¥{{toThousands(item.discountedAmount||0, 2)}}</view>
|
|
|
+ <view class="sales-item-price" v-if="detailData&&detailData.discountAmount">折后:¥{{toThousands(item.discountedAmount||0, 2)}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="btn-box">
|
|
|
- <u-icon v-if="pageData.type=='edit'" @click="handleDel(item)" name="trash-fill" :color="$config('errorColor')" size="34"></u-icon>
|
|
|
+ <view class="btn-box" style="padding-right: 0;">
|
|
|
+ <!-- <u-icon v-if="pageData.type=='edit'" @click="handleDel(item)" name="trash" :color="$config('errorColor')" size="40"></u-icon> -->
|
|
|
+ <u-button v-if="pageData.type=='edit'" @click="handleDel(item)" size="mini" :hair-line="false" shape="circle" plain type="error" hover-class="none">删除</u-button>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view v-if="listData && listData.length == 0">
|
|
|
<u-empty :text="noDataText" mode="list" :img-width="200" :margin-top="30"></u-empty>
|
|
|
</view>
|
|
|
+ <view style="padding: 20upx;">
|
|
|
+ <u-loadmore v-if="totalNum>listData.length || status=='loading'" :status="status" />
|
|
|
+ </view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 操作按钮 -->
|
|
|
<view class="sales-btn-box">
|
|
|
<view v-if="pageData.type=='edit'" class="flex align_center justify_between">
|
|
|
- <u-button class="handle-btn" size="medium" hover-class="none" @click="handleDel()">整单删除</u-button>
|
|
|
- <u-button class="handle-btn search-btn" @click="handleSubmit" size="medium" hover-class="none" :custom-style="customBtnStyle">提交</u-button>
|
|
|
+ <u-button class="handle-btn" shape="circle" size="medium" hover-class="none" @click="handleDel()">整单删除</u-button>
|
|
|
+ <u-button class="handle-btn search-btn" shape="circle" @click="handleSubmit" size="medium" hover-class="none" :custom-style="customBtnStyle">提交</u-button>
|
|
|
</view>
|
|
|
- <u-button v-if="pageData.type=='detail' && (detailData&&detailData.billStatus !== 'CANCEL' && detailData.billStatus !== 'FINISH' && detailData.billStatus != 'WAIT_OUT_WAREHOUSE')" class="edit-btn" @click="goPage" size="medium" hover-class="none" :custom-style="customBtnStyle">编辑</u-button>
|
|
|
+ <u-button v-if="pageData.type=='detail' && (detailData&&detailData.billStatus !== 'CANCEL' && detailData.billStatus !== 'FINISH' && detailData.billStatus != 'WAIT_OUT_WAREHOUSE')" class="edit-btn" shape="circle" @click="goPage" size="medium" hover-class="none" :custom-style="customBtnStyle">编辑</u-button>
|
|
|
</view>
|
|
|
<!-- 基础信息 -->
|
|
|
<orderInfoModal :openModal="infoModal" :infoData="detailData" @close="infoModal=false" />
|
|
@@ -118,7 +124,7 @@
|
|
|
type: 'edit',
|
|
|
data: null
|
|
|
},
|
|
|
- toggle: false,
|
|
|
+ toggle: true,
|
|
|
toThousands,
|
|
|
customBtnStyle: { // 自定义按钮样式
|
|
|
borderColor: this.$config('primaryColor'),
|
|
@@ -129,6 +135,7 @@
|
|
|
pageNo: 1,
|
|
|
pageSize: 6,
|
|
|
totalNum: 0,
|
|
|
+ status: 'loadmore',
|
|
|
noDataText: '暂无数据',
|
|
|
theme: '',
|
|
|
scrollH: 916,
|
|
@@ -175,6 +182,7 @@
|
|
|
pageSize: this.pageSize,
|
|
|
salesBillSn: this.pageData.data && this.pageData.data.salesBillSn
|
|
|
}
|
|
|
+ this.status = "loading"
|
|
|
salesDetailList(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
if(res.data && res.data.list){
|
|
@@ -197,6 +205,7 @@
|
|
|
this.totalNum = 0
|
|
|
this.noDataText = res.message
|
|
|
}
|
|
|
+ this.status = "loadmore"
|
|
|
})
|
|
|
},
|
|
|
// scroll-view到底部加载更多
|
|
@@ -356,6 +365,7 @@
|
|
|
}else{
|
|
|
this.detailData = null
|
|
|
}
|
|
|
+ this.toggle = false
|
|
|
})
|
|
|
},
|
|
|
changeScrollH(){
|
|
@@ -393,17 +403,9 @@
|
|
|
.border-b{
|
|
|
border-bottom: 1px solid #e4e7ed;
|
|
|
}
|
|
|
- .u-line{
|
|
|
- display: inline-block;
|
|
|
- width: 8upx;
|
|
|
- height: 40upx;
|
|
|
- background-color: red;
|
|
|
- vertical-align: bottom;
|
|
|
- margin: 0 20upx 0 0;
|
|
|
- }
|
|
|
.sales-info-con{
|
|
|
background-color: #fff;
|
|
|
- margin-bottom: 20upx;
|
|
|
+ margin-bottom: 6upx;
|
|
|
padding: 0 20upx;
|
|
|
>view{
|
|
|
padding: 14upx 0;
|
|
@@ -422,8 +424,10 @@
|
|
|
.sales-product-con{
|
|
|
background-color: #fff;
|
|
|
padding: 0 20upx;
|
|
|
+ flex-grow: 1;
|
|
|
.sales-product-header{
|
|
|
padding: 14upx 0;
|
|
|
+ height: 80upx;
|
|
|
.sales-product-operation{
|
|
|
button{
|
|
|
margin: 0 0 0 10upx;
|
|
@@ -450,6 +454,7 @@
|
|
|
}
|
|
|
}
|
|
|
.sales-list-box{
|
|
|
+ flex-grow: 1;
|
|
|
.sales-list-con{
|
|
|
.sales-list-item{
|
|
|
padding: 20upx 0;
|
|
@@ -458,8 +463,8 @@
|
|
|
position: relative;
|
|
|
.sign{
|
|
|
position: absolute;
|
|
|
- right: -14upx;
|
|
|
- top: -14upx;
|
|
|
+ right: -2upx;
|
|
|
+ top: -2upx;
|
|
|
color: #fff;
|
|
|
border-radius: 50%;
|
|
|
width: 40upx;
|
|
@@ -497,7 +502,7 @@
|
|
|
}
|
|
|
.sales-btn-box{
|
|
|
background-color: #fff;
|
|
|
- padding: 16upx 20upx 12upx;
|
|
|
+ padding: 12upx 50upx;
|
|
|
.handle-btn{
|
|
|
width: 47%;
|
|
|
}
|