Selaa lähdekoodia

开始开发确认送达

shish 2 vuotta sitten
vanhempi
commit
9381066da0

+ 25 - 8
ghs/src/views/order/components/arrival.vue

@@ -5,8 +5,8 @@
 				<div class="card-wrap">
 					<div class="card-tit">
 						花材信息 (按 Esc 关闭窗口)
-						<el-button @click="" style="margin-left:80px;">使用填单价</el-button>
-						<el-button @click="" style="margin-left:20px;">使用自带价</el-button>
+						<el-button style="margin-left:80px;" @click="usePrice(detailInfo,0)">使用填单价</el-button>
+						<el-button style="margin-left:20px;" @click="usePrice(detailInfo,1)">使用自带价</el-button>
 						<el-button type="primary" @click="addItme()" style="margin-left:20px;">添加花材</el-button>
 					</div>
 					<div class="card-body">
@@ -28,9 +28,9 @@
 							<el-table-column property="stock" label="剩余"></el-table-column>
 							<el-table-column label="单价">
 								<template slot-scope="scope">
-									<el-input v-model="scope.row.currentHdPrice" @focus="scope.row.currentHdPrice=''" placeholder="数量" style="width:50px;" 
+									<el-input v-model="scope.row.currentHdPrice" @focus="scope.row.currentHdPrice=''" placeholder="数量" style="width:50px;margin-right:2px;" 
 									:class="[Number(scope.row.cost)>Number(scope.row.currentHdPrice) ? 'cost-blue' : '']">
-									</el-input>
+									</el-input>
 								</template>
 							</el-table-column>
 							<el-table-column label="数量">
@@ -84,7 +84,7 @@
 					</div>
 	      		</div>
 				<div style="margin-left:80px;margin-top:20px;">
-					<el-button @click="">取消</el-button>
+					<el-button @click="closeFn">取消</el-button>
 
 					<el-popconfirm title="确认保存?" @confirm="savePrice()" @onConfirm="savePrice()" style="margin-left:80px;">
 						<el-button slot="reference">保存</el-button>
@@ -152,6 +152,18 @@ export default {
 		}
 	},
 	methods: {
+		usePrice(info,flag){
+			if(info.product && !this.$util.isEmpty(info.product)){
+				info.product.forEach((item,idx,array) => {
+					if(flag == 0){
+						item.currentHdPrice = item.itemModifyPrice
+					}else{
+						item.currentHdPrice = item.itemSalePrice
+					}
+				})
+				this.$forceUpdate()
+			}
+		},
 		commitItem(){
 			let product = []
 			let hasError = false
@@ -179,7 +191,7 @@ export default {
 				}
 			}
 			if(hasLessCostPrice == true && this.lessCostCould == 0){
-				this.$message.error('有售价低于成本,请打开允许设置')
+				this.$message.error('有花材低于成本销售,请允许')
 				return false
 			}
 			if(hasError == true){
@@ -188,6 +200,7 @@ export default {
 			this.$service.order.arrival({id:that.arrivalData.id,product:JSON.stringify(product),packCost:that.packCost,sendCost:that.sendCost}).then(res=>{
 				this.$message.success('提交成功')
 				this.closeFn()
+				this.$emit('refreshData')
 			})
 		},
 		savePrice(){
@@ -286,13 +299,17 @@ export default {
   text-align:center;
 }
 .stock-red{
-	border:2px solid red;
 	color:red;
 	font-weight:bold;
+	::v-deep .el-input__inner {
+		border:2px solid red;
+	}
 }
 .cost-blue{
-	border:2px solid blue;
 	color:blue;
 	font-weight:bold;
+	::v-deep .el-input__inner {
+		border:2px solid blue;
+	}
 }
 </style>

+ 5 - 2
ghs/src/views/order/list.vue

@@ -93,7 +93,7 @@
       </template>
 
       <template #slot-column-option="{scope}">
-        <el-button @click.stop="detailShowFn(scope.row)" size="small" type="primary" v-if="scope.row.status != 1 && scope.row.status != 5">详情</el-button>
+        <el-button @click.stop="detailShowFn(scope.row)" size="small" type="success" v-if="scope.row.status != 1 && scope.row.status != 5">详情</el-button>
         <el-button v-else size="small" @click.stop="detailShowFn(scope.row)">详情</el-button>
         
         <template v-if="scope.row.book == 0">
@@ -162,7 +162,7 @@
 
     </x-crud>
 
-    <arrival ref="arrivalRef" :arrivalData="arrivalData" @addNewItem="addNewItem" />
+    <arrival ref="arrivalRef" :arrivalData="arrivalData" @addNewItem="addNewItem" @refreshData="refreshData" />
 
     <simple-item ref="simpleItemRef" :simpleData="simpleData" @renewArrival="renewArrival" />
 
@@ -397,6 +397,9 @@ export default {
       }
       this.app.refresh({ status: this.tabIndex,book:this.book,clearSign:this.clearSign,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,name:this.name})
     },
+    refreshData(){
+      this.app.refresh({ status: this.tabIndex,book:this.book,clearSign:this.clearSign,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,name:this.name})
+    },
     todays(type) {
       var myDate = new Date();
       let todaty = '';

+ 1 - 1
ghsApp/src/pagesOrder/arrival.vue

@@ -244,7 +244,7 @@ export default {
 				}
 			}
 			if(hasLessCostPrice == true && this.lessCostCould == 0){
-				this.$msg('有售价低于成本,请打开允许设置')
+				this.$msg('有花材低于成本销售,请允许')
 				return false
 			}
 			if(hasError == true){