Просмотр исходного кода

Merge branch 'master' of http://110.41.163.243:9980/kd-aiot/aiot-app into dengfei

695593266@qq.com 10 месяцев назад
Родитель
Сommit
7253eec5d4

+ 3 - 1
components/ServerSetting/index.vue

@@ -84,7 +84,7 @@
 			handleTest() {
 				this.setServerStatus = false
 				this.$refs.formRef.validate().then(res => {
-					console.log(res);
+			
 					uni.showLoading({
 						mask: true
 					})
@@ -93,6 +93,7 @@
 					uni.request({
 						url: `${this.formData.protocal}${this.formData.hostname}:${this.formData.port}/api/main/connection/getConnectionTest`,
 						method: 'get',
+						timeout:5000,
 						success: res => {
 							console.log(res);
 							this.url = res.data.code
@@ -104,6 +105,7 @@
 							}
 						},
 						fail: f => {
+							console.log(f);
 							uni.$u.toast('连接失败!')
 							uni.hideLoading()
 						}

+ 28 - 22
components/ba-tree-picker/ba-tree-picker.vue

@@ -5,7 +5,8 @@
 		<view class="tree-cover" :class="{ show: showDialog }" @tap="_cancel"></view>
 		<view class="tree-dialog" :class="{ show: showDialog }">
 			<view class="tree-bar">
-				<view class="tree-bar-cancel" :style="{ color: cancelColor }" hover-class="hover-c" @tap="_cancel">取消</view>
+				<view class="tree-bar-cancel" :style="{ color: cancelColor }" hover-class="hover-c" @tap="_cancel">取消
+				</view>
 				<view class="tree-bar-title" :style="{ color: titleColor }">{{ title }}</view>
 				<view class="tree-bar-confirm" :style="{ color: confirmColor }" hover-class="hover-c" @tap="_confirm">
 					{{ multiple ? '确定' : '' }}
@@ -14,35 +15,40 @@
 			<view class="tree-view">
 				<scroll-view class="tree-list" :scroll-y="true">
 					<block v-for="(item, index) in treeList" :key="index">
-						<view
-							class="tree-item"
-							:style="[
+						<view class="tree-item" :style="[
 								{
 									paddingLeft: item.level * 30 + 'rpx'
 								}
-							]"
-							:class="{
+							]" :class="{
 								itemBorder: border === true,
 								show: item.isShow
 							}">
 							<view class="item-label">
 								<view class="item-icon uni-inline-item" @tap.stop="_onItemSwitch(item, index)">
-									<view v-if="!item.isLastLevel && item.isShowChild" class="switch-on" :style="{ 'border-left-color': switchColor }"></view>
-									<view v-else-if="!item.isLastLevel && !item.isShowChild" class="switch-off" :style="{ 'border-top-color': switchColor }"></view>
-									<view v-else class="item-last-dot" :style="{ 'border-top-color': switchColor }"></view>
+									<view v-if="!item.isLastLevel && item.isShowChild" class="switch-on"
+										:style="{ 'border-left-color': switchColor }"></view>
+									<view v-else-if="!item.isLastLevel && !item.isShowChild" class="switch-off"
+										:style="{ 'border-top-color': switchColor }"></view>
+									<view v-else class="item-last-dot" :style="{ 'border-top-color': switchColor }">
+									</view>
 								</view>
 								<view class="uni-flex-item uni-inline-item" @tap.stop="_onItemSelect(item, index)">
 									<view class="item-name">
 										{{ item.name + (item.childCount ? '(' + item.childCount + ')' : '') }}
 									</view>
 									<view class="item-check" v-if="selectParent ? true : item.isLastLevel">
-										<view class="item-check-yes" v-if="item.checkStatus == 1" :class="{ radio: !multiple }" :style="{ 'border-color': confirmColor }">
-											<view class="item-check-yes-part" :style="{ 'background-color': confirmColor }"></view>
+										<view class="item-check-yes" v-if="item.checkStatus == 1"
+											:class="{ radio: !multiple }" :style="{ 'border-color': confirmColor }">
+											<view class="item-check-yes-part"
+												:style="{ 'background-color': confirmColor }"></view>
 										</view>
-										<view class="item-check-yes" v-else-if="item.checkStatus == 2" :class="{ radio: !multiple }" :style="{ 'border-color': confirmColor }">
-											<view class="item-check-yes-all" :style="{ 'background-color': confirmColor }"></view>
+										<view class="item-check-yes" v-else-if="item.checkStatus == 2"
+											:class="{ radio: !multiple }" :style="{ 'border-color': confirmColor }">
+											<view class="item-check-yes-all"
+												:style="{ 'background-color': confirmColor }"></view>
 										</view>
-										<view class="item-check-no" v-else :class="{ radio: !multiple }" :style="{ 'border-color': confirmColor }"></view>
+										<view class="item-check-no" v-else :class="{ radio: !multiple }"
+											:style="{ 'border-color': confirmColor }"></view>
 									</view>
 								</view>
 							</view>
@@ -56,7 +62,7 @@
 
 <script>
 	export default {
-		emits: ['select-change'],
+		emits: ['select-change', 'select-row'],
 		name: 'ba-tree-picker',
 		props: {
 			valueKey: {
@@ -73,20 +79,20 @@
 			},
 			localdata: {
 				type: Array,
-				default: function () {
+				default: function() {
 					return []
 				}
 			},
 			localTreeList: {
 				//在已经格式化好的数据
 				type: Array,
-				default: function () {
+				default: function() {
 					return []
 				}
 			},
 			selectedData: {
 				type: Array,
-				default: function () {
+				default: function() {
 					return []
 				}
 			},
@@ -278,7 +284,7 @@
 			},
 			// 节点选中、取消选中
 			_onItemSelect(item, index) {
-				//console.log('_onItemSelect')
+				
 				console.log('item-----------------------')
 				console.log(item)
 				if (!this.multiple) {
@@ -302,6 +308,7 @@
 					this._hide()
 					console.log('selectedList-----------------------')
 					this.$emit('select-change', selectedList, selectedNames, rootCategoryLevelId)
+					this.$emit('select-row', item)
 					return
 				}
 
@@ -471,8 +478,7 @@
 		padding: 15rpx;
 	}
 
-	.tree-bar-title {
-	}
+	.tree-bar-title {}
 
 	.tree-bar-cancel {
 		color: #757575;
@@ -641,4 +647,4 @@
 	.itemBorder {
 		border-bottom: 1px solid #e5e5e5;
 	}
-</style>
+</style>

+ 8 - 0
pages.json

@@ -2073,6 +2073,14 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
+		{
+			"path": "pages/doc/browse",
+			"style": {
+				"navigationBarTitleText": "预览",
+				"navigationStyle": "custom",
+				"navigationBarTextStyle": "white"
+			}
+		},
 		{
 			"path": "pages/salesServiceManagement/demandList/index",
 			"style": {

+ 66 - 54
pages/doc/api/index.js

@@ -12,34 +12,34 @@ import Vue from "vue";
  * @data data
  */
 export async function getDocTreeListAPI(data) {
-  const res = await postJ(Vue.prototype.apiUrl+'/fm/directory/selectTreeList', data);
-  if (res.code == 0) {
-    return res.data;
-  }
-  return Promise.reject(new Error(res.message));
+	const res = await postJ(Vue.prototype.apiUrl + '/fm/directory/selectTreeList', data);
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.message));
 }
 
 /**
-* 查询文件数据
-* @data data
-*/
+ * 查询文件数据
+ * @data data
+ */
 export async function filePageAPI(data) {
-  const res = await postJ(Vue.prototype.apiUrl+'/fm/file/pageBusiness', data);
-  if (res.code == 0) {
-    return res.data;
-  }
-  return Promise.reject(new Error(res.message));
+	const res = await postJ(Vue.prototype.apiUrl + '/fm/file/pageBusiness', data);
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.message));
 }
 /**
  * 保存
  * @data data
  */
 export async function fileSaveAPI(data) {
-  const res = await postJ(Vue.prototype.apiUrl+'/fm/file/save', data);
-  if (res.code == 0) {
-    return res.data;
-  }
-  return Promise.reject(new Error(res.message));
+	const res = await postJ(Vue.prototype.apiUrl + '/fm/file/save', data);
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.message));
 }
 
 /**
@@ -47,23 +47,23 @@ export async function fileSaveAPI(data) {
  * @id id
  */
 export async function fileGetByIdAPI(id) {
-  const res = await request.get(`/fm/file/getById/${id}`);
-  if (res.data.code == 0) {
-    return res.data.data;
-  }
-  return Promise.reject(new Error(res.data.message));
+	const res = await request.get(`/fm/file/getById/${id}`);
+	if (res.data.code == 0) {
+		return res.data.data;
+	}
+	return Promise.reject(new Error(res.data.message));
 }
 
 /**
  * ids查询文件列表
  * @data data
  */
- export async function queryIds(data) {
-  const res = await postJ(Vue.prototype.apiUrl+'/fm/file/queryIds', data);
-  if (res.code == 0) {
-    return res.data;
-  }
-  return Promise.reject(new Error(res.message));
+export async function queryIds(data) {
+	const res = await postJ(Vue.prototype.apiUrl + '/fm/file/queryIds', data);
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.message));
 }
 
 
@@ -71,41 +71,53 @@ export async function fileGetByIdAPI(id) {
 
 // 获取编码树
 export async function selectTreeList(data) {
-  const res = await postJ(Vue.prototype.apiUrl+`/main/business_code_category/selectTreeList`, data);
-  if (res.code == 0) {
-    return res.data;
-  }
-  return Promise.reject(new Error(res.message));
+	const res = await postJ(Vue.prototype.apiUrl + `/main/business_code_category/selectTreeList`, data);
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.message));
 }
 // 获取右侧列表
 export async function listParentId(data) {
-  const res = await postJ(Vue.prototype.apiUrl+`/main/business_code_category/listPageParentId`, data);
-  if (res.code == 0) {
-    return res.data;
-  }
-  return Promise.reject(new Error(res.message));
+	const res = await postJ(Vue.prototype.apiUrl + `/main/business_code_category/listPageParentId`, data);
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.message));
 }
 
 /**
  * 上传文件
  * @param file 文件
  */
