|
|
@@ -31,9 +31,8 @@
|
|
|
|
|
|
<text style="position: absolute;right:300upx;top:2upx;font-size:28upx;color:green;font-weight:bold;" v-if="item.bigCount > 0">¥{{ parseFloat((Number(item.bigCount)*Number(item.userPrice)).toFixed(2)) }}</text>
|
|
|
<text style="position: absolute;right:300upx;top:2upx;font-size:28upx;color:green;font-weight:bold;" v-else>¥{{ parseFloat((Number(item.smallCount)*Number(item.userPrice)).toFixed(2)) }}</text>
|
|
|
- <text :class="[Number(item.cost) > Number(item.userPrice) && item.bigCount > 0 ? 'warning-price' : 'normal-price']" style="position: absolute;right:0upx;top:55upx;font-size:24upx;font-weight:bold;width:350upx;text-align:right;">
|
|
|
- ¥{{ item.cost?parseFloat(item.cost):0 }}
|
|
|
- <text style="margin-left:8upx;" v-if="Number(item.cost) > Number(item.userPrice) && item.bigCount > 0">售价过低</text>
|
|
|
+ <text v-if="showFinance==1" :class="[Number(item.avCost) > Number(item.userPrice) && item.bigCount > 0 ? 'warning-price' : 'normal-price']" style="position: absolute;right:0upx;top:55upx;font-size:24upx;font-weight:bold;width:350upx;text-align:right;">
|
|
|
+ 成本¥{{ item.avCost?parseFloat(item.avCost):0 }}<text style="margin-left:8upx;" v-if="Number(item.avCost) > Number(item.userPrice) && item.bigCount > 0">售价过低</text>
|
|
|
</text>
|
|
|
|
|
|
<view class="open-bx" >
|
|
|
@@ -54,14 +53,15 @@
|
|
|
<view class="operate-view" v-if="isScanEnv" @click="removeFromSave(option.customId)"> <text class="iconfont iconshanchu1"></text>清除花材 </view>
|
|
|
<view class="operate-view" v-else @click="gobackEvent" style="font-size:32upx;font-weight:bold;"><text class="iconfont icongouwuche" style="margin-right:5upx;"></text>返回修改</view>
|
|
|
<view class="describe-view">
|
|
|
- <text>合计 ¥{{ allPrice }},</text>
|
|
|
- <text>¥{{ allCount.cost }},</text>
|
|
|
- <text>¥{{ parseFloat((Number(allPrice)-Number(allCount.cost)).toFixed(2)) }}</text>
|
|
|
+ <text>合计 ¥{{ allPrice }}</text>
|
|
|
+ <block v-if="showFinance==1">
|
|
|
+ <text>,成本 ¥{{ allCount.avCost }}</text>
|
|
|
+ <text>,利润 ¥{{ parseFloat((Number(allPrice)-Number(allCount.avCost)).toFixed(2)) }}</text>
|
|
|
+ </block>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="summary-bar">
|
|
|
- <view class="operate-view" v-if="isScanEnv" @click="pageToItemList()"><text class="iconfont iconzeng"></text>手动添加花材</view>
|
|
|
- <view class="operate-view" v-if="isScanEnv == false"><text> </text></view>
|
|
|
+ <view class="operate-view" v-if="hasFinance==1" @click="getMyFinance">查看财务</view>
|
|
|
<view class="describe-view">
|
|
|
<text>{{ selectList.length }}种,</text>
|
|
|
<text v-if="Number(totalItemNum.big)>0">{{totalItemNum.big?parseFloat(totalItemNum.big):0}}扎</text>
|
|
|
@@ -306,7 +306,7 @@ import { getAllStaff } from "@/api/shop-admin"
|
|
|
import { mapActions, mapGetters } from "vuex";
|
|
|
import { getUserDet} from "@/api/member"
|
|
|
import ModalModule from "@/components/plugin/modal"
|
|
|
-import { getAllWl } from "@/api/shop"
|
|
|
+import { getStaffInfo } from "@/api/staff"
|
|
|
import MxDatePicker from '@/components/mx-datepicker/mx-datepicker.vue';
|
|
|
export default {
|
|
|
name: "affirm",
|
|
|
@@ -376,6 +376,8 @@ export default {
|
|
|
currentShop:{default:0},
|
|
|
book:0,
|
|
|
selectStaff: { id: '', name: '' },
|
|
|
+ showFinance:0,
|
|
|
+ hasFinance:0,
|
|
|
};
|
|
|
},
|
|
|
onLoad (option) {
|
|
|
@@ -422,6 +424,15 @@ export default {
|
|
|
//#endif
|
|
|
|
|
|
this.listenScanItem()
|
|
|
+
|
|
|
+
|
|
|
+ getStaffInfo().then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ let staffInfo = res.data.staff?res.data.staff:[]
|
|
|
+ this.hasFinance = staffInfo.finance?staffInfo.finance:0
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
onShow(){
|
|
|
if(!this.$util.isEmpty(uni.getStorageSync("newClient"))){
|
|
|
@@ -502,6 +513,9 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(["initMerchantInfo"]),
|
|
|
+ getMyFinance(){
|
|
|
+ this.showFinance = 1
|
|
|
+ },
|
|
|
bindHistoryDateChange(){
|
|
|
this.pickerType = 'history'
|
|
|
this.showPicker = true
|
|
|
@@ -873,7 +887,7 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
color: #333;
|
|
|
- font-size: 28upx;
|
|
|
+ font-size: 26upx;
|
|
|
font-weight:bold;
|
|
|
.price {
|
|
|
margin-left:8upx;
|