فهرست منبع

合并打印问题

shish 2 سال پیش
والد
کامیت
7218e398a0

+ 42 - 20
ghsApp/src/admin/order/itemOrder.vue

@@ -16,6 +16,12 @@
         <app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
       </block>
     </div>
+
+			<div class="app-footer">
+        <div class="admin-button-com big blue" @click="batchFh()">全部发货</div>
+				<div class="admin-button-com big blue" style="margin-left:50upx;" @click="batchPrint()">合并打印</div>
+			</div>
+
   </div>
 </template>
 <script>
@@ -26,7 +32,7 @@ import { mapGetters } from "vuex";
 import { getOrderInfoList } from "@/api/order-item";
 import orderMixin from "@/mixins/order";
 import OrderItem from "../home/components/OrderItem"
-import { getListB,cloudPrintOrder} from "@/api/order";
+import { getListB,cloudPrintOrder,mergePrintFn,allFhAction} from "@/api/order";
 export default {
   name: "itemOrder",
   components: {
@@ -67,6 +73,36 @@ export default {
   methods: {
     init(){
 
+    },
+    batchFh(){
+      let that = this
+      if(this.option.ids && !this.$util.isEmpty(this.option.ids)){
+        that.$util.confirmModal({content:'确认全部发货?'},() => {
+          allFhAction({ids:this.option.ids}).then(res=>{
+            if(res.code == 1){
+              that.$msg('操作成功')
+              that.resetList()
+              that.getOrderList()
+            }
+          })
+        })
+      }else{
+        this.$msg('没有订单')
+      }
+    },
+    batchPrint(){
+      let that = this
+      if(this.option.ids && !this.$util.isEmpty(this.option.ids)){
+        that.$util.confirmModal({content:'确认合并打印?'},() => {
+          mergePrintFn({ids:this.option.ids}).then(res=>{
+            if(res.code == 1){
+              that.$msg('打印成功')
+            }
+          })
+        })
+      }else{
+        this.$msg('没有订单')
+      }
     },
     printOrder(item){
       let that = this
@@ -105,24 +141,13 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
-.admin-button-com {
-  width: 140upx;
-  height: 60upx;
-  padding: 0;
-  line-height: 60upx;
-  text-align: center;
-  font-size: 26upx;
-  &.active {
-    border: 1upx solid #ccc;
-  }
-}
 page{
 	width: 750upx;
 	overflow: hidden;
 }
 .app-content {
 	width: 100%;
-  padding-bottom: 1upx;
+  padding-bottom: 160upx;
 	overflow: hidden;
   .select-dn_bx {
     padding-left: 18upx;
@@ -178,14 +203,11 @@ page{
       @include disFlex(center, flex-start);
       flex-wrap: wrap;
       padding: 10upx 0 40upx;
-      .admin-button-com {
-        margin-right: 20upx;
-        margin-top: 20upx;
-        padding-top: 16upx;
-        padding-bottom: 16upx;
-        border-radius: 4upx;
-      }
     }
   }
+	// 按钮
+	.app-footer {
+		justify-content: flex-end;
+	}
 }
 </style>

+ 1 - 1
ghsApp/src/admin/shop/add.vue

@@ -79,7 +79,7 @@
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
 					<view class="tui-title ">门牌</view>
-					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号(选填)" />
+					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号(建议填写,方便找你)" />
 				</tui-list-cell>
 
 				<tui-list-cell class="line-cell" :hover="false">

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

@@ -1,5 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+export const modifyAddress = data => {
+	return https.post('/custom/modify-address', data)
+}
+
 export const changeIsHd = data => {
 	return https.get('/custom/change-is-hd', data)
 }

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

@@ -1,5 +1,13 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 
+export const allFhAction = data => {
+	return https.post("/order/all-fh", data);
+};
+
+export const mergePrintFn = data => {
+	return https.post("/order/merge-print", data);
+};
+
 //订单发货
 export const orderFh = data => {
 	return https.post("/order/fh", data);

+ 2 - 2
ghsApp/src/components/app-address-group.vue

@@ -24,8 +24,8 @@
 		</tui-list-cell>
 		<tui-list-cell v-if="isFloor" class="line-cell" :hover="false">
 			<view class="tui-title ">门牌号</view>
-<!--			<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" @input="changeFloor" placeholder="楼号门牌号(选填)"/>-->
-			<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号(选填)"/>
+<!--			<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" @input="changeFloor" placeholder="楼号门牌号(建议填写,方便找你)"/>-->
+			<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号(建议填写,方便找你)"/>
 		</tui-list-cell>
 		<!-- 选择地区 -->
 		<app-area-sel :show.sync="showRegion" @change="changeAreaFn" :city="form.city"/>

+ 1 - 1
ghsApp/src/components/app-delivery.vue

@@ -59,7 +59,7 @@
 		      placeholder-style="color:#ccc"
           class="tui-input"
           name="receiveFloor"
-          placeholder="楼号门牌号(选填)"
+          placeholder="楼号门牌号(建议填写,方便找你)"
         />
       </tui-list-cell>
       <tui-list-cell class="line-cell" :hover="false" :arrow="true">

+ 1 - 0
ghsApp/src/pages.json

@@ -65,6 +65,7 @@
 			"pages": [
 				{"path": "member/add","style": {"navigationBarTitleText": "添加客户"}},
 				{"path": "member/detail","style": {"navigationBarTitleText": "客户详情"}},
+				{"path": "member/modify","style": {"navigationBarTitleText": "修改地址"}},
 				{"path": "member/bind","style": {"navigationBarTitleText": "绑定微信"}},
 				{"path": "member/addCustomer","style": {"navigationBarTitleText": "添加客户"}},
 				{"path": "member/addCustom","style": {"navigationBarTitleText": "添加虚拟客户"}},

+ 1 - 1
ghsApp/src/pagesClient/member/add.vue

@@ -45,7 +45,7 @@
 					<!--</tui-list-cell>-->
 					<!--<tui-list-cell class="line-cell" :hover="false">-->
 						<!--<div class="tui-title">门牌号</div>-->
-						<!--<input v-model="form.floor" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" placeholder="楼号门牌号(选填)"/>-->
+						<!--<input v-model="form.floor" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" placeholder="楼号门牌号(建议填写,方便找你)"/>-->
 					<!--</tui-list-cell>-->
 					<div class="btn-wrap">
 					<!--<button class="admin-button-com blue big" formType="submit">确认</button>-->

+ 8 - 2
ghsApp/src/pagesClient/member/detail.vue

@@ -38,7 +38,7 @@
       <view class="module-com user-address_bx">
           <view class="address-tit"> 地址 </view>
           <view class="address-des_bx">
-            <view>
+            <view @click.stop="pageTo({ url: '/pagesClient/member/modify?id='+userInfo.id+'&name='+userInfo.name })">
                 <view>
                   {{userInfo.name}}
                 </view>
@@ -224,7 +224,13 @@ export default {
     };
   },
   computed: {},
-  onLoad() {},
+  onLoad() {
+    if(this.option.name && !this.$util.isEmpty(this.option.name)){
+      uni.setNavigationBarTitle({title:this.option.name})
+    }else{
+      uni.setNavigationBarTitle({title:'修改地址'})
+    }
+  },
   methods: {
     changeWlFn() {
       let wlName = this.userInfo.wlName||''

+ 177 - 0
ghsApp/src/pagesClient/member/modify.vue

@@ -0,0 +1,177 @@
+<template>
+	<view class="app-content">
+		<form @submit="formSubmit">
+			<view class="module-com input-line-wrap">
+
+				<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="openAddres">
+					<view class="tui-title">城市</view>
+					<view class="tui-input" v-if="form.province || form.city">{{ form.province + '-' + form.city }}</view>
+					<view class="tui-placeholder" v-else>请选择</view>
+					<input v-model="form.province" name="province" hidden />
+				</tui-list-cell>
+				<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="selectRegion">
+					<view class="tui-title">地址</view>
+					<view class="tui-input" v-if="form.address">{{ form.address }}</view>
+					<view class="tui-placeholder" v-else>请填写详细地址</view>
+					<input v-model="form.address" name="address" hidden />
+				</tui-list-cell>
+				<tui-list-cell class="line-cell" :hover="false">
+					<view class="tui-title ">门牌</view>
+					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号(建议填写,方便查找)" />
+				</tui-list-cell>
+
+			</view>
+			<view class="confirm-btn">
+				<button class="admin-button-com big blue" formType="submit">提交</button>
+			</view>
+		</form>
+		<!-- 省市联动 -->
+		<simple-address ref="simpleAddress" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onCityConfirm"></simple-address>
+		<!-- 选择地区 -->
+		<app-area-sel :show.sync="showRegion" :city="form.city" @change="changeAreaFn" />
+	</view>
+</template>
+
+<script>
+import TuiListCell from '@/components/plugin/list-cell'
+import AppAvatarModule from '@/components/module/app-avatar'
+import SimpleAddress from '@/components/plugin/simple-address'
+import AppAreaSel from '@/components/app-area-sel'
+import AppUploader from "@/components/app-uploader";
+const form = require('@/utils/formValidation.js')
+import { modifyAddress } from '@/api/custom'
+import {mapActions} from "vuex";
+export default {
+	name: 'add',
+	components: {
+		TuiListCell,
+		AppAvatarModule,
+		SimpleAddress,
+		AppAreaSel,
+		AppUploader
+	},
+	data() {
+		return {
+			form: {
+				province: '',
+				city: '',
+				address: '',
+				floor: '',
+			},
+			showRegion: false,
+			region: {
+				lat: 0,
+				long: 0
+			},
+			regionData: [],
+			cityPickerValueDefault: [0, 0]
+		}
+	},
+	onLoad() {
+	},
+	onShow() {
+
+	},
+	methods: {
+		...mapActions(['setUserShopAll']),
+		init() {
+
+		},
+		// 选择城市
+		selectRegion() {
+			if (!this.form.city) {
+				this.$msg('请先选择城市!')
+				return false
+			}
+			this.showRegion = true
+		},
+		changeAreaFn(e) {
+			this.form.address = e.title
+			this.region.lat = e.location.lat
+			this.region.long = e.location.lng
+		},
+		//省市联动
+		openAddres() {
+			this.$refs.simpleAddress.open()
+		},
+		onCityConfirm(e) {
+			this.form.province = e.provinceName
+			this.form.city = e.cityName
+			this.form.address = ''
+			this.region.lat = 0
+			this.region.long = 0
+		},
+		confirmFn() {
+			let hostFn = this.option.id ? update : add
+			if (this.option.id) {
+				this.form.id = this.option.id
+			}
+			this.form = {...this.form,...this.region}
+			uni.showLoading({mask:true})
+			modifyAddress(this.form).then(res=>{
+				if(res.code == 1){
+					uni.hideLoading()
+				}
+			})
+		},
+		// 表单验证
+		formSubmit(e) {
+			// 表单规则
+			let rules = [
+				{
+					name: 'province',
+					rule: ['required'],
+					msg: ['请选择城市']
+				},
+				{
+					name: 'address',
+					rule: ['required'],
+					msg: ['请填选地址']
+				}
+			]
+			let formData = e.detail.value
+			let checkRes = form.validation(formData, rules)
+			if (!checkRes) {
+				this.confirmFn()
+			} else {
+				this.$msg(checkRes)
+			}
+		},
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+	.app-content {
+		min-height: calc(100vh - 20upx);
+		padding-top: 20upx;
+	}
+	.prompt-text {
+		color: $fontColor3;
+		padding-left: 30upx;
+		margin-bottom: 30upx;
+	}
+	.module-com {
+		margin-bottom: 20upx;
+		.member-wrap {
+			.member-det {
+				font-size: 24upx;
+				margin-left: 20upx;
+			}
+		}
+		.remark-wrap {
+			align-items: flex-start;
+			.remark {
+				height: 180upx;
+			}
+		}
+	}
+	// 按钮
+	.confirm-btn {
+		width: calc(100% - 60upx);
+		margin: 60upx 30upx 20upx;
+		.admin-button-com {
+			width: 100%;
+		}
+	}
+</style>

+ 1 - 1
ghsApp/src/pagesStorehouse/shop/update.vue

@@ -72,7 +72,7 @@
 						placeholder-class="phcolor"
 						class="tui-input"
 						name="floor"
-						placeholder="楼号门牌号(选填)"
+						placeholder="楼号门牌号(建议填写,方便找你)"
 					/>
 				</tui-list-cell>
 				<tui-list-cell class="line-cell remark-wrap" :hover="false">