- export async function uploadFileNew (data) {
-  const formData = new FormData();
-  formData.append('multiPartFile', data.multiPartFile);
-  formData.append('module', data.module);
-  const res = await post(Vue.prototype.apiUrl+'/main/file/uploadFile', formData);
-  if (res.code === '0') {
-    return res.data;
-  }
-  return Promise.reject(new Error(res.message));
+export async function uploadFileNew(data) {
+	const formData = new FormData();
+	formData.append('multiPartFile', data.multiPartFile);
+	formData.append('module', data.module);
+	const res = await post(Vue.prototype.apiUrl + '/main/file/uploadFile', formData);
+	if (res.code === '0') {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.message));
 }
 // 编码方案
-export async function listCode() {
-  const res = await get(Vue.prototype.apiUrl+`/main/business_code_category/listCode/WD0001`);
-  if (res.code == 0) {
-    return res.data;
-  }
-  return Promise.reject(new Error(res.message));
+
+export async function listCode(data = {}) {
+	const res = await get(Vue.prototype.apiUrl + `/main/business_code_category/listCode/${data.id || '0'}` +
+		'?parentId=' +
+		(data.parentId || ''));
+
+	console.log(res);
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.message));
 }
 
+// export async function listCode() {
+//   const res = await get(Vue.prototype.apiUrl+`/main/business_code_category/listCode/WD0001`);
+//   if (res.code == 0) {
+//     return res.data;
+//   }
+//   return Promise.reject(new Error(res.message));
+// }

