|
@@ -71,19 +71,36 @@
|
|
|
|
|
|
|
|
<view class="bills-info_box content-box" style="margin-top:18upx;">
|
|
<view class="bills-info_box content-box" style="margin-top:18upx;">
|
|
|
<view class="order-info_box" v-if="detailInfo.debt == 1">
|
|
<view class="order-info_box" v-if="detailInfo.debt == 1">
|
|
|
- <view>订单状态:</view>
|
|
|
|
|
|
|
+ <view>订单状态:</view>
|
|
|
<view style="color:red;font-weight:bold;">挂账</view>
|
|
<view style="color:red;font-weight:bold;">挂账</view>
|
|
|
<view class="price">
|
|
<view class="price">
|
|
|
<button class="admin-button-com outline-action" @click="goToClear(detailInfo)">全部挂账</button>
|
|
<button class="admin-button-com outline-action" @click="goToClear(detailInfo)">全部挂账</button>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="order-info_box" v-else>
|
|
<view class="order-info_box" v-else>
|
|
|
- <view>订单状态:</view>
|
|
|
|
|
- <view v-if="detailInfo.clearId > 0">已结清</view>
|
|
|
|
|
- <view class="price" v-if="detailInfo.clearId > 0">
|
|
|
|
|
- <button @click="pageTo({url: '/admin/clear/info',query: {id: detailInfo.clearId}})" class="admin-button-com outline-action">查看结账单</button>
|
|
|
|
|
|
|
+ <view>订单状态:</view>
|
|
|
|
|
+ <!-- clearId=1 仅结账痕迹;真实结账单用 orderClearList 或 clearId>1 -->
|
|
|
|
|
+ <view v-if="hasPurchaseCleared">已结清</view>
|
|
|
|
|
+ <view class="price" v-if="Number(detailInfo.clearId) > 1 && $util.isEmpty(detailInfo.orderClearList)">
|
|
|
|
|
+ <button @click="goClearBill({ clearId: detailInfo.clearId })" class="admin-button-com outline-action">查看结账单</button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view v-else></view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <!-- 结账信息:列出每笔结账单及金额,点击进结账单详情看操作人 -->
|
|
|
|
|
+ <view class="order-info_box order-clear-bills" v-if="!$util.isEmpty(detailInfo.orderClearList)">
|
|
|
|
|
+ <view class="order-clear-bills__label">结账信息:</view>
|
|
|
|
|
+ <view class="order-clear-bills__links">
|
|
|
|
|
+ <view
|
|
|
|
|
+ v-for="(bill, billIndex) in detailInfo.orderClearList"
|
|
|
|
|
+ :key="billIndex"
|
|
|
|
|
+ class="order-clear-bills__link"
|
|
|
|
|
+ :class="{ 'order-clear-bills__link--first': billIndex === 0 }"
|
|
|
|
|
+ @click.stop="goClearBill(bill)"
|
|
|
|
|
+ >
|
|
|
|
|
+ <text class="order-clear-bills__sn">{{ formatClearBillLabel(bill) }}</text>
|
|
|
|
|
+ <text v-if="Number(bill.amount) > 0" class="order-clear-bills__amt">¥{{ parseFloat(bill.amount) }}</text>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view v-if="detailInfo.clearId == 0"></view>
|
|
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -356,6 +373,19 @@ export default {
|
|
|
const tk = Number(this.detailInfo.tkPrice || 0)
|
|
const tk = Number(this.detailInfo.tkPrice || 0)
|
|
|
const next = Number(this.detailInfo.nextDayTkPrice || 0)
|
|
const next = Number(this.detailInfo.nextDayTkPrice || 0)
|
|
|
return parseFloat((tk + next).toFixed(2))
|
|
return parseFloat((tk + next).toFixed(2))
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 是否展示「已结清」:非挂账,且已有结账单列表结清 / clearId 痕迹 / 剩余待结为 0
|
|
|
|
|
+ */
|
|
|
|
|
+ hasPurchaseCleared() {
|
|
|
|
|
+ const info = this.detailInfo || {}
|
|
|
|
|
+ if (Number(info.debt) === 1) {
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!this.$util.isEmpty(info.orderClearList) && Number(info.remainDebtPrice) <= 0) {
|
|
|
|
|
+ return true
|
|
|
|
|
+ }
|
|
|
|
|
+ return Number(info.clearId) > 0
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mixins: [productMins],
|
|
mixins: [productMins],
|
|
@@ -627,6 +657,25 @@ export default {
|
|
|
url: '/pagesGys/details?id='+item.ghsId
|
|
url: '/pagesGys/details?id='+item.ghsId
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 跳转采购结账单详情(看操作人、金额)
|
|
|
|
|
+ */
|
|
|
|
|
+ goClearBill(item) {
|
|
|
|
|
+ const id = item && item.clearId ? item.clearId : 0
|
|
|
|
|
+ // clearId=1 仅为结账痕迹,不是真实结账单主键
|
|
|
|
|
+ if (!id || Number(id) <= 1) {
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.pageTo({ url: '/admin/clear/info', query: { id } })
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 结账单短文案:前缀「结账单」+ clearSn 后四位(对齐 pagesOrder/detail)
|
|
|
|
|
+ */
|
|
|
|
|
+ formatClearBillLabel(bill) {
|
|
|
|
|
+ const sn = bill && bill.clearSn != null ? String(bill.clearSn) : ''
|
|
|
|
|
+ const tail = sn ? sn.slice(-4) : ''
|
|
|
|
|
+ return '结账单' + tail
|
|
|
|
|
+ },
|
|
|
modifyRemark(){
|
|
modifyRemark(){
|
|
|
const self = this;
|
|
const self = this;
|
|
|
let remark = this.detailInfo.remark
|
|
let remark = this.detailInfo.remark
|
|
@@ -814,7 +863,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
.bills-info_box {
|
|
.bills-info_box {
|
|
|
padding: 30upx 20upx 30upx;
|
|
padding: 30upx 20upx 30upx;
|
|
|
- // border-bottom: 1upx solid #EEEEEE;
|
|
|
|
|
& > .order-info_box {
|
|
& > .order-info_box {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
@@ -828,6 +876,8 @@ export default {
|
|
|
}
|
|
}
|
|
|
& > view:nth-child(2) {
|
|
& > view:nth-child(2) {
|
|
|
color: #333333;
|
|
color: #333333;
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ margin-left: 20upx;
|
|
|
}
|
|
}
|
|
|
& > .price {
|
|
& > .price {
|
|
|
flex: 1;
|
|
flex: 1;
|
|
@@ -836,6 +886,7 @@ export default {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: flex-end;
|
|
justify-content: flex-end;
|
|
|
|
|
+ font-weight: 600;
|
|
|
& .iconxiangyou {
|
|
& .iconxiangyou {
|
|
|
color: #999999;
|
|
color: #999999;
|
|
|
font-size: 25upx;
|
|
font-size: 25upx;
|
|
@@ -843,6 +894,53 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ /* 结账信息:与第一条结账单顶对齐 */
|
|
|
|
|
+ & > .order-info_box.order-clear-bills {
|
|
|
|
|
+ align-items: flex-start;
|
|
|
|
|
+ margin-top: 16upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .order-clear-bills__label {
|
|
|
|
|
+ font-size: 26upx;
|
|
|
|
|
+ line-height: 40upx;
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ color: #999999;
|
|
|
|
|
+ width: 135upx;
|
|
|
|
|
+ text-align: right;
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ .order-clear-bills__links {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ min-width: 0;
|
|
|
|
|
+ margin-left: 20upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ .order-clear-bills__link {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ color: #3385ff;
|
|
|
|
|
+ line-height: 40upx;
|
|
|
|
|
+ margin-top: 12upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ .order-clear-bills__link--first {
|
|
|
|
|
+ margin-top: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ .order-clear-bills__sn {
|
|
|
|
|
+ color: #3385ff;
|
|
|
|
|
+ font-size: 28upx;
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ line-height: 40upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ .order-clear-bills__amt {
|
|
|
|
|
+ color: #3385ff;
|
|
|
|
|
+ font-size: 28upx;
|
|
|
|
|
+ margin-left: 18upx;
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ line-height: 40upx;
|
|
|
}
|
|
}
|
|
|
.content-box {
|
|
.content-box {
|
|
|
background-color: #ffffff;
|
|
background-color: #ffffff;
|