shish 2 سال پیش
والد
کامیت
aee38e357f
1فایلهای تغییر یافته به همراه15 افزوده شده و 2 حذف شده
  1. 15 2
      ghs/src/views/order/components/arrival.vue

+ 15 - 2
ghs/src/views/order/components/arrival.vue

@@ -28,12 +28,15 @@
 							<el-table-column property="stock" label="剩余"></el-table-column>
 							<el-table-column property="stock" label="剩余"></el-table-column>
 							<el-table-column label="单价">
 							<el-table-column label="单价">
 								<template slot-scope="scope">
 								<template slot-scope="scope">
-									<el-input v-model="scope.row.currentHdPrice" @focus="scope.row.currentHdPrice=''" placeholder="数量" style="width:50px;"></el-input>
+									<el-input v-model="scope.row.currentHdPrice" @focus="scope.row.currentHdPrice=''" placeholder="数量" style="width:50px;" 
+									:class="[Number(scope.row.cost)>Number(scope.row.currentHdPrice) ? 'cost-blue' : '']">
+									</el-input>
 								</template>
 								</template>
 							</el-table-column>
 							</el-table-column>
 							<el-table-column label="数量">
 							<el-table-column label="数量">
 								<template slot-scope="scope">
 								<template slot-scope="scope">
-									<el-input v-model="scope.row.xhNum" placeholder="数量" @focus="scope.row.xhNum=''" style="width:50px;"></el-input>
+									<el-input v-model="scope.row.xhNum" placeholder="数量" @focus="scope.row.xhNum=''" style="width:50px;" 
+									:class="[Number(scope.row.xhNum)>Number(scope.row.stock) ? 'stock-red' : '']"></el-input>
 								</template>
 								</template>
 							</el-table-column>
 							</el-table-column>
 
 
@@ -282,4 +285,14 @@ export default {
   padding:0;
   padding:0;
   text-align:center;
   text-align:center;
 }
 }
+.stock-red{
+	border:2px solid red;
+	color:red;
+	font-weight:bold;
+}
+.cost-blue{
+	border:2px solid blue;
+	color:blue;
+	font-weight:bold;
+}
 </style>
 </style>