+ 60 - 47
pages/doc/browse.vue

@@ -1,53 +1,66 @@
 <template>
-<!--   <web-view
-      :src="fileUrl"
-      width="100%"
-      v-if="showEditFlag"
-      style="height: calc(100vh - 100px)"
-      frameborder="0"
-      allowfullscreen="true"
-    ></web-view> -->
+
+	<view class="">
+		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="预览" @clickLeft="back">
+		</uni-nav-bar>
+
+		<web-view :src="fileUrl" class="webview" allow :fullscreen="false" :webview-styles="webviewStyles"
+			style="width: 100%;height: calc(100vh - 100px)" :frameborder="0"></web-view>
+
+	</view>
+
 </template>
 
 <script>
-import { getFileType } from './util.js';
-
-export default {
-  data() {
-    return {
-      fileUrl: '',
-      showEditFlag: false
-    };
-  },
-
-  methods: {
-    open(row){
-      this.showEditFlag=true
-      this.setFileUrl(row)
-    },
-    setFileUrl(row) {
-      let file = row.storagePath[0];
-      let fileNames=file.storePath.split('/')
-      let url = window.location.origin+'/api/main/file/getFile?objectName='+file.storePath+'&fullfilename='+fileNames[fileNames.length-1]
-      this.fileUrl = '/kkfile/onlinePreview?url=' + btoa(url);
-      
-      // const fileExt = file.name.substr(file.name.lastIndexOf('.') + 1);
-      // this.fileType = getFileType().includes(fileExt) ? 2 : 1;
-      // if (this.fileType == 2) {
-      //   this.fileUrl =
-      //     '/fm/' +
-      //     (['dxf', 'dwg'].includes(fileExt) ? '2DViewer' : '3DViewer') +
-      //     '/view.html?url=' +
-      //     sessionStorage.filePath +
-      //     '/' +
-      //     row.outputNdsFiles;
-      // } else {
-      //   this.fileUrl = '/kkfile/onlinePreview?url=' + btoa(url);
-      //   // 'http://192.168.1.107:18082/kkfile/onlinePreview?url=' + btoa(url);
-      // }
-    }
-  }
-};
+	// import { getFileType } from './util.js';
+
+	export default {
+		data() {
+			return {
+				fileUrl: '',
+				showEditFlag: false,
+				webviewStyles: {
+					width: '100%',
+					height: '100%',
+					bottom: '56px'
+				}
+			};
+		},
+		onLoad({
+			url
+		}) {
+
+			uni.getSystemInfo({
+				success: (res) => {
+					this.webviewStyles.height = res.screenHeight - res.statusBarHeight - res.safeAreaInsets
+						?.bottom - 100 + 'px';
+					this.webviewStyles.bottom = res.safeAreaInsets?.bottom + 56 + 'px';
+				}
+
+
+			})
+
+			this.fileUrl = url
+			console.log(url);
+		},
+
+		methods: {
+			// open(row) {
+			// 	this.showEditFlag = true
+			// 	this.setFileUrl(row)
+			// },
+			setFileUrl(row) {
+				let file = row.storagePath[0];
+				let fileNames = file.storePath.split('/')
+				let url = window.location.origin + '/api/main/file/getFile?objectName=' + file.storePath +
+					'&fullfilename=' + fileNames[fileNames.length - 1]
+				this.fileUrl = '/kkfile/onlinePreview?url=' + btoa(url);
+
+			
+			}
+		}
+	};
 </script>
 <style scoped lang="scss">
