shish 1 год назад
Родитель
Сommit
91306e32e4

+ 10 - 0
ghsApp/src/admin/billing/affirm.vue

@@ -31,6 +31,10 @@
 
                       <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 > 0">¥{{ parseFloat((Number(item.smallCount)*Number(item.userPrice)).toFixed(2)) }}</text>
+                      <text :class="[Number(item.cost) > Number(item.userPrice) ? '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)">售价低于成本</text>
+                      </text>
 
                       <view class="open-bx" >
                         <i class="iconfont iconjian" @click="reduceItemFn(item)" v-if="item.bigCount > 0 || item.smallCount > 0"></i>
@@ -937,4 +941,10 @@ export default {
 .remark-class{
   z-index:0
 }
+.warning-price{
+	color:red;
+}
+.normal-price{
+  color:#c1acac;
+}
 </style>

+ 10 - 4
ghsApp/src/admin/billing/index2.vue

@@ -61,16 +61,18 @@
 			<template slot="customContent">
 				<view class="select-cmd_bx" v-if="customData">
 					<view class="kc">
-						<text class="unit_price">库存 {{ parseFloat(customData.stock) }}</text>
-						<text class="unit_price"> ¥{{ parseFloat(customData.price) }}</text>
-						<text>{{customData.ratio}}{{customData.smallUnit}}/{{customData.bigUnit}}</text>
+						<text>库存 {{ customData.stock?parseFloat(customData.stock):0 }}</text>
+						<text style="margin-left:14upx;">¥{{ parseFloat(customData.price) }}</text>
+						<text style="margin-left:14upx;">{{customData.ratio}}{{customData.smallUnit}}/{{customData.bigUnit}}</text>
+						<text style="margin-left:14upx;">成本 {{customData.cost?parseFloat(customData.cost):0}}</text>
 					</view>
 					<view class="num_bx">
-						<input style="width: 280upx" v-model="customData.userPrice" @focus="customData.userPrice = null" 
+						<input style="width:280upx" v-model="customData.userPrice" @focus="customData.userPrice = null" :class="[Number(customData.cost) > Number(customData.userPrice) ? 'warning-price' : '']"
 						:disabled="false" type="digit" placeholder="单价" />
 						<text style="font-size:35upx;font-weight:bold;color:#666666;">元</text>
 					</view>
 					<view class="num_bx">
+
 						<!-- #ifdef APP-PLUS -->
 						<input style="width: 280upx" v-model="customData.bigCount" v-if="globalUnitType == 0" type="number" />
 						<text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 0">{{customData.bigUnit}}</text>
@@ -352,4 +354,8 @@ export default {
 .class-popup-style{
 	z-index:999999;
 }
+.warning-price{
+	color:red;
+	font-weight:bold;
+}
 </style>

+ 2 - 0
ghsApp/src/pagesOrder/arrival.vue

@@ -256,7 +256,9 @@ export default {
 				return false
 			}
 			that.$util.confirmModal({content:'确认提交?'},() => {
+				uni.showLoading({mask:true})
 				arrival({id:that.option.id,product:JSON.stringify(product),packCost:that.packCost,sendCost:that.sendCost}).then(res=>{
+					uni.hideLoading()
 					if(res.code == 1){
 						let id = res.data.id ? res.data.id : 0
 						that.pageTo({url: '/pagesOrder/result?id='+id,type:2})

+ 4 - 0
ghsApp/src/pagesOrder/detail.vue

@@ -533,6 +533,10 @@ export default {
 		let prevPage = pages[ pages.length - 2 ];
 		prevPage.$vm.fromDetail = {status:1}
 
+		if(this.option.refresh && this.option.refresh == 1){
+			prevPage.$vm.fromDetail = {status:0}
+		}
+
 		getAllStaff().then(res=>{
 			if(res.code == 1){
 				this.staffListData = res.data.list

+ 7 - 1
ghsApp/src/pagesOrder/result.vue

@@ -14,6 +14,12 @@
 <script>
 export default {
     name: "success",
+	onLoad(){
+		//确认发货,返回上一页需要刷新
+		let pages = getCurrentPages();
+		let prevPage = pages[ pages.length - 2 ];
+		prevPage.$vm.fromDetail = {status:0}
+	},
 	methods: {
 		init(){
 
@@ -23,7 +29,7 @@ export default {
 		},
 		goDetail(){
 			let id = this.option.id?this.option.id:0
-			this.pageTo({url: '/pagesOrder/detail?id='+id,type:2})
+			this.pageTo({url: '/pagesOrder/detail?refresh=1&id='+id,type:2})
 		}
 	}
 };