Sfoglia il codice sorgente

备注和打印问题

shish 2 anni fa
parent
commit
1a713f93a4

+ 4 - 0
ghsApp/src/admin/home/components/OrderItem.vue

@@ -54,6 +54,10 @@
             <i class="iconfont iconxiangyou"></i>
             <i class="iconfont iconxiangyou"></i>
             </view>
             </view>
         </view>
         </view>
+        <view class="order-info_box" v-if="!$util.isEmpty(item.remark)">
+            <view style="color:red;font-weight:bold;">备注:</view>
+            <view style="color:red;font-weight:bold;">{{ item.remark }}</view>
+        </view>
         <view v-if="item.sameTimeIdsNum && item.sameTimeIdsNum>1" style="text-align: center;color:white;
         <view v-if="item.sameTimeIdsNum && item.sameTimeIdsNum>1" style="text-align: center;color:white;
         margin-top:20upx;font-size:32upx;background-color:#6097e8;padding-top:7upx;padding-bottom:7upx;"
         margin-top:20upx;font-size:32upx;background-color:#6097e8;padding-top:7upx;padding-bottom:7upx;"
         @click.stop="pageTo({url:'/admin/order/itemOrder?ids='+item.sameTimeIds})">
         @click.stop="pageTo({url:'/admin/order/itemOrder?ids='+item.sameTimeIds})">

+ 4 - 0
ghsApp/src/api/order/index.js

@@ -1,5 +1,9 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 import https from "@/plugins/luch-request_0.0.7/request";
 
 
+export const modifyRemarkFn = data => {
+	return https.post("/order/modify-remark", data);
+};
+
 export const allFhAction = data => {
 export const allFhAction = data => {
 	return https.post("/order/all-fh", data);
 	return https.post("/order/all-fh", data);
 };
 };

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

@@ -219,8 +219,9 @@
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
-			<view v-if="detailInfo.remark!=''" class="content-box price-detail">
-				<div class="module-com input-line-wrap" @click="copyRemark(detailInfo.remark)">
+
+			<view class="content-box price-detail">
+				<div class="module-com input-line-wrap" @click="dealRemark(detailInfo.remark)">
 					<tui-list-cell class="line-cell" :hover="false">
 					<tui-list-cell class="line-cell" :hover="false">
 						<div class="tui-title">备注</div>
 						<div class="tui-title">备注</div>
 						<div>{{ detailInfo.remark }}</div>
 						<div>{{ detailInfo.remark }}</div>
@@ -340,6 +341,16 @@
 		</template>
 		</template>
 		</modal-module>
 		</modal-module>
 
 
+		<uni-popup ref="modifyRemarkRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
+			<view style="padding:30upx;">
+				<textarea v-model="modifyRemarkText" style="border:1upx solid #cccccc;height:140upx;font-size:28upx;" placeholder="请填写备注"></textarea>
+				<view style="text-align:center;">
+					<button class="admin-button-com big default" style="margin:30upx auto 10upx auto;width:45%;" @click="cancelModify()">取消</button>
+					<button class="admin-button-com big blue" style="margin:30upx auto 10upx 20upx;width:45%;" @click="confirmModify()">修改</button>
+				</view>
+			</view>
+		</uni-popup>
+
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -347,7 +358,7 @@
 import { mapGetters } from "vuex";
 import { mapGetters } from "vuex";
 import stepStatus from "./components/stepStatus";
 import stepStatus from "./components/stepStatus";
 import TuiListCell from "@/components/plugin/list-cell";
 import TuiListCell from "@/components/plugin/list-cell";
-import { getDetail,debtPay,hasPay, freeShipping,confirmFinish,cancel } from "@/api/order";
+import { getDetail,debtPay,hasPay, freeShipping,confirmFinish,cancel,modifyRemarkFn } from "@/api/order";
 import { getOrderProduct,giveItem } from "@/api/order-item";
 import { getOrderProduct,giveItem } from "@/api/order-item";
 import productMins from "@/mixins/product";
 import productMins from "@/mixins/product";
 import { ORDER_STATUS } from "@/utils/declare";
 import { ORDER_STATUS } from "@/utils/declare";
@@ -386,7 +397,8 @@ export default {
 			title:'新订单',
 			title:'新订单',
 			giveTargetId:0,
 			giveTargetId:0,
 			givePopShow:false,
 			givePopShow:false,
-			giveNum:1
+			giveNum:1,
+			modifyRemarkText:''
 		};
 		};
 	},
 	},
 	onPullDownRefresh() {
 	onPullDownRefresh() {
@@ -421,6 +433,35 @@ export default {
 		}
 		}
 	},
 	},
 	methods: {
 	methods: {
+		cancelModify(){
+			this.$refs.modifyRemarkRef.close()
+		},
+		confirmModify(){
+			let that = this
+			this.$util.confirmModal({content:'确认修改?'},() => {
+				uni.showLoading({mask:true})
+				modifyRemarkFn({id: this.option.id,remark:this.modifyRemarkText}).then(res=>{
+					uni.hideLoading()
+					if(res.code == 1){
+						that.cancelModify()
+						that.$msg('操作成功')
+						that.init()
+					}
+				})
+			})
+		},
+		beginModify(val){
+			this.modifyRemarkText = val
+			this.$refs.modifyRemarkRef.open('center')
+		},
+		dealRemark(val){
+			let that = this
+			that.$util.confirmModal({content:'请选择操作项',okText:'复制',cancelText:'修改',cacelTextColor:'#38ADFF'},() => {
+				that.copyRemark(val)
+			},()=>{
+				that.beginModify(val)
+			})
+		},
 		backBefore(){
 		backBefore(){
 			//返回上一页带参数
 			//返回上一页带参数
 			let pages = getCurrentPages();
 			let pages = getCurrentPages();