-</style>
+
+</style>

+ 22 - 3
pages/doc/docList.vue

@@ -15,8 +15,7 @@
 				</view>
 
 				<view slot="value" class="listBtn">
-
-					<u-button text="浏览" size='mini'></u-button>
+					<u-button text="浏览" size='mini' @click="preview(item)"></u-button>
 					<u-button v-if="type!=='view'" text="删除" size='mini' @click="del(index)"></u-button>
 				</view>
 			</u-cell>
@@ -57,7 +56,7 @@
 			type
 		}) {
 			this.type = type
-			console.log(type);
+			console.log(type,fileId);
 			if (fileId) {
 				this.fileId = JSON.parse(fileId)
 			}
@@ -100,6 +99,26 @@
 			done(id) {
 				this.fileId.push(...id);
 				this.init()
+			},
+			preview(row) {
+				const apiInfo = uni.getStorageSync('apiInfo')
+
+				const orgin =
+					apiInfo.hostname &&
+					`${apiInfo.protocal || ''}${apiInfo.hostname || ''}:${apiInfo.port || ''}`
+
+
+				let file = row.storagePath[0];
+				let fileNames = file.storePath.split('/')
+				let url = orgin + '/api/main/file/getFile?objectName=' + file.storePath +
+					'&fullfilename=' + fileNames[fileNames.length - 1]
+				let previewUrl = orgin + '/kkfile/onlinePreview?url=' + btoa(url);
+
+
+
+				uni.navigateTo({
+					url: `/pages/doc/browse?url=${previewUrl}`
+				})
 			}
 
 		}

