|
@@ -35,7 +35,7 @@
|
|
|
<view>
|
|
|
总款数:<text class="sales-total-num" :style="{color: $config('warringColor')}">{{detailData && (detailData.totalCategory || detailData.totalCategory==0) ? toThousands(detailData.totalCategory) : '--'}}</text>;总数量:<text class="sales-total-num" :style="{color: $config('warringColor')}">{{detailData && (detailData.totalQty || detailData.totalQty==0) ? toThousands(detailData.totalQty) : '--'}}</text>;总售价:<text class="sales-total-num" :style="{color: $config('warringColor')}">¥{{detailData && (detailData.totalAmount || detailData.totalAmount==0) ? toThousands(detailData.totalAmount, 2) : '--'}}</text>;
|
|
|
</view>
|
|
|
- <view>
|
|
|
+ <view v-if="detailData&&detailData.payOnlineFlag!=1">
|
|
|
折扣金额:<text class="sales-total-num" :style="{color: $config('warringColor')}">¥{{detailData && (detailData.discountAmount || detailData.discountAmount==0) ? toThousands(detailData.discountAmount, 2) : '--'}}</text>;折扣:<text class="sales-total-num" :style="{color: $config('warringColor')}">{{detailData && (detailData.discountRate || detailData.discountRate==0) ? detailData.discountRate+'%' : '--'}}</text>;折后总售价:<text class="sales-total-num" :style="{color: $config('warringColor')}">¥{{detailData && (detailData.discountedAmount || detailData.discountedAmount==0) ? toThousands(detailData.discountedAmount, 2) : '--'}}</text>;
|
|
|
</view>
|
|
|
<view>
|
|
@@ -55,14 +55,19 @@
|
|
|
<view class="font_13 flex_1 flex justify_between">
|
|
|
<view class="pimgs">
|
|
|
<u-image :src="item.productMainImage?item.productMainImage:`../../static/${$config('themePath')}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
|
|
|
- <view v-if="(isOwerEdit && item.oosFlag == 1) || (isOwerEdit && item.oosFlag == 1)" class="sign" :style="{backgroundColor: $config('errorColor')}">急</view>
|
|
|
- <view v-if="item.price < item.cost" class="sign" :style="{backgroundColor: $config('warringColor')}">亏</view>
|
|
|
- <view v-if="!isOwerEdit&&!isAudit&&(!item.currentStockQty || item.currentStockQty < item.qty)" class="sign" :style="{backgroundColor: $config('errorColor')}">缺</view>
|
|
|
</view>
|
|
|
<view class="sales-item-main flex_1">
|
|
|
- <view class="sales-item-name">{{item.productName || '--'}}</view>
|
|
|
+ <view class="sales-item-name">
|
|
|
+ <view v-if="(isOwerEdit && item.oosFlag == 1) || (isOwerEdit && item.oosFlag == 1)" class="sign" :style="{backgroundColor: $config('errorColor')}">急</view>
|
|
|
+ <view v-if="item.price < item.cost" class="sign" :style="{backgroundColor: $config('warringColor')}">亏</view>
|
|
|
+ <view v-if="!isOwerEdit&&!isAudit&&(!item.currentStockQty || item.currentStockQty < item.qty)" class="sign" :style="{border:setColor.borderColor,backgroundColor:setColor.bgColor,color:setColor.fontColor}">缺</view>
|
|
|
+ <view class="sign" v-if="detailData&&detailData.payOnlineFlag==1&&item.promoProductType=='GIFT_PRODUCT'" :style="{border:setColor.borderColor1,backgroundColor:setColor.bgColor1,color:setColor.fontColor1}">赠</view>
|
|
|
+ <view class="sign" v-if="detailData&&detailData.payOnlineFlag==1&&item.promoProductType=='TICKET_PRODUCT'" :style="{border:setColor.borderColor2,backgroundColor:setColor.bgColor2,color:setColor.fontColor2}">券</view>
|
|
|
+ <view class="sign" v-if="detailData&&detailData.payOnlineFlag==1&&item.promoProductType=='SPECIAL_PRODUCT'" :style="{border:setColor.borderColor3,backgroundColor:setColor.bgColor3,color:setColor.fontColor3}">特</view>
|
|
|
+ <view class="nameInfo">{{item.productName || '--'}}</view>
|
|
|
+ </view>
|
|
|
<view class="sales-item-txt">{{item.productCode || '--'}}</view>
|
|
|
- <view class="sales-item-txt color_6" style="font-size: 24upx;" v-if="item.warehouseName">{{item.warehouseName}} > {{item.warehouseLocationName}}</view>
|
|
|
+ <view class="sales-item-txt color_6" style="font-size: 24upx;" v-if="item.warehouseEntity&&item.warehouseEntity.name || item.warehouseLocationEntity&&item.warehouseLocationEntity.name">{{item.warehouseEntity&&item.warehouseEntity.name}} > {{item.warehouseLocationEntity&&item.warehouseLocationEntity.name}}</view>
|
|
|
<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>
|
|
@@ -148,6 +153,20 @@
|
|
|
productInfo: null, // 编辑产品需要的参数
|
|
|
editInfo: null, // 添加/编辑 提交的值
|
|
|
commonType: 1, // 公共弹框类型 1删除产品,2删除销售单,3编辑产品时库存不足
|
|
|
+ setColor:{
|
|
|
+ borderColor:'1upx solid #E70012',
|
|
|
+ fontColor:'#E70012',
|
|
|
+ bgColor:'rgba(236,0,18,.2)',
|
|
|
+ borderColor1:'1upx solid #13C442',
|
|
|
+ fontColor1:'#13C442',
|
|
|
+ bgColor1:'rgba(19,196,66,.2)',
|
|
|
+ borderColor2:'1upx solid #FF5500',
|
|
|
+ fontColor2:'#FF5500',
|
|
|
+ bgColor2:'rgba(255,85,0,.2)',
|
|
|
+ borderColor3:'1upx solid #f3bb12',
|
|
|
+ fontColor3:'#f3bb12',
|
|
|
+ bgColor3:'rgba(243,187,18,.2)'
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
onLoad(opt) {
|
|
@@ -157,6 +176,11 @@
|
|
|
type: opt.pageType || 'edit',
|
|
|
data: opt.data ? JSON.parse(opt.data) : null
|
|
|
}
|
|
|
+ if(opt.data&&JSON.parse(opt.data).payOnlineFlag==1){
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
+ title: '线上支付订单' // 页面标题为“新的页面标题”
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
this.init()
|
|
|
// 监听整改完成后刷新事件
|
|
@@ -184,44 +208,37 @@
|
|
|
getList(pageNo){
|
|
|
const _this = this
|
|
|
if (pageNo) {
|
|
|
- this.pageNo = pageNo
|
|
|
+ _this.pageNo = pageNo
|
|
|
}
|
|
|
let params = {
|
|
|
- pageNo: this.pageNo,
|
|
|
- pageSize: this.pageSize,
|
|
|
- salesBillSn: this.pageData.data && this.pageData.data.salesBillSn
|
|
|
+ pageNo: _this.pageNo,
|
|
|
+ pageSize:_this.pageSize,
|
|
|
+ salesBillSn: _this.pageData.data && _this.pageData.data.salesBillSn
|
|
|
}
|
|
|
- this.status = "loading"
|
|
|
+ _this.status = "loading"
|
|
|
salesDetailList(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
if(res.data && res.data.list){
|
|
|
res.data.list.map(item => {
|
|
|
- const productCode = (item.productEntity && item.productEntity.code) || (item.dealerProductEntity && item.dealerProductEntity.code)
|
|
|
- const productName = (item.productEntity && item.productEntity.name) || (item.dealerProductEntity && item.dealerProductEntity.name)
|
|
|
- const productOrigCode = (item.productEntity && item.productEntity.origCode) || (item.dealerProductEntity && item.dealerProductEntity.origCode) || '--'
|
|
|
- const productOrigUnit = (item.productEntity && item.productEntity.unit) || (item.dealerProductEntity && item.dealerProductEntity.unit)
|
|
|
- item.productCode = productCode || '--'
|
|
|
- item.productName = productName || '--'
|
|
|
- item.productOrigCode = productOrigCode || '--'
|
|
|
- item.productUnit = productOrigUnit || '--'
|
|
|
- item.warehouseName = item.warehouseEntity && item.warehouseEntity.name || '--'
|
|
|
- item.warehouseLocationName = item.warehouseLocationEntity && item.warehouseLocationEntity.name || '--'
|
|
|
+ item.productName = item.productEntity && item.productEntity.name || item.dealerProductEntity && item.dealerProductEntity.name
|
|
|
+ item.productCode = item.productEntity && item.productEntity.code || item.dealerProductEntity && item.dealerProductEntity.code
|
|
|
+ item.productUnit = item.productEntity && item.productEntity.unit || item.dealerProductEntity && item.dealerProductEntity.unit
|
|
|
})
|
|
|
- if(this.pageNo>1){
|
|
|
- this.listData = this.listData.concat(res.data && res.data.list || [])
|
|
|
+ if(_this.pageNo>1){
|
|
|
+ _this.listData = _this.listData.concat(res.data && res.data.list || [])
|
|
|
}else{
|
|
|
- this.listData = res.data.list || []
|
|
|
+ _this.listData = res.data.list || []
|
|
|
}
|
|
|
}else{
|
|
|
- this.listData = []
|
|
|
+ _this.listData = []
|
|
|
}
|
|
|
- this.totalNum = res.data && res.data.count || 0
|
|
|
+ _this.totalNum = res.data && res.data.count || 0
|
|
|
} else {
|
|
|
- this.listData = []
|
|
|
- this.totalNum = 0
|
|
|
- this.noDataText = res.message
|
|
|
+ _this.listData = []
|
|
|
+ _this.totalNum = 0
|
|
|
+ _this.noDataText = res.message
|
|
|
}
|
|
|
- this.status = "loadmore"
|
|
|
+ _this.status = "loadmore"
|
|
|
})
|
|
|
},
|
|
|
// scroll-view到底部加载更多
|
|
@@ -262,8 +279,8 @@
|
|
|
productMainImage: data.productMainImage,
|
|
|
productCode: data.productCode,
|
|
|
productOrigCode: data.productOrigCode,
|
|
|
- warehouseName: data.warehouseName,
|
|
|
- warehouseLocationName: data.warehouseLocationName,
|
|
|
+ warehouseName: data.warehouseEntity && data.warehouseEntity.name,
|
|
|
+ warehouseLocationName: data.warehouseLocationEntity && data.warehouseLocationEntity.name,
|
|
|
price: data.price,
|
|
|
qty: data.qty
|
|
|
}
|
|
@@ -480,28 +497,30 @@
|
|
|
padding: 20upx 0;
|
|
|
.pimgs{
|
|
|
margin-right: 20upx;
|
|
|
- position: relative;
|
|
|
- .sign{
|
|
|
- position: absolute;
|
|
|
- right: -2upx;
|
|
|
- top: -2upx;
|
|
|
- color: #fff;
|
|
|
- border-radius: 50%;
|
|
|
- width: 40upx;
|
|
|
- height: 40upx;
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
}
|
|
|
.sales-item-main{
|
|
|
.sales-item-name{
|
|
|
- font-size: 28upx;
|
|
|
- color: rgb(48, 49, 51);
|
|
|
- font-weight: bold;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- display: -webkit-box;
|
|
|
- -webkit-box-orient: vertical;
|
|
|
- -webkit-line-clamp: 1;
|
|
|
+ display:flex;
|
|
|
+ .sign{
|
|
|
+ border-radius: 15%;
|
|
|
+ width: 40upx;
|
|
|
+ height:34upx;
|
|
|
+ line-height: 34upx;
|
|
|
+ text-align: center;
|
|
|
+ margin-right:5px;
|
|
|
+ font-size: 22upx;
|
|
|
+ }
|
|
|
+ .nameInfo{
|
|
|
+ max-width: 80%;
|
|
|
+ font-size: 28upx;
|
|
|
+ color: rgb(48, 49, 51);
|
|
|
+ font-weight: bold;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ display: -webkit-box;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
+ -webkit-line-clamp: 1;
|
|
|
+ }
|
|
|
}
|
|
|
.sales-item-txt{
|
|
|
margin: 8upx 0;
|
|
@@ -531,4 +550,4 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|