|
@@ -0,0 +1,380 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <view class="app-content">
|
|
|
|
|
+ <view v-if="!$util.isEmpty(detailInfo)" class="info-content_box">
|
|
|
|
|
+ <view class="module-com content-box">
|
|
|
|
|
+ <view class="commodity-view">
|
|
|
|
|
+ <view class="commodity-list">
|
|
|
|
|
+ <view v-for="(s, idx) in detailInfo.product" :key="idx" class="commodity-item" >
|
|
|
|
|
+ <image class="item-icon" :src="s.cover" alt="" />
|
|
|
|
|
+ <view class="item-info">
|
|
|
|
|
+ <view class="info-line">
|
|
|
|
|
+ <text class="item-name">{{ s.name }}</text>
|
|
|
|
|
+ <text class="item-price">
|
|
|
|
|
+ <text class="unit"></text>
|
|
|
|
|
+ <text class="price"><text v-if="s.bigNum>0">{{s.bigNum}}扎</text></text>
|
|
|
|
|
+ </text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="info-line">
|
|
|
|
|
+ <text class="item-type">{{ s.property }}</text>
|
|
|
|
|
+ <view class="item-count">
|
|
|
|
|
+ <input type="text" class="num" v-model="s.bigNum" @focus="s.bigNum=''" placeholder="到货数量" />
|
|
|
|
|
+ <input type="text" class="price" v-model="s.currentCost" @focus="s.currentCost=''" placeholder="成本" />
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="summary-bar">
|
|
|
|
|
+ <view class="operate-view" ></view>
|
|
|
|
|
+ <view class="describe-view">
|
|
|
|
|
+ 合计 ¥<text class="price">{{ itemPrice }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="content-box price-detail">
|
|
|
|
|
+ <view class="module-com input-line-wrap">
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <view class="tui-title">客户</view>
|
|
|
|
|
+ <view class="detail-price_box" style="font-size: 28upx;">{{ detailInfo.customName||'' }}</view>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <view class="tui-title">重量(公斤)</view>
|
|
|
|
|
+ <view class="detail-price_box" style="font-size: 28upx;">
|
|
|
|
|
+ <text v-if="Number(miniKilo) > Number(totalWeight)" style="color:#CCCCCC;margin-right:15upx;">未达{{parseFloat(miniKilo)}}公斤按{{parseFloat(miniKilo)}}公斤计算</text>
|
|
|
|
|
+ <text>{{ totalWeight }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <view class="tui-title">每公斤服务费</view>
|
|
|
|
|
+ <view class="detail-price_box" style="font-size: 28upx;">¥{{ kiloFee ? parseFloat(kiloFee) : 0}}</view>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <view class="tui-title">本单服务费</view>
|
|
|
|
|
+ <view class="detail-price_box" style="font-size: 28upx;">¥{{totalKiloFee}}</view>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <view class="tui-title">商品金额</view>
|
|
|
|
|
+ <view class="detail-price_box" style="font-size: 28upx;">¥{{itemPrice}}</view>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <view class="tui-title">总计</view>
|
|
|
|
|
+ <view class="detail-price_box red" style="font-size: 28upx;">¥{{allPrice}}</view>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <view class="tui-title">预付金额</view>
|
|
|
|
|
+ <view class="detail-price_box red" style="font-size: 28upx;">¥{{ detailInfo.bookPrice ? parseFloat(detailInfo.bookPrice) : 0}}</view>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <view class="tui-title">结账</view>
|
|
|
|
|
+ <view class="detail-price_box" style="font-size: 28upx;color:green;" v-if="settlePrice > 0">退 ¥{{settlePrice}},确认后自动退款</view>
|
|
|
|
|
+ <view class="detail-price_box" style="font-size: 28upx;color:red;" v-else-if="settlePrice < 0">欠 ¥{{Math.abs(settlePrice)}},确认后变成欠款单</view>
|
|
|
|
|
+ <view class="detail-price_box" style="font-size: 28upx;" v-else>0</view>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="app-footer">
|
|
|
|
|
+ <button class="admin-button-com big default" @click="goBack()">取消</button>
|
|
|
|
|
+ <button v-if="option.ptItemId" class="admin-button-com big blue" formType="submit" @click="status = 1">添加</button>
|
|
|
|
|
+ <button v-else class="admin-button-com big blue" formType="submit" @click="status = 1">确认</button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ </view>
|
|
|
|
|
+</template>
|
|
|
|
|
+<script>
|
|
|
|
|
+import { mapGetters } from "vuex";
|
|
|
|
|
+import TuiListCell from "@/components/plugin/list-cell";
|
|
|
|
|
+import { getArrivalDetail } from "@/api/order/index";
|
|
|
|
|
+export default {
|
|
|
|
|
+ name: "arrival",
|
|
|
|
|
+ components: {
|
|
|
|
|
+ TuiListCell
|
|
|
|
|
+ },
|
|
|
|
|
+ mixins: [],
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ detailInfo: {},
|
|
|
|
|
+ miniKilo:0,
|
|
|
|
|
+ kiloFee:0,
|
|
|
|
|
+ totalKiloFee:0,
|
|
|
|
|
+ itemPrice:0,
|
|
|
|
|
+ totalWeight:0,
|
|
|
|
|
+ settlePrice:0
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ onShow() {
|
|
|
|
|
+ this.init();
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ ...mapGetters({ loginInfo: "getLoginInfo" }),
|
|
|
|
|
+ allPrice() {
|
|
|
|
|
+ let price = 0
|
|
|
|
|
+ this.itemPrice = 0
|
|
|
|
|
+ this.totalWeight = 0
|
|
|
|
|
+ if (this.detailInfo && this.detailInfo.product) {
|
|
|
|
|
+ for (const item of this.detailInfo.product) {
|
|
|
|
|
+ if(item.currentCost){
|
|
|
|
|
+ //花材价格
|
|
|
|
|
+ let currentPrice = Number(item.bigNum) * Number(item.currentCost)
|
|
|
|
|
+ currentPrice = currentPrice.toFixed(2)
|
|
|
|
|
+ this.itemPrice = Number(this.itemPrice) + Number(currentPrice)
|
|
|
|
|
+ this.itemPrice.toFixed(2)
|
|
|
|
|
+
|
|
|
|
|
+ //总重量
|
|
|
|
|
+ let thisWeight = Number(item.unitWeight)*Number(item.bigNum)
|
|
|
|
|
+ this.totalWeight = Number(this.totalWeight)+Number(thisWeight)
|
|
|
|
|
+ this.totalWeight = parseFloat(this.totalWeight.toFixed(2))
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //总服务费
|
|
|
|
|
+ let calcWeight = Number(this.totalWeight)>Number(this.miniKilo) ? Number(this.totalWeight) : this.miniKilo
|
|
|
|
|
+ this.totalKiloFee = Number(this.kiloFee)*calcWeight
|
|
|
|
|
+ this.totalKiloFee = parseFloat(this.totalKiloFee.toFixed(2))
|
|
|
|
|
+
|
|
|
|
|
+ //总计
|
|
|
|
|
+ price = Number(this.itemPrice) + Number(this.totalKiloFee)
|
|
|
|
|
+ price = parseFloat(price.toFixed(2))
|
|
|
|
|
+
|
|
|
|
|
+ this.settlePrice = Number(this.detailInfo.bookPrice) - Number(price)
|
|
|
|
|
+ this.settlePrice = parseFloat(this.settlePrice.toFixed(2))
|
|
|
|
|
+
|
|
|
|
|
+ return price
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ async init() {
|
|
|
|
|
+ const res = await getArrivalDetail({
|
|
|
|
|
+ id: this.option.id
|
|
|
|
|
+ });
|
|
|
|
|
+ this.detailInfo = res.data;
|
|
|
|
|
+ this.miniKilo = res.data.miniKilo
|
|
|
|
|
+ this.kiloFee = res.data.kiloFee
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+</script>
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
|
+.info-content_box {
|
|
|
|
|
+ padding: 15upx 20upx 120upx;
|
|
|
|
|
+ & > .title {
|
|
|
|
|
+ color: #666666;
|
|
|
|
|
+ font-size: 28upx;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ padding: 30upx 3upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ & .address-des_bx {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ padding: 20upx 10upx 30upx 20upx;
|
|
|
|
|
+ & > view:nth-child(1) {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ margin-top: 10upx;
|
|
|
|
|
+ & > view:nth-child(1) {
|
|
|
|
|
+ color: #333333;
|
|
|
|
|
+ font-size: 32upx;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ }
|
|
|
|
|
+ & > view:nth-child(2) {
|
|
|
|
|
+ color: #666666;
|
|
|
|
|
+ font-size: 28upx;
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ margin-top: 20upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ & > view:nth-child(2) {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ & .icondianhua1 {
|
|
|
|
|
+ font-size: 50upx;
|
|
|
|
|
+ color: #3385ff;
|
|
|
|
|
+ margin-left: 0upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .bills-info_box {
|
|
|
|
|
+ padding: 30upx 20upx 30upx;
|
|
|
|
|
+ & > .order-info_box {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ font-size: 26upx;
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ margin-bottom: 5upx;
|
|
|
|
|
+ & > view:nth-child(1) {
|
|
|
|
|
+ color: #999999;
|
|
|
|
|
+ width: 135upx;
|
|
|
|
|
+ text-align: right;
|
|
|
|
|
+ }
|
|
|
|
|
+ & > view:nth-child(2) {
|
|
|
|
|
+ color: #333333;
|
|
|
|
|
+ }
|
|
|
|
|
+ & > .price {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ font-size: 30upx;
|
|
|
|
|
+ color: #333333;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
|
+ & .iconxiangyou {
|
|
|
|
|
+ color: #999999;
|
|
|
|
|
+ font-size: 25upx;
|
|
|
|
|
+ margin-left: 12upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .content-box {
|
|
|
|
|
+ background-color: #ffffff;
|
|
|
|
|
+ border-radius: 10upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ .commodity-view {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ .commodity-list {
|
|
|
|
|
+ padding: 20upx;
|
|
|
|
|
+ .commodity-item {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ margin-bottom: 20upx;
|
|
|
|
|
+ .item-icon {
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
|
+ width: 140upx;
|
|
|
|
|
+ height: 140upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ .item-info {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ margin-left: 20upx;
|
|
|
|
|
+ .info-line {
|
|
|
|
|
+ margin-bottom: 20upx;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ align-items: flex-end;
|
|
|
|
|
+ .item-name {
|
|
|
|
|
+ color: black;
|
|
|
|
|
+ font-size: 30upx;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
|
+ width:360upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ .item-price {
|
|
|
|
|
+ color: #333;
|
|
|
|
|
+ font-size: 22upx;
|
|
|
|
|
+ .price {
|
|
|
|
|
+ font-size:25upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .item-type {
|
|
|
|
|
+ color: #999;
|
|
|
|
|
+ font-size: 24upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ .item-count {
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ font-size: 24upx;
|
|
|
|
|
+ width:380upx;
|
|
|
|
|
+ .price{
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ width:150upx;
|
|
|
|
|
+ height:20upx;
|
|
|
|
|
+ border:1upx solid #cccccc;
|
|
|
|
|
+ float:right;
|
|
|
|
|
+ margin-right:30upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ .num{
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ width:150upx;
|
|
|
|
|
+ height:20upx;
|
|
|
|
|
+ border:1upx solid #cccccc;
|
|
|
|
|
+ float:right;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .summary-bar {
|
|
|
|
|
+ padding: 0 20upx;
|
|
|
|
|
+ height: 90upx;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ border-top: 1upx solid #eeeeee;
|
|
|
|
|
+ .operate-view {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ color: #3385ff;
|
|
|
|
|
+ font-size: 26upx;
|
|
|
|
|
+ .iconfont {
|
|
|
|
|
+ margin-right: 20upx;
|
|
|
|
|
+ font-size: 40upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .describe-view {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ color: #333;
|
|
|
|
|
+ font-size: 24upx;
|
|
|
|
|
+ .price {
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ font-size: 28upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .shipping-address {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ margin-top: 20upx;
|
|
|
|
|
+ & > view:nth-child(1) {
|
|
|
|
|
+ color: #999999;
|
|
|
|
|
+ font-size: 28upx;
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ padding: 30upx 0 30upx 20upx;
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ & > text {
|
|
|
|
|
+ color: #333333;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ & > view:nth-child(2) {
|
|
|
|
|
+ font-size: 60upx;
|
|
|
|
|
+ color: #d6e7ff;
|
|
|
|
|
+ margin-right: 10upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .price-detail {
|
|
|
|
|
+ margin-top: 20upx;
|
|
|
|
|
+ margin-bottom: 20upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ .detail-price_box {
|
|
|
|
|
+ color: #333333;
|
|
|
|
|
+ font-size: 22upx;
|
|
|
|
|
+ text-align: right;
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ &.red {
|
|
|
|
|
+ color: #ff2842;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+.app-footer {
|
|
|
|
|
+ justify-content: space-evenly;
|
|
|
|
|
+ z-index: 9999;
|
|
|
|
|
+ .admin-button-com {
|
|
|
|
|
+ width: 46%;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|