Browse Source

物流打印

shish 1 year ago
parent
commit
4a971cedf6

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

@@ -40,6 +40,10 @@ export const changeIsHd = data => {
 	return https.get('/custom/change-is-hd', data)
 }
 
+export const modifyShortName = data => {
+	return https.get('/custom/modify-short-name', data)
+}
+
 export const changeWlName = data => {
 	return https.get('/custom/change-wl-name', data)
 }

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

@@ -1,5 +1,9 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 
+export const printWlLabel = data => {
+	return https.get("/order/print-wl-label", data)
+}
+
 export const changeSendStaffFn = data => {
 	return https.get("/order/change-send-staff", data)
 }

+ 15 - 1
ghsApp/src/pagesClient/member/detail.vue

@@ -164,6 +164,12 @@
               </div>
             </tui-list-cell>
 
+            <tui-list-cell class="line-cell" :hover="false">
+              <div class="tui-title">短名称</div>
+              <input v-model="userInfo.shortName" @click="userInfo.shortName=''" placeholder-class="phcolor" class="tui-input" confirm-type="go" placeholder="请填写" type="text" style="width:48%;border:1upx solid #ddd;margin-right:15upx;height:52upx;text-align:center;" />
+              <button class="admin-button-com blue mini-btn" @tap="changeShortName">确定</button>
+            </tui-list-cell>
+
             <tui-list-cell class="line-cell" :hover="false">
               <div class="tui-title">配送物流</div>
               <input v-model="userInfo.wlName" @click="userInfo.wlName=''" placeholder-class="phcolor" class="tui-input" confirm-type="go" placeholder="请填写" type="text" style="width:48%;border:1upx solid #ddd;margin-right:15upx;height:52upx;text-align:center;" />
@@ -242,7 +248,7 @@ import ModalModule from "@/components/plugin/modal"
 import { getUserDet,debt} from "@/api/member";
 import { IMGHOST } from '@/config'
 import { mapGetters } from "vuex"
-import { changeShowStock,changePassStatus,changeWlName,changeLevel,createSeatSnFn,modifySeatSnFn } from "@/api/custom"
+import { changeShowStock,changePassStatus,changeWlName,modifyShortName,changeLevel,createSeatSnFn,modifySeatSnFn } from "@/api/custom"
 import { updateDebtLimit,updateCustomBlack,changeDiscount,changeName,rechargeFn,getGatheringCode} from "@/api/custom";
 export default {
   name: "detail",
@@ -443,6 +449,14 @@ export default {
         })
       })
     },
+    changeShortName(){
+      let shortName = this.userInfo.shortName||''
+      modifyShortName({id:this.option.id,shortName:shortName}).then(res=>{
+        if(res.code == 1){
+          this.$msg(res.msg)
+        }
+      })
+    },
     changeWlFn() {
       let wlName = this.userInfo.wlName||''
       changeWlName({id:this.option.id,wlName:wlName}).then(res=>{

+ 31 - 15
ghsApp/src/pagesOrder/detail.vue

@@ -25,6 +25,7 @@
 				<view class="flex" style="color: #3385ff;font-weight: 400">
 					<view @click.stop="openAgain()" style="margin-left:0upx;">继续开单</view>
 					<view @click.stop="allotFn()" style="margin-left:50upx;">分配工作</view>
+					<view @click.stop="printWlFlag()" style="margin-left:50upx;">打印物流标</view>
 				</view>
 			</view>
 			<view class="bills-info_box content-box">
@@ -462,7 +463,7 @@
 import { mapGetters } from "vuex";
 import stepStatus from "./components/stepStatus";
 import TuiListCell from "@/components/plugin/list-cell";
-import { getDetail,debtPay,hasPay, freeShipping,confirmFinish,cancel,modifyRemarkFn,orderFh,modifyOrderConfirmTimeFn } from "@/api/order";
+import { getDetail,debtPay,hasPay, freeShipping,confirmFinish,cancel,modifyRemarkFn,orderFh,modifyOrderConfirmTimeFn,printWlLabel } from "@/api/order";
 import { getOrderProduct,giveItem } from "@/api/order-item";
 import productMins from "@/mixins/product";
 import { ORDER_STATUS } from "@/utils/declare";
@@ -668,16 +669,14 @@ export default {
 		},
 		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()
-					}
-				})
+			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){
@@ -686,10 +685,15 @@ export default {
 		},
 		dealRemark(val){
 			let that = this
-			that.$util.confirmModal({content:'请选择操作项',okText:'复制',cancelText:'修改',cacelTextColor:'#38ADFF'},() => {
-				that.copyRemark(val)
-			},()=>{
+			that.$util.confirmModal({content:'请选择操作项',okText:'修改',cancelText:'复制',cacelTextColor:'#38ADFF',okTextColor:'#37863a'},() => {
 				that.beginModify(val)
+			},()=>{
+				// #ifdef MP-WEIXIN
+				that.$msg('APP上才能用复制功能')
+				// #endif
+				// #ifdef APP-PLUS
+				that.copyRemark(val)
+				// #endif
 			})
 		},
 		backBefore(){
@@ -715,12 +719,17 @@ export default {
 			}
 			let val = address+"\n"+customName+" "+customMobile
 			const self = this
+			// #ifdef MP-WEIXIN
+			self.$msg('APP上才能用复制功能')
+			// #endif
+			// #ifdef APP-PLUS
 			uni.setClipboardData({
 				data: val,
 				success: function() {
 					self.$msg("复制成功")
 				}
-			});
+			})
+			// #endif
 		},
 		copyRemark(val){
 			const self = this
@@ -833,6 +842,13 @@ export default {
 		goRefund(){
 			this.$util.pageTo({url:'/pagesOrder/refund?id='+this.option.id})
 		},
+		printWlFlag(){
+			printWlLabel({id:this.option.id}).then(res=>{
+				if(res.code == 1){
+					this.$msg(res.msg)
+				}
+			})
+		},
 		allotFn(){
 			this.$util.pageTo({url:'/pagesOrder/allot?id='+this.option.id})
 		},