+ 160 - 56
pages/doc/file-edit.vue

@@ -1,42 +1,76 @@
 <template>
-	<u-popup :show="show" @close="cancel" :closeable="true">
+	<u-popup :show="show" @close="cancel" :closeable="false">
 		<view style="width: 750rpx;">
-			<u-cell-group>
-				<u-cell title="编码分类">
-					<u--input slot="value" placeholder="请选择" border="surround" v-model="form.codeTypeName"
-						@click.native="codeTypeOpen"></u--input>
-				</u-cell>
-				<u-cell title="编码方案">
+
+			<u--form ref="uForm" labelPosition="left" :model="form" labelWidth="180" labelAlign="left" :rules="rules">
+
+				<u-form-item label="文档位置" prop="directoryName">
+					<u--input placeholder="请选择" border="surround" v-model="form.directoryName"
+						@click.native="directoryIdOpen">
+					</u--input>
+				</u-form-item>
+
+				<u-form-item label="编码分类" prop="codeTypeName">
+					<u--input placeholder="请选择" border="surround" v-model="form.codeTypeName"
+						@click.native="codeTypeOpen">
+					</u--input>
+				</u-form-item>
+
+
+				<u-form-item label="编码方案" prop="businessCodeId">
+					<zxz-uni-data-select :localdata="options" v-model="form.businessCodeId" dataValue='id'
+						dataKey="name"></zxz-uni-data-select>
+				</u-form-item>
+
+
+
+
+				<!-- 	<u-cell title="编码方案">
 					<uni-data-picker :map="{text:'name',value:'id'}" v-model="form.businessCodeId" slot="value"
 						placeholder="请选择" :localdata="options">
 					</uni-data-picker>
-				</u-cell>
-				<u-cell title="文档类型">
-					<uni-data-picker v-model="form.type" slot="value" placeholder="请选择" :localdata="doc_type">
+				</u-cell> -->
+
+
+				<!-- 	<u-cell title="文档类型">
+						<uni-data-picker v-model="form.type" slot="value" placeholder="请选择" :localdata="doc_type">
 					</uni-data-picker>
-				</u-cell>
-				<u-cell title="文档">
-					<fileSelector class="fileList" slot="value" 
-						@filesChanged="onFilesChanged" />
+					
 
+					</u-cell> -->
+
+
+				<u-form-item label="文档类型" prop="type">
+					<zxz-uni-data-select :localdata="doc_type" v-model="form.type" dataValue='value'
+						dataKey="text"></zxz-uni-data-select>
+				</u-form-item>
+
+
+				<!-- <u-form-item :label="文档类型" prop="form.type">
+					<zxz-uni-data-select :localdata="doc_type" v-model="form.type" dataValue='value'
+						dataKey="text"></zxz-uni-data-select>
+				</u-form-item> -->
+
+				<u-cell title="文档">
+					<fileSelector class="fileList" slot="value" @filesChanged="onFilesChanged" />
 				</u-cell>
