shish 4 лет назад
Родитель
Сommit
b1a88f4f70

+ 3 - 1
hdApp/src/admin/home/workbench.vue

@@ -147,7 +147,9 @@ export default {
   },
   methods: {
     goGd(){
-      this.$util.pageTo({url:'/admin/order/addOrder'})
+      //选择花材生成制作单和订单
+      //this.$util.pageTo({url:'/admin/order/addOrder'})
+      this.$util.pageTo({url:'/admin/order/workOrder'})
     },
     goCg(){
       // #ifdef MP-WEIXIN

+ 639 - 0
hdApp/src/admin/order/components/htz-image-upload/htz-image-upload.vue

@@ -0,0 +1,639 @@
+<template>
+	<view class="htz-image-upload-list">
+		<view class="htz-image-upload-Item" v-for="(item,index) in uploadLists" :key="index">
+			<view class="htz-image-upload-Item-video" v-if="(!/.(gif|jpg|jpeg|png|gif|jpg|png)/i.test(item))">
+				<video :disabled="false" :controls="false" :src="item">
+					<cover-view class="htz-image-upload-Item-video-fixed" @click="previewVideo(item)"></cover-view>
+
+					<cover-view class="htz-image-upload-Item-del-cover" v-if="remove && previewVideoSrc==''"
+						@click="imgDel(index)">×</cover-view>
+
+				</video>
+
+			</view>
+
+			<image v-else :src="item" @click="imgPreview(item)"></image>
+
+			<view class="htz-image-upload-Item-del" v-if="remove" @click="imgDel(index)">×</view>
+		</view>
+		<view class="htz-image-upload-Item htz-image-upload-Item-add" v-if="uploadLists.length<max && add"
+			@click="chooseFile">
+			+
+		</view>
+		<view class="preview-full" v-if="previewVideoSrc!=''">
+			<video :autoplay="true" :src="previewVideoSrc" :show-fullscreen-btn="false">
+				<cover-view class="preview-full-close" @click="previewVideoClose"> × </cover-view>
+			</video>
+		</view>
+
+	</view>
+</template>
+
+<style>
+	.ceshi {
+		width: 100%;
+		height: 100%;
+		position: relative;
+		top: 0;
+		left: 0;
+		bottom: 0;
+		right: 0;
+		background-color: #FFFFFF;
+		color: #2C405A;
+		opacity: 0.5;
+		z-index: 100;
+	}
+</style>
+
+<script>
+	export default {
+		name: 'htz-image-upload',
+		props: {
+			max: { //展示图片最大值
+				type: Number,
+				default: 1,
+			},
+			chooseNum: { //选择图片数
+				type: Number,
+				default: 9,
+			},
+			name: { //发到后台的文件参数名
+				type: String,
+				default: 'file',
+			},
+			remove: { //是否展示删除按钮
+				type: Boolean,
+				default: true,
+			},
+			add: { //是否展示添加按钮
+				type: Boolean,
+				default: true,
+			},
+			disabled: { //是否禁用
+				type: Boolean,
+				default: false,
+			},
+			sourceType: { //选择照片来源 【ps:H5就别费劲了,设置了也没用。不是我说的,官方文档就这样!!!】
+				type: Array,
+				default: () => ['album', 'camera'],
+			},
+			action: { //上传地址
+				type: String,
+				default: '',
+			},
+			headers: { //上传的请求头部
+				type: Object,
+				default: () => {},
+			},
+			formData: { //HTTP 请求中其他额外的 form data
+				type: Object,
+				default: () => {},
+			},
+			compress: { //是否需要压缩
+				type: Boolean,
+				default: true,
+			},
+			quality: { //压缩质量,范围0~100
+				type: Number,
+				default: 80,
+			},
+			value: { //受控图片列表
+				type: Array,
+				default: () => [],
+			},
+			uploadSuccess: {
+				default: (res) => {
+					return {
+						success: false,
+						url: ''
+					}
+				},
+			},
+			mediaType: { //文件类型 image/video/all
+				type: String,
+				default: 'image',
+			},
+			maxDuration: { //拍摄视频最长拍摄时间,单位秒。最长支持 60 秒。 (只针对拍摄视频有用)
+				type: Number,
+				default: 60,
+			},
+			camera: { //'front'、'back',默认'back'(只针对拍摄视频有用)
+				type: String,
+				default: 'back',
+			},
+
+		},
+		data() {
+			return {
+				uploadLists: [],
+				mediaTypeData: ['image', 'video', 'all'],
+				previewVideoSrc: '',
+			}
+		},
+		mounted: function() {
+			let that = this
+			this.$nextTick(function() {
+				this.uploadLists = this.value;
+				if (this.mediaTypeData.indexOf(this.mediaType) == -1) {
+					that.$util.confirmModal({content:'mediaType参数不正确'},() => {
+						//console.log('用户点击确定');
+					})
+				}
+			});
+		},
+		watch: {
+			value(val, oldVal) {
+				//console.log('value',val, oldVal)
+				this.uploadLists = val;
+			},
+		},
+		methods: {
+			previewVideo(src) {
+				this.previewVideoSrc = src;
+				// this.previewVideoSrc =
+				// 	'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-fbd63a76-dc76-485c-b711-f79f2986daeb/ba804d82-860b-4d1a-a706-5a4c8ce137c3.mp4'
+			},
+			previewVideoClose() {
+				this.previewVideoSrc = ''
+				console.log('previewVideoClose', this.previewVideoSrc)
+			},
+			imgDel(index) {
+				let that = this
+				that.$util.confirmModal({content:'确认删除?'},() => {
+					// that.uploadLists.splice(index, 1)
+					// that.$emit("input", that.uploadLists);
+					// that.$emit("imgDelete", that.uploadLists);
+					let delUrl = that.uploadLists[index]
+					that.uploadLists.splice(index, 1)
+					that.$emit("input", that.uploadLists);
+					that.$emit("imgDelete", {
+						del: delUrl,
+						tempFilePaths: that.uploadLists,
+						index:index
+					});					
+				})
+			},
+			imgPreview(index) {
+
+				var imgData = this.uploadLists.filter(item => /.(gif|jpg|jpeg|png|gif|jpg|png)/i.test(item)) //只预览图片的
+				uni.previewImage({
+					urls: imgData,
+					current: index,
+					loop: true,
+				});
+
+
+			},
+			chooseFile() {
+				if (this.disabled) {
+					return false;
+				}
+				switch (this.mediaTypeData.indexOf(this.mediaType)) {
+					case 1: //视频
+						this.videoAdd();
+						break;
+					case 2: //全部
+						uni.showActionSheet({
+							itemList: ['相册', '视频'],
+							success: (res) => {
+								if (res.tapIndex == 1) {
+									this.videoAdd();
+								} else if (res.tapIndex == 0) {
+									this.imgAdd();
+								}
+							},
+							fail: (res) => {
+								console.log(res.errMsg);
+							}
+						});
+						break;
+					default: //图片
+						this.imgAdd();
+						break;
+				}
+
+
+				//if(this.mediaType=='image'){
+
+
+			},
+			videoAdd() {
+				console.log('videoAdd')
+				let nowNum = Math.abs(this.uploadLists.length - this.max);
+				let thisNum = (this.chooseNum > nowNum ? nowNum : this.chooseNum) //可选数量
+				uni.chooseVideo({
+					compressed: this.compress,
+					sourceType: this.sourceType,
+					camera: this.camera,
+					maxDuration: this.maxDuration,
+					success: (res) => {
+						console.log('videoAdd', res)
+						console.log(res.tempFilePath)
+						this.chooseSuccessMethod([res.tempFilePath], 1)
+						//this.imgUpload([res.tempFilePath]);
+						//console.log('tempFiles', res)
+						// if (this.action == '') { //未配置上传路径
+						// 	this.$emit("chooseSuccess", res.tempFilePaths);
+						// } else {
+						// 	if (this.compress && (res.tempFiles[0].size / 1024 > 1025)) { //设置了需要压缩 并且 文件大于1M,进行压缩上传
+						// 		this.imgCompress(res.tempFilePaths);
+						// 	} else {
+						// 		this.imgUpload(res.tempFilePaths);
+						// 	}
+						// }
+					}
+				});
+			},
+			imgAdd() {
+				console.log('imgAdd')
+				let nowNum = Math.abs(this.uploadLists.length - this.max);
+				let thisNum = (this.chooseNum > nowNum ? nowNum : this.chooseNum) //可选数量
+				console.log('nowNum', nowNum)
+				console.log('thisNum', thisNum)
+				// #ifdef APP-PLUS
+				if (this.sourceType.length > 1) {
+					uni.showActionSheet({
+						itemList: ['拍摄', '从手机相册选择'],
+						success: (res) => {
+							if (res.tapIndex == 1) {
+								this.appGallery(thisNum);
+							} else if (res.tapIndex == 0) {
+								this.appCamera();
+							}
+						},
+						fail: (res) => {
+							console.log(res.errMsg);
+						}
+					});
+				}
+				if (this.sourceType.length == 1 && this.sourceType.indexOf('album') > -1) {
+					this.appGallery(thisNum);
+				}
+
+				if (this.sourceType.length == 1 && this.sourceType.indexOf('camera') > -1) {
+					this.appCamera();
+				}
+				// #endif
+				//#ifndef APP-PLUS
+				uni.chooseImage({
+					count: thisNum,
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: this.sourceType,
+					success: (res) => {
+						this.chooseSuccessMethod(res.tempFilePaths, 0)
+						//console.log('tempFiles', res)
+						// if (this.action == '') { //未配置上传路径
+						// 	this.$emit("chooseSuccess", res.tempFilePaths);
+						// } else {
+						// 	if (this.compress && (res.tempFiles[0].size / 1024 > 1025)) { //设置了需要压缩 并且 文件大于1M,进行压缩上传
+						// 		this.imgCompress(res.tempFilePaths);
+						// 	} else {
+						// 		this.imgUpload(res.tempFilePaths);
+						// 	}
+						// }
+					}
+				});
+				// #endif
+			},
+			appCamera() {
+				var cmr = plus.camera.getCamera();
+				var res = cmr.supportedImageResolutions[0];
+				var fmt = cmr.supportedImageFormats[0];
+				//console.log("Resolution: " + res + ", Format: " + fmt);
+				cmr.captureImage((path) => {
+						//alert("Capture image success: " + path);
+						this.chooseSuccessMethod([path], 0)
+					},
+					(error) => {
+						//alert("Capture image failed: " + error.message);
+						console.log("Capture image failed: " + error.message)
+					}, {
+						resolution: res,
+						format: fmt
+					}
+				);
+			},
+			appGallery(maxNum) {
+				plus.gallery.pick((res) => {
+					this.chooseSuccessMethod(res.files, 0)
+				}, function(e) {
+					//console.log("取消选择图片");
+				}, {
+					filter: "image",
+					multiple: true,
+					maximum: maxNum
+				});
+			},
+			chooseSuccessMethod(filePaths, type) {
+				if (this.action == '') { //未配置上传路径
+					this.$emit("chooseSuccess", filePaths, type); //filePaths 路径 type 0 为图片 1为视频
+				} else {
+					if (type == 1) {
+						this.imgUpload(filePaths);
+					} else {
+						if (this.compress) { //设置了需要压缩
+							this.imgCompress(filePaths);
+						} else {
+							this.imgUpload(filePaths);
+						}
+					}
+
+				}
+			},
+			imgCompress(tempFilePaths) {
+				uni.showLoading({
+					title: '压缩中...'
+				});
+
+				let compressImgs = [];
+				let results = [];
+				tempFilePaths.forEach((item, index) => {
+					compressImgs.push(new Promise((resolve, reject) => {
+						// #ifndef H5
+						uni.compressImage({
+							src: item,
+							quality: this.quality,
+							success: res => {
+								//console.log('compressImage', res.tempFilePath)
+								results.push(res.tempFilePath);
+								resolve(res.tempFilePath);
+							},
+							fail: (err) => {
+								//console.log(err.errMsg);
+								reject(err);
+							},
+							complete: () => {
+								//uni.hideLoading();
+							}
+						})
+						// #endif
+						// #ifdef H5
+						this.canvasDataURL(item, {
+							quality: this.quality / 100
+						}, (base64Codes) => {
+							//this.imgUpload(base64Codes);
+							results.push(base64Codes);
+							resolve(base64Codes);
+						})
+						// #endif
+					}))
+				})
+				Promise.all(compressImgs) //执行所有需请求的接口
+					.then((results) => {
+						uni.hideLoading();
+						console.log('imgUpload', results)
+						this.imgUpload(results);
+					})
+					.catch((res, object) => {
+						uni.hideLoading();
+					});
+			},
+			imgUpload(tempFilePaths) {
+				// if (this.action == '') {
+				// 	uni.showToast({
+				// 		title: '未配置上传地址',
+				// 		icon: 'none',
+				// 		duration: 2000
+				// 	});
+				// 	return false;
+				// }
+				uni.showLoading({
+					title: '上传中'
+				});
+				console.log('imgUpload', tempFilePaths)
+				let uploadImgs = [];
+				tempFilePaths.forEach((item, index) => {
+					uploadImgs.push(new Promise((resolve, reject) => {
+						console.log(index, item)
+						const uploadTask = uni.uploadFile({
+							url: this.action, //仅为示例,非真实的接口地址
+							filePath: item,
+							name: this.name,
+							fileType: 'image',
+							formData: this.formData,
+							header: this.headers,
+							success: (uploadFileRes) => {
+								if (typeof this.uploadSuccess == 'function') {
+									if (this.uploadSuccess(uploadFileRes).success) {
+										this.value.push(this.uploadSuccess(uploadFileRes)
+											.url)
+										this.$emit("input", this.uploadLists);
+									}
+								}
+								resolve(uploadFileRes);
+								this.$emit("uploadSuccess", uploadFileRes);
+							},
+							fail: (err) => {
+								console.log(err);
+								//uni.hideLoading();
+								reject(err);
+								this.$emit("uploadFail", err);
+							},
+							complete: () => {
+								//uni.hideLoading();
+							}
+						});
+					}))
+				})
+				Promise.all(uploadImgs) //执行所有需请求的接口
+					.then((results) => {
+						uni.hideLoading();
+					})
+					.catch((res, object) => {
+						uni.hideLoading();
+						this.$emit("uploadFail", res);
+					});
+				// uploadTask.onProgressUpdate((res) => {
+				// 	//console.log('',)
+				// 	uni.showLoading({
+				// 		title: '上传中' + res.progress + '%'
+				// 	});
+				// 	if (res.progress == 100) {
+				// 		uni.hideLoading();
+				// 	}
+				// });
+			},
+			canvasDataURL(path, obj, callback) {
+				var img = new Image();
+				img.src = path;
+				img.onload = function() {
+					var that = this;
+					// 默认按比例压缩
+					var w = that.width,
+						h = that.height,
+						scale = w / h;
+					w = obj.width || w;
+					h = obj.height || (w / scale);
+					var quality = 0.8; // 默认图片质量为0.8
+					//生成canvas
+					var canvas = document.createElement('canvas');
+					var ctx = canvas.getContext('2d');
+					// 创建属性节点
+					var anw = document.createAttribute("width");
+					anw.nodeValue = w;
+					var anh = document.createAttribute("height");
+					anh.nodeValue = h;
+					canvas.setAttributeNode(anw);
+					canvas.setAttributeNode(anh);
+					ctx.drawImage(that, 0, 0, w, h);
+					// 图像质量
+					if (obj.quality && obj.quality <= 1 && obj.quality > 0) {
+						quality = obj.quality;
+					}
+					// quality值越小,所绘制出的图像越模糊
+					var base64 = canvas.toDataURL('image/jpeg', quality);
+					// 回调函数返回base64的值
+					callback(base64);
+				}
+			},
+		}
+	}
+</script>
+
+<style>
+	.preview-full {
+		position: fixed;
+		top: 0;
+		left: 0;
+		bottom: 0;
+		width: 100%;
+		height: 100%;
+		z-index: 1002;
+	}
+
+	.preview-full video {
+		width: 100%;
+		height: 100%;
+		z-index: 1002;
+	}
+
+	.preview-full-close {
+		position: fixed;
+		right: 32rpx;
+		top: 25rpx;
+		width: 80rpx;
+		height: 80rpx;
+		line-height: 60rpx;
+		text-align: center;
+		z-index: 1003;
+		/* 	background-color: #808080; */
+		color: #fff;
+		font-size: 65rpx;
+		font-weight: bold;
+		text-shadow: 1px 2px 5px rgb(0 0 0);
+	}
+
+
+
+	/* .preview-full-close-before,
+	.preview-full-close-after {
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		content: '';
+		height: 60rpx;
+		margin-top: -30rpx;
+		width: 6rpx;
+		margin-left: -3rpx;
+		background-color: #FFFFFF;
+		z-index: 20000;
+	}
+
+	.preview-full-close-before {
+		transform: rotate(45deg);
+
+	}
+
+	.preview-full-close-after {
+		transform: rotate(-45deg);
+
+	} */
+
+	.htz-image-upload-list {
+		display: flex;
+		flex-wrap: wrap;
+	}
+
+	.htz-image-upload-Item {
+		width: 160rpx;
+		height: 160rpx;
+		margin: 13rpx;
+		border-radius: 10rpx;
+		position: relative;
+	}
+
+	.htz-image-upload-Item image {
+		width: 100%;
+		height: 100%;
+		border-radius: 10rpx;
+	}
+
+	.htz-image-upload-Item-video {
+		width: 100%;
+		height: 100%;
+		border-radius: 10rpx;
+		position: relative;
+
+	}
+
+	.htz-image-upload-Item-video-fixed {
+		position: absolute;
+		top: 0;
+		left: 0;
+		bottom: 0;
+		width: 100%;
+		height: 100%;
+		border-radius: 10rpx;
+		z-index: 996;
+
+	}
+
+	.htz-image-upload-Item video {
+		width: 100%;
+		height: 100%;
+		border-radius: 10rpx;
+
+	}
+
+	.htz-image-upload-Item-add {
+		font-size: 105rpx;
+		/* line-height: 160rpx; */
+		text-align: center;
+		border: 1px dashed #d9d9d9;
+		color: #d9d9d9;
+	}
+
+	.htz-image-upload-Item-del {
+		background-color: #f5222d;
+		font-size: 24rpx;
+		position: absolute;
+		width: 35rpx;
+		height: 35rpx;
+		line-height: 35rpx;
+		text-align: center;
+		top: 0;
+		right: 0;
+		z-index: 997;
+		color: #fff;
+	}
+
+	.htz-image-upload-Item-del-cover {
+		background-color: #f5222d;
+		font-size: 24rpx;
+		position: absolute;
+		width: 35rpx;
+		height: 35rpx;
+		text-align: center;
+		top: 0;
+		right: 0;
+		color: #fff;
+		/* #ifdef APP-PLUS */
+		line-height: 25rpx;
+		/* #endif */
+		/* #ifndef APP-PLUS */
+		line-height: 35rpx;
+		/* #endif */
+		z-index: 997;
+
+	}
+</style>

+ 364 - 0
hdApp/src/admin/order/workOrder.vue

@@ -0,0 +1,364 @@
+<template>
+<view class="app-content">
+  <view class="affirm-page">
+    <view class="affirm-view overscroll">
+      <form>
+
+       <view class="module-com input-line-wrap">
+
+        <tui-list-cell class="line-cell" :arrow="true">
+          <view class="tui-title">分类</view>
+          <picker mode="selector" :value="form.catId" :range="plantClassData" range-key="categoryName" @change="changePlantClassFn" class="tui-input" >
+            <input v-model="form.catId" name="catId" type="text" hidden />
+            <view v-if="form.catId" style="height:45upx;" >{{ categorySelectedData.categoryName }}</view>
+            <view class="tui-placeholder" style="height:45upx;" v-else>请选择</view>
+          </picker>
+        </tui-list-cell>
+
+        <tui-list-cell class="line-cell" :hover="false">
+          <view class="tui-title">数量</view>
+          <input v-model="form.num" placeholder-class="phcolor" class="tui-input" name="num" @focus="form.num=''" placeholder="请填写数量" maxlength="50" type="number" />
+        </tui-list-cell>
+
+          <tui-list-cell class="line-cell" :hover="false" :arrow="false">
+            <view class="tui-title">结账方式</view>
+            <button @tap="form.hasPay = 1" class="admin-button-com mini-btn" :class="form.hasPay == 1 ? 'blue' : 'default'">已付款</button>
+          </tui-list-cell>
+
+          <tui-list-cell class="line-cell" :arrow="true" v-if="form.hasPay == 1">
+            <view class="tui-title">收款方式</view>
+            <picker mode="selector" :value="form.payWay" :range="payWayList" range-key="name" @change="payWayChange" class="tui-input" >
+              <input v-model="form.payWay" name="payWay" type="text" hidden />
+              <view style="padding:6upx 0 6upx 0;">{{payWayList[payWayindex].name}}</view>
+            </picker>
+          </tui-list-cell>
+
+          <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
+            <view class="tui-title">金额</view>
+            <input type="digit" @focus="modifyPrice=''" :focus="true" v-model="modifyPrice" placeholder-class="tui-placeholder"/>
+          </tui-list-cell>
+
+        </view>
+
+      <view class="module-com input-line-wrap goods-wrap">
+        <view class="module-tit">
+          <span>图片</span>
+          <span class="app-color-3"></span>
+        </view>
+        <view class="module-det">
+          <htz-image-upload :max="1" :compress="true" v-model="currentImgData" :headers="headers"
+           @uploadSuccess="imgUploadSuccess" @imgDelete="imgDeleteFn" :action="getLoginInfo.imgUploadApi">
+          </htz-image-upload>
+        </view>
+      </view>
+
+        <app-delivery-module ref="appDelivery" @changeAddress="changeAddress" />
+
+      </form>
+    </view>
+    <view class="under-bar">
+      <view class="price-view"></view>
+      <button class="admin-button-com blue middle" @click="confirmToSubmit">提交</button>
+    </view>
+  </view>
+</view>
+</template>
+<script>
+import TuiListCell from "@/components/plugin/list-cell";
+import productMins from "@/mixins/cgPlantProduct";
+import AppDeliveryModule from "@/components/app-delivery";
+import { createOrder } from "@/api/order";
+import { mapGetters } from "vuex";
+import { getUserDistance } from "@/api/express";
+import { getClass } from "@/api/category";
+//图片上传插件来源:https://ext.dcloud.net.cn/plugin?id=2922 已改造,不能再升级 shish 20211228
+import htzImageUpload from './components/htz-image-upload/htz-image-upload.vue'
+export default {
+  name: "plantConfirm",
+  components: {
+    TuiListCell,AppDeliveryModule,htzImageUpload
+  },
+  mixins: [productMins],
+  data () {
+    return {
+      selectJobType: "addOrder",
+      form: {
+        hasPay:1,
+        payWay:0,
+        sendCost:'',
+        catId:'',
+        name:"花束",
+        cover:[],
+        num:1,
+        remark:'',
+        flowerNum:''
+      },
+      modifyPrice:'',
+			payWayindex:0,
+			payWayList:[{name:"微信",id:0},{name:"支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}],
+      plantClassData:[],
+      categorySelectedData:{},
+      currentImgData:[]
+    };
+  },
+  onLoad (option) {
+
+  },
+	onShow(){
+	},
+	onUnload(){
+
+	},
+  computed: {
+    ...mapGetters(["getLoginInfo"])
+  },
+  methods: {
+    imgUploadSuccess(res) {
+      var imgReturn = JSON.parse(res.data)
+      if(imgReturn.code == 1){
+        this.currentImgData.push(imgReturn.data.smallUrl)
+        this.form.cover.push(imgReturn.data.shortUrl)
+      }
+    },
+    imgDeleteFn(res){
+      const index = res.index
+      this.form.cover.splice(index,1)
+    },
+    init() {
+      this.getPlantCategory()
+    },
+    async getPlantCategory() {
+      await getClass({flower:1}).then(res => {
+        if (this.$util.isEmpty(res.data)){
+          return false;
+        }
+        this.plantClassData = res.data;
+        if(this.plantClassData && this.plantClassData[0] && this.plantClassData[0].id){
+          this.form.catId = this.plantClassData[0].id||''
+          let categoryName = this.plantClassData[0].categoryName||''
+          this.categorySelectedData = {categoryName}
+        }
+      });
+    },
+    changePlantClassFn(e) {
+        this.categorySelectedData = this.plantClassData[e.detail.value];
+        this.form.catId = this.categorySelectedData.id;
+    },
+		payWayChange(e){
+			let index = e.detail.value
+			this.payWayindex = index
+      this.form.payWay = this.payWayList[index].id
+		},
+    //计算客户距离和运费
+    changeAddress() {
+      return false
+      let lat = this.$refs.appDelivery.region.latitude
+      let long = this.$refs.appDelivery.region.longitude
+      getUserDistance({ lat: lat, lng: long }).then(res => {
+        this.freightPrice = res.data.fee
+        this.showDistance = res.data.showDistance
+      })
+    },
+    confirmToSubmit () {
+      let that = this
+
+      if(this.$util.isEmpty(this.modifyPrice) || Number(this.modifyPrice)<=0){
+        this.$msg("请输入金额")
+        return false
+      }
+      if (this.$util.isEmpty(this.form.cover)) {
+        this.$msg("请上传图片")
+        return false
+      }
+      if(Array.isArray(this.form.cover)){
+        this.form.cover = this.form.cover[0]
+      }
+
+      that.form = {...that.$refs.appDelivery.form,...that.form}
+      that.$util.confirmModal({content:'确认提交?'},() => {
+          createOrder({...that.form,lsGoodsPrice:this.modifyPrice}).then((res) => {
+            that.pageTo({url: '/admin/order/addOrderResult',type:2,query:{id:res.data.id}})
+          });
+      })
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+.module-com {
+  margin-bottom: 20upx;
+  background-color: #fff;
+  color: $fontColor2;
+  .module-tit {
+    padding: 20upx 30upx;
+    font-size: 28upx;
+  }
+  .module-det {
+    padding: 0 30upx;
+  }
+}
+.admin-button-com {
+  margin-right: 20upx;
+}
+.affirm-page {
+  position: relative;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  .affirm-view {
+    flex: 1;
+    margin-bottom:90upx;
+    padding: 20upx;
+    background-color: #f0f2f6;
+    .commodity-view {
+      display: flex;
+      flex-direction: column;
+      .commodity-list {
+        padding: 20upx;
+        .commodity-item {
+          display: flex;
+          margin-bottom: 20upx;
+          .item-icon {
+            flex-shrink: 0;
+            width: 140upx;
+            height: 140upx;
+          }
+          .item-info {
+            display: flex;
+            flex-direction: column;
+            justify-content: center;
+            flex: 1;
+            margin-left: 20upx;
+            .info-line {
+              margin-bottom: 20upx;
+              display: flex;
+              justify-content: space-between;
+              align-items: flex-end;
+              .item-name {
+                color: #666;
+                font-size: 28upx;
+              }
+              .item-price {
+                color: #333;
+                font-size: 22upx;
+                .price {
+                  font-size: 32upx;
+                  font-weight: bold;
+                }
+              }
+              .item-type {
+                color: #999;
+                font-size: 24upx;
+              }
+              .item-count {
+                color: #666;
+                font-size: 24upx;
+              }
+            }
+          }
+        }
+      }
+      .summary-bar {
+        padding: 0 20upx;
+        height: 90upx;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        border-top: 1upx solid #eeeeee;
+        .operate-view {
+          display: flex;
+          align-items: center;
+          color: #3385ff;
+          font-size: 26upx;
+          .iconfont {
+            margin-right: 20upx;
+            font-size: 40upx;
+          }
+        }
+        .describe-view {
+          display: flex;
+          align-items: center;
+          color: #333;
+          font-size: 24upx;
+          .price {
+            font-weight: bold;
+            font-size: 36upx;
+          }
+        }
+      }
+    }
+    .module-com {
+      background-color: #fff;
+      margin-bottom: 20upx;
+      border-radius: 10upx;
+      overflow: hidden;
+					.tab-box{
+						padding: 10upx 30upx 30upx;
+						.tab{
+							width: 49%;
+							height: 70upx;
+							color: #a2a2a2;
+							border: 1upx solid #dcdcdc;
+							border-radius: 10upx;
+							font-size: 28upx;
+							font-weight: 700;
+							&.active{
+								color: #ff4d4d;
+								border: 1upx solid #ff4d4d;
+							}
+						}
+					}
+      .member-wrap {
+        .member-det {
+          font-size: 24upx;
+          margin-left: 20upx;
+        }
+      }
+      .remark-wrap {
+        align-items: flex-start;
+        .remark {
+          height: 240upx;
+        }
+      }
+    }
+  }
+  .under-bar {
+    display: flex;
+    z-index:99999;
+    justify-content: space-between;
+    align-items: center;
+    padding: 0 20upx;
+    position: fixed;
+    bottom:0;
+    /* 手机mobile屏幕小于1000px */
+    @media screen and (max-width: 1100px) {
+      width: 100%;
+    }
+    /* 收银台cashier屏幕大于1000px */
+    @media screen and (min-width:1100px) {
+      width: 40%;
+    } 
+    height: 100upx;
+    background-color: #fff;
+    box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
+    .price-view {
+      display: flex;
+      align-items: center;
+      font-size: 24upx;
+      .price-title {
+        color: #333;
+      }
+      .price-number {
+        margin: 0 20upx;
+        color: #ff2842;
+        .large {
+          font-size: 40upx;
+        }
+      }
+    }
+    .admin-button-com {
+      width: 200upx;
+    }
+  }
+}
+</style>

+ 5 - 5
hdApp/src/admin/work/components/workItem.vue

@@ -2,14 +2,10 @@
     <view  @click="pageTo({url:'/admin/work/detail',query: {id: item.id}})">
         <view class="order-top_box" style="position:relative;">
           <image style="width:130upx;position:absolute;top:110upx;right:25upx;border-radius:10upx;" @click.stop="previewImage(item.bigCover)" mode="widthFix" :src="item.cover"></image>
-          <view class="tit">{{item.name}}</view>
+          <view class="tit">{{ item.sn||'' }}</view>
           <view style="color:#666666;">{{ statusFormat(item.status) }}</view>
         </view>
         <view class="order-list_info">
-            <view class="order-info_box">
-                <view>序号:</view>
-                <view>{{ item.sn||'' }}</view>
-            </view>
             <view class="order-info_box">
                 <view>单号:</view>
                 <view>{{ item.orderSn }}</view>
@@ -26,6 +22,10 @@
                 <view>数量:</view>
                 <view>{{ item.num }}</view>
             </view>
+            <view class="order-info_box">
+                <view>备注:</view>
+                <view>{{ item.remark||'' }}</view>
+            </view>
         </view>
         <view class="list-bottom">
             <view class="list-button">

+ 33 - 70
hdApp/src/components/app-delivery.vue

@@ -3,29 +3,41 @@
 
     <view class="module-com">
 
+      <tui-list-cell class="line-cell" :hover="false" :arrow="true">
+        <view class="tui-title">配送时间</view>
+        <picker mode="date" :value="form.reachDate" @change="selTimeFn" class="tui-input">
+          <view v-if="form.reachDate">{{ form.reachDate }}</view>
+          <view class="tui-placeholder" v-else>请选择送达时间</view>
+        </picker>
+      </tui-list-cell>
+
+      <tui-list-cell class="line-cell" :hover="false" :arrow="false">
+        <view class="tui-title">配送时段</view>
+        <view class="delivery-time">
+          <button class="button-com" :class="[form.reachPeriod == 0 ? 'red' : 'default']" @click="timeTodaySelFn(0)" >上午</button>
+          <button class="button-com" :class="[form.reachPeriod == 1 ? 'red' : 'default']" @click="timeTodaySelFn(1)" >下午</button>
+          <button class="button-com" :class="[form.reachPeriod == 2 ? 'red' : 'default']" @click="timeTodaySelFn(2)" >晚上</button>
+        </view>
+      </tui-list-cell>
+
+      <tui-list-cell class="line-cell" :hover="false">
+        <view class="tui-title">订花人姓名</view>
+        <input v-model="form.bookName" placeholder-class="phcolor" placeholder-style="color:#ccc" class="tui-input" name="bookName" placeholder="请填写" />
+      </tui-list-cell>
+
+      <tui-list-cell class="line-cell" :hover="false">
+        <view class="tui-title">订花人手机号</view>
+        <input v-model="form.bookMobile" placeholder-class="phcolor" placeholder-style="color:#ccc" class="tui-input" type="number" name="bookMobile" placeholder="请填写手机号" />
+      </tui-list-cell>
+
       <tui-list-cell class="line-cell" :hover="false">
         <view class="tui-title">收花人姓名</view>
-        <input
-          v-model="form.receiveUserName"
-          placeholder-class="phcolor"
-		      placeholder-style="color:#ccc"
-          class="tui-input"
-          name="receiveUserName"
-          placeholder="请填写姓名"
-        />
+        <input v-model="form.receiveUserName" placeholder-class="phcolor" placeholder-style="color:#ccc" class="tui-input" name="receiveUserName" placeholder="请填写姓名" />
       </tui-list-cell>
 
       <tui-list-cell class="line-cell" :hover="false">
         <view class="tui-title">收花人手机号</view>
-        <input
-          v-model="form.receiveMobile"
-          placeholder-class="phcolor"
-		      placeholder-style="color:#ccc"
-          class="tui-input"
-          type="number"
-          name="receiveMobile"
-          placeholder="请填写手机号"
-        />
+        <input v-model="form.receiveMobile" placeholder-class="phcolor" placeholder-style="color:#ccc" class="tui-input" type="number" name="receiveMobile" placeholder="请填写手机号" />
       </tui-list-cell>
 
       <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="selectCityFn">
@@ -41,31 +53,7 @@
 
       <tui-list-cell class="line-cell" :hover="false">
         <view class="tui-title">门牌号</view>
-        <input
-          v-model="form.floor"
-          placeholder-class="phcolor"
-		      placeholder-style="color:#ccc"
-          class="tui-input"
-          name="floor"
-          placeholder="楼号门牌号(选填)"
-        />
-      </tui-list-cell>
-
-      <tui-list-cell class="line-cell" :hover="false" :arrow="true">
-        <view class="tui-title">配送时间</view>
-        <picker mode="date" :value="form.reachDate" @change="selTimeFn" class="tui-input">
-          <view v-if="form.reachDate">{{ form.reachDate }}</view>
-          <view class="tui-placeholder" v-else>请选择送达时间</view>
-        </picker>
-      </tui-list-cell>
-
-      <tui-list-cell class="line-cell" :hover="false" :arrow="false">
-        <view class="tui-title">配送时段</view>
-        <view class="delivery-time">
-          <button class="button-com" :class="[form.reachPeriod == 0 ? 'red' : 'default']" @click="timeTodaySelFn(0)" >上午</button>
-          <button class="button-com" :class="[form.reachPeriod == 1 ? 'red' : 'default']" @click="timeTodaySelFn(1)" >下午</button>
-          <button class="button-com" :class="[form.reachPeriod == 2 ? 'red' : 'default']" @click="timeTodaySelFn(2)" >晚上</button>
-        </view>
+        <input v-model="form.floor" placeholder-class="phcolor" placeholder-style="color:#ccc" class="tui-input" name="floor" placeholder="楼号门牌号(选填)" />
       </tui-list-cell>
 
       <tui-list-cell class="line-cell" :hover="false">
@@ -79,29 +67,11 @@
         <input v-model="form.cardInfo" placeholder-class="phcolor" placeholder-style="color:#ccc" class="tui-input" name="bookName" placeholder="请填写" />
       </tui-list-cell>    
 
-      <tui-list-cell class="line-cell" :hover="false">
-        <view class="tui-title">订花人姓名</view>
-        <input v-model="form.bookName" placeholder-class="phcolor" placeholder-style="color:#ccc" class="tui-input" name="bookName" placeholder="请填写姓名(选填)" />
-      </tui-list-cell>
-
-      <tui-list-cell class="line-cell" :hover="false">
-        <view class="tui-title">订花人手机号</view>
-        <input
-          v-model="form.bookMobile"
-          placeholder-class="phcolor"
-		      placeholder-style="color:#ccc"
-          class="tui-input"
-          type="number"
-          name="bookMobile"
-          placeholder="请填写手机号"
-        />
-      </tui-list-cell>
-
       <tui-list-cell class="line-cell" :hover="false">
         <view class="none-name-delivery flex-center" style="padding-left:0upx;">
           <view class="tui-title">派送方式</view>
           <checkbox-group @change="anonymityChange" style="padding-left:70upx;">
-          <checkbox class="ljd-checkbox" value="1" id="noneNameText" ></checkbox>
+          <checkbox class="ljd-checkbox" value="1" style="transform:scale(0.6,0.6)" id="noneNameText" ></checkbox>
           <label for="noneNameText" class="none-name-text">匿名派送</label>
           </checkbox-group>
         </view>
@@ -112,14 +82,7 @@
     <view class="module-com remark-wrap">
       <tui-list-cell class="line-cell" :hover="false">
         <view class="tui-title">备注</view>
-        <input
-          v-model="form.remark"
-          placeholder-class="phcolor"
-          class="tui-input"
-          placeholder-style="color:#ccc"
-          name="remark"
-          placeholder="选填"
-        />
+        <input v-model="form.remark" placeholder-class="phcolor" class="tui-input" placeholder-style="color:#ccc" name="remark" placeholder="选填" />
       </tui-list-cell>
     </view>
 
@@ -298,7 +261,7 @@ export default {
     margin-bottom: 20upx;
     background-color: #fff;
     .none-name-text {
-      margin-left: 14upx;
+      margin-left: 10upx;
       color: $fontColor2;
     }
   }

+ 2 - 1
hdApp/src/pages.json

@@ -289,7 +289,8 @@
 				{ "path": "refundList", "style": { "navigationBarTitleText": "退款记录" } },
 				{ "path": "refundDetail", "style": { "navigationBarTitleText": "退款详情" } },
 				{ "path": "ship", "style": { "navigationBarTitleText": "发货" } },
-				{ "path": "fill-form", "style": { "navigationBarTitleText": "填写收花人" } }
+				{ "path": "fill-form", "style": { "navigationBarTitleText": "填写收花人" } },
+				{ "path": "workOrder", "style": { "navigationBarTitleText": "开单" } }
 			]
 		},
 		{

+ 3 - 1
hdPad/src/pages/home/components/console.vue

@@ -4,7 +4,9 @@
 	<!-- <view class="active" @click="resetCustomer">选客</view> -->
 	<view class="active" @click="gatheringFn()">收款</view>
 	<view class="active" @click="changeProperty">{{property==1 ? '花材' : '商品'}}</view>
-	<view class="active" @click="goSettleCommit">结算 </view>
+	 <view class="active" 
+ style="background-color:orange;color:white;border-color:orange;position:fixed;left:135upx;bottom:13upx;width:84upx;height:50upx;line-height:30upx;font-size:16upx;" 
+ @click="goSettleCommit">结算 </view>
     <view class="active" @click="toWastage">报损</view>
     <view class="active" @click="clearItemFn">清空</view>
 	<view class="active" @click="logoutFn">退出</view>

+ 1 - 0
hdPad/src/pages/home/components/leftArea.vue

@@ -88,6 +88,7 @@ export default {
         color: #FFFFFF;
     }
     & .itemList-item_box {
+        margin-bottom:55upx;
         overflow-y: auto;
         flex: 1;
         border: 1px solid #eee;

+ 1 - 0
hdPad/src/pages/home/components/leftGroup.vue

@@ -141,6 +141,7 @@ export default {
         color: #FFFFFF;
     }
     & .itemList-item_box {
+        margin-bottom:75upx;
         overflow-y: auto;
         flex: 1;
         border: 1px solid #eee;

+ 5 - 5
hdPad/src/pages/home/components/selectNumPrice.vue

@@ -48,13 +48,13 @@ export default {
     data() {
         return {
             //输入类型 0 数值 1价格
-            fillType:0,
+            fillType:1,
             currentNum:'',
-            unitPrice:'',
+            unitPrice:0,
             unitType:0,
             unitName:'',
             //全选类型 0 数值全选 1 价格全选 2 没有任何全选
-            checkType:0,
+            checkType:1,
             bigStockNum:0,
             smallStockNum:0
         };
@@ -149,8 +149,8 @@ export default {
             this.customData.unitType = this.unitType
             this.customData.unitName = this.unitName
             this.$emit('confirmAddItemModel', this.customData)
-            this.checkType = 0
-            this.fillType = 0
+            this.checkType = 1
+            this.fillType = 1
             this.unitType = 0
         },
         changeUnitType(){