-				<u-cell title="文档位置">
-					<u--input slot="value" placeholder="请选择" border="surround" v-model="form.directoryName"
-						@click.native="directoryIdOpen">
-					</u--input>
-				</u-cell>
-			</u-cell-group>
-			<view class="btn">
-				<u-button type="primary" @click="cancel" text="返回"></u-button>
-				<u-button @click="save" text="保存"></u-button>
-			</view>
+
+
+				<view class="btn">
+					<u-button type="primary" @click="cancel" text="返回"></u-button>
+					<u-button @click="save" text="保存"></u-button>
+				</view>
+
+			</u--form>
 
 
 		</view>
-		<ba-tree-picker ref="codeTypeRef" key="verify" :multiple="false" @select-change="codeTypeBack" title="选择编码分类"
+		<ba-tree-picker ref="directoryIdRef" :multiple="false" title="选择文档位置" :localdata="folderList" valueKey="id"
+			textKey="name" childrenKey='sonDirectoryList' @select-row="directoryIdBack" />
+
+		<ba-tree-picker ref="codeTypeRef" key="verify" :multiple="false" @select-row="codeTypeBack" title="选择编码分类"
 			:localdata="list" valueKey="id" textKey="name" childrenKey='sonDirectoryList' />
-		<ba-tree-picker ref="directoryIdRef" :multiple="false" @select-change="directoryIdBack" title="选择文档位置"
-			:localdata="folderList" valueKey="id" textKey="name" childrenKey='sonDirectoryList' />
+
 	</u-popup>
 </template>
 
@@ -88,7 +122,23 @@
 				list: [],
 				options: [],
 				show: false,
-				doc_type: []
+				doc_type: [],
+				rules: {
+					'directoryName': {
+						type: 'string',
+						required: true,
+						message: '请选择文档位置',
+						trigger: ['blur', 'change']
+					},
+					'businessCodeId': {
+						type: 'string',
+						required: true,
+						message: '请选择编码方案',
+						trigger: ['blur', 'change']
+					},
+				},
+				nodeData: {}
+
 			};
 		},
 
@@ -133,15 +183,42 @@
 			codeTypeOpen() {
 				this.$refs.codeTypeRef._show()
 			},
+			async directoryIdBack(data) {
+				console.log(data);
+				this.nodeData.id = data?.id
+				this.nodeData.parentId = data.parentId == -1 ? '' : data.parentId
+
+				this.form.directoryName = data.name
+				this.form.directoryId = data.id
+
+				this.options = this.nodeData.id ? await listCode(this.nodeData) : [];
+
+				if (this.options.length > 0) {
+					this.form.businessCodeId = this.options[0].id;
+					this.form.codeType = this.options[0].parentId;
+				} else {
+					this.form.businessCodeId = '';
+				}
+
+				// this.form.directoryName = name
+				// this.form.directoryId = data[0]
+
+			},
 			async codeTypeBack(data, name) {
+				console.log(data);
+
 				let list = await listParentId({
 					pageNum: 1,
 					size: 100,
-					parentId: data[0]
+					parentId: data.id,
+					objId: this.nodeData?.id,
+					objParentId: this.nodeData?.parentId
 				});
-				this.form.codeTypeName = name
-				this.form.codeType = data[0]
+				// this.form.codeTypeName = data.name
+				// this.form.codeType = data
 				this.options = list.list.filter((item) => item.type == 2);
+				this.form.codeType = data.id;
+				this.form.codeTypeName = data.name;
 				this.form.businessCodeId = '';
 			},
 			uploadFile(list) {
@@ -171,38 +248,55 @@
 			directoryIdOpen() {
 				this.$refs.directoryIdRef._show()
 			},
-			directoryIdBack(data, name) {
-
-				this.form.directoryName = name
-				this.form.directoryId = data[0]
-
-			},
 
 			// 当文件发生变化时触发
 			onFilesChanged(fileList) {
+				console.log(fileList);
 				this.files = fileList
+				this.form.name = fileList[0].name.replace(/\.[^/.]+$/, '');
+
 				// console.log('文件列表:', fileList)
 			},
 			/* 保存编辑 */
 			async save() {
-				uni.showLoading({
-					title: '加载中'
-				})
+				console.log(this.form);
+				let _this = this
+
+				this.$refs.uForm.validate().then(async res => {
 
-				this.form.storagePath = await this.uploadFile(this.files)
-				fileSaveAPI(this.form)
-					.then((msg) => {
-						uni.hideLoading()
-						console.log(msg,'msg')
-						
-						this.$emit('success', msg);
-						this.cancel()
+					uni.showLoading({
+						title: '加载中'
 					})
-					.catch((e) => {
-						uni.hideLoading()
-						this.cancel()
-						
-					});
+
+					_this.form.storagePath = await _this.uploadFile(_this.files)
+					let params = {
+						..._this.form
+					}
+					delete params.codeTypeName
+					delete params.directoryName
+
+					fileSaveAPI(_this.form)
+						.then((msg) => {
+							uni.hideLoading()
+							console.log(msg, 'msg')
+
+							_this.$emit('success', msg);
+							_this.cancel()
+						})
+						.catch((e) => {
+							uni.hideLoading()
+							_this.cancel()
+
+						});
+
+				}).catch(errors => {
+					uni.$u.toast('校验失败')
+				})
+
+
+
+
+
 			},
 
 			cancel() {
@@ -253,13 +347,23 @@
 			margin-bottom: 8rpx;
 		}
 	}
-	.btn{
+
+	.btn {
 		margin-top: 16rpx;
 		margin-bottom: 10rpx;
 		display: flex;
-		uni-bottom{
+
+		uni-bottom {
 			width: 160rpx;
 		}
-		
+
+	}
+
+	// /deep/.u-form-item__body {
+	// 	padding: 16rpx 0
+	// }
+
+	/deep/ .u-form {
+		padding: 30rpx;
 	}
 </style>

+ 9 - 1
pages/saleManage/contact/components/followListAdd.vue

@@ -26,6 +26,12 @@
 			<u-cell title="下一步计划" arrow-direction="down">
 				<u--textarea slot="value" placeholder="请输入" border="surround" v-model="form.nextPlan"></u--textarea>
 			</u-cell>
+			
+			<u-cell title="附件" arrow-direction="down">
+				<fileMain slot="value" v-model="form.files"></fileMain>
+			</u-cell>
+			
+			
 			<view class="footerButton">
 				<u-button type="default" text="返回" @click="back"></u-button>
 				<u-button type="primary" @click="save" text="保存"></u-button>
@@ -37,13 +43,15 @@
 </template>
 
 <script>
+	import fileMain from "@/pages/doc/index.vue" 
 	import baTreePicker from "@/components/ba-tree-picker1/ba-tree-picker.vue"
 	import {
 		getByCode
 	} from '@/api/pda/common.js'
 	export default {
 		components: {
-			baTreePicker
+			baTreePicker,
+			fileMain
 		},
 		
 		data() {

+ 20 - 4
pages/tour_tally/order/order.vue

@@ -253,12 +253,28 @@
 				this.searchShow = true
 			},
 			confirmSearch(e) {
-				console.log(e);
+
 				let data = JSON.parse(JSON.stringify(e))
-				this.searchForm = {
-					...this.searchForm,
-					...data
+
+
+
+				if (data.startEndTime) {
+					var [startTime, endTime] = data.startEndTime
+					delete data.startEndTime
+					this.searchForm = {
+						...this.searchForm,
+						...data,
+						startTime,
+						endTime
+					}
+				} else {
+					this.searchForm = {
+						...this.searchForm,
+						...data
+					}
 				}
+
+
 				console.log(this.searchForm);
 				this.doSearch()
 			},