AlanWong 2 سال پیش
والد
کامیت
75ed7e437e

+ 10 - 1
src/api/currency.ts

@@ -1,11 +1,19 @@
 import request from '@/benyun/utils/request'
 
+// 获取树形导航分类
+function treeList(url : any) {
+	return request({
+		url: '/maindata/' + url + '/treeList',
+		method: 'GET',
+	})
+}
+
 // 分页查询数据
 function pageList(data : any, url : any) {
 	return request({
 		url: '/maindata/' + url + '/page',
 		method: 'GET',
-		data: data
+		params: data
 	})
 }
 
@@ -34,6 +42,7 @@ function deleteList(data : any, url : any) {
 	})
 }
 export default {
+	treeList,
 	pageList,
 	saveList,
 	updateList,

+ 50 - 0
src/api/order.ts

@@ -0,0 +1,50 @@
+import request from '@/benyun/utils/request'
+
+// 获取树形导航分类
+function treeList(url : any) {
+	return request({
+		url: '/supply/' + url + '/treeList',
+		method: 'GET',
+	})
+}
+
+// 分页查询数据
+function pageList(data : any, url : any) {
+	return request({
+		url: '/supply/' + url + '/page',
+		method: 'GET',
+		params: data
+	})
+}
+
+// 新增数据
+function saveList(data : any, url : any) {
+	return request({
+		url: '/supply/' + url + '/save',
+		method: 'POST',
+		data: data
+	})
+}
+// 修改数据
+function updateList(data : any, url : any) {
+	return request({
+		url: '/supply/' + url + '/update',
+		method: 'POST',
+		data: data
+	})
+}
+// 删除数据
+function deleteList(data : any, url : any) {
+	return request({
+		url: '/supply/' + url + '/delete',
+		method: 'POST',
+		params: data
+	})
+}
+export default {
+	treeList,
+	pageList,
+	saveList,
+	updateList,
+	deleteList
+}

+ 0 - 5
src/views/AboutView.vue

@@ -1,5 +0,0 @@
-<template>
-  <div class="about">
-    <h1>This is an about page77</h1>
-  </div>
-</template>

+ 477 - 0
src/views/audit/agencyGoods/index.vue

@@ -0,0 +1,477 @@
+<template>
+	<div class="my-container">
+		<div class="bill-left">
+			<div class="bill-tab">
+				<div class="title">导航</div>
+				<el-tree :data="data" :props="props" @node-click="handleNodeClick"></el-tree>
+			</div>
+		</div>
+		<div class="bill-main">
+			<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
+				@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit">
+			</module-view>
+		</div>
+		<!-- 新增/编辑弹窗 -->
+		<el-dialog :title="popTitle+'品牌'" :visible.sync="dialogFormVisible" width="30%">
+			<by-form :propConfig="addConfig" ref="addFormId">
+				<template v-slot:logo>
+					<el-upload :limit='1' :action="baseURL+'/file/upload'" list-type="picture-card"
+						:on-preview="handlePictureCardPreview" :on-remove="handleRemove">
+						<i class="el-icon-plus"></i>
+					</el-upload>
+				</template>
+				<template v-slot:status class="clearfix">
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="1">启用</el-radio>
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="0">禁用</el-radio>
+				</template>
+			</by-form>
+			<div slot="footer" class="dialog-footer">
+				<el-button @click="dialogFormVisible = false">取 消</el-button>
+				<el-button type="primary" @click="confirm">确 定</el-button>
+			</div>
+		</el-dialog>
+	</div>
+</template>
+<script lang="ts">
+	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+	import api from "@/api/currency";
+	@Component
+	export default class Virtually extends Vue {
+		// 左边
+		data : any = []
+		props = {
+			label: 'name',
+			children: 'children'
+		}
+		// 右边
+		baseURL : any = process.env.VUE_APP_BASE_API
+		timeNum = 0;
+		timer : any = null
+		popTitle : any = ''
+		radio : any = 1
+		dialogFormVisible : boolean = false
+		config : any = {
+			search: {
+				attr: {
+					size: 'mini'
+				},
+				columns: [
+					[{
+						span: 6,
+						label: '名称',
+						prop: 'name',
+						component: 'by-input',
+						labelWidth: '70px',
+						compConfig: {
+							attr: {
+								placeholder: '请输入名称',
+								clearable: true
+							},
+						},
+					},
+					{
+						span: 6,
+						label: '简称',
+						prop: 'shortName',
+						component: 'by-input',
+						labelWidth: '70px',
+						compConfig: {
+							attr: {
+								placeholder: '请输入简称',
+								clearable: true
+							},
+						},
+					},
+					{
+						span: 6,
+						label: '状态',
+						prop: 'status',
+						component: 'by-select',
+						labelWidth: '70px',
+						compConfig: {
+							attr: {
+								placeholder: '请选择数据',
+								clearable: true,
+								data: [{
+									value: 0,
+									label: '禁用'
+								}, {
+									value: 1,
+									label: '启用'
+								}]
+							}
+						}
+					},
+					{
+						span: 6,
+						label: '备注',
+						prop: 'remark',
+						component: 'by-input',
+						labelWidth: '70px',
+						compConfig: {
+							attr: {
+								placeholder: '请输入备注',
+								clearable: true
+							},
+						},
+					},
+					]
+				]
+			},
+			tool: {
+				tools: {
+					add: true,
+					export: true,
+					delete: true,
+					search: true,
+					refresh: true
+				}
+			},
+			table: {
+				attr: {
+					size: 'mini',
+					seq: true,
+					align: 'center',
+					checkbox: true,
+					height: 600
+				},
+				columns: [{
+					title: '名称',
+					field: 'name',
+					isDetail: true,
+					width: 150,
+				}, {
+					title: '简称',
+					field: 'shortName'
+				}, {
+					title: '状态',
+					field: 'status',
+					prop: 'status',
+				},
+				{
+					title: '备注',
+					field: 'remark',
+				}, {
+					title: '操作',
+					action: true,
+					plugins: [{
+						icon: 'el-icon-edit',
+						name: '编辑',
+						audit: '',
+						event: {
+							click: (item : any) => {
+								(this as any).openEdit(item)
+							}
+						}
+					}, {
+						name: '删除',
+						event: {
+							click: (item : any) => (this as any).doDelete2(item)
+						}
+					}]
+				}]
+			},
+		}
+		addConfig = {
+			attr: {
+				size: 'small',
+				rules: {
+					name: [{
+						required: true, message: '请输入名称', trigger: 'blur'
+					}],
+				}
+			},
+			columns: [
+				[
+					{
+						span: 20,
+						label: '名称',
+						prop: 'name',
+						component: 'by-input',
+					},
+					{
+						span: 20,
+						label: '简称',
+						slot: true,
+						prop: 'shortName',
+						component: 'by-input',
+					},
+					{
+						span: 20,
+						label: '显示状态',
+						slot: true,
+						prop: 'status',
+					},
+					{
+						span: 20,
+						label: '备注',
+						slot: true,
+						prop: 'remark',
+						component: 'by-input',
+					},
+				],
+			]
+		}
+		created() {
+			this.getTreeList()
+			this.timer = setInterval(() => {
+				this.getDataList()
+			}, 500)
+		}
+		// 获取树型导航数据
+		getTreeList() {
+			api.treeList('maindataMaterialOrganizationCategory').then((res : any) => {
+				// console.log(res.data[0]);
+				if (res.code === 200) {
+					this.data = res.data[0].children;
+				} else this.failHandle(res)
+			})
+		}
+		// 确认新增/编辑
+		confirm() {
+			(this as any).$refs.addFormId.validate().then(() => {
+				let query = (this as any).$refs.addFormId.getValue();
+				query.status = this.radio;
+				this.dialogFormVisible = false;
+				if (this.popTitle === '新增') {
+					api.saveList(query, 'maindataMaterialOrganizationCategory').then((res : any) => {
+						if (res.code === 200) {
+							this.$message({
+								type: 'success',
+								message: this.popTitle + '成功!'
+							});
+							this.getDataList();
+						} else this.failHandle(res)
+					})
+				} else if (this.popTitle === '编辑') {
+					api.updateList(query, 'maindataMaterialOrganizationCategory').then((res : any) => {
+						if (res.code === 200) {
+							this.$message({
+								type: 'success',
+								message: this.popTitle + '成功!'
+							});
+							this.getDataList();
+						} else this.failHandle(res)
+					})
+				}
+			})
+		}
+		// 获取列表数据
+		getDataList() {
+			if (!this.$refs.moduleView) {
+				if (this.timeNum > 5) {
+					clearInterval(this.timer)
+				}
+				this.timeNum++;
+				return
+			}
+			clearInterval(this.timer)
+			let query = (this.$refs.moduleView as any).getQuery();
+			console.log('表单字段 ==> ', query);
+			api.pageList(query, 'maindataMaterialOrganizationCategory').then((res : any) => {
+				if (res.code === 200) {
+					(this.$refs.moduleView as any).setTableValue(res.data.records);
+					let page = {
+						pageNo: res.data.current, //当前页
+						pageSize: res.data.size, //每页条数
+						total: res.data.total //总条数
+					};
+					(this.$refs.moduleView as any).setPage(page)
+				} else this.failHandle(res)
+			})
+		}
+		// 工具栏方法
+		clickHandle(e : any) {
+			if (e === 'onRefresh') (this.$refs.moduleView as any).resert();
+			if (e === 'onAdd') this.onAdd();
+			if (e === 'onDelete') this.onDelete();
+			if (e === 'onExport') this.onExport();
+		}
+		// 打开新增
+		onAdd() {
+			this.popTitle = '新增'
+			this.dialogFormVisible = true;
+			setTimeout(() => {
+				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
+			}, 0)
+		}
+		// 打开编辑
+		openEdit(e : any) {
+			this.popTitle = '编辑'
+			this.dialogFormVisible = true;
+			setTimeout(() => {
+				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);
+			}, 0)
+		}
+		// 工具栏删除
+		onDelete() {
+			let selectData = (this.$refs.moduleView as any).getSelectData()
+			let ids = '';
+			if (selectData.length > 0) {
+				selectData.map((v : any) => {
+					ids += v.id + ','
+				})
+			} else return this.$message({ type: 'warning', message: '请选择删除数据' })
+			ids = ids.slice(0, ids.length - 1);
+			api.deleteList({ ids: ids }, 'maindataMaterialOrganizationCategory').then((res : any) => {
+				if (res.code === 200) {
+					this.getDataList();
+					this.$message({
+						type: 'success',
+						message: '删除成功!'
+					});
+				} else this.failHandle(res)
+			})
+		}
+		// 操作删除
+		doDelete2(item : any) {
+			api.deleteList({ ids: item.id }, 'maindataMaterialOrganizationCategory').then((res : any) => {
+				if (res.code === 200) {
+					this.getDataList();
+					this.$message({
+						type: 'success',
+						message: '删除成功!'
+					});
+				} else this.failHandle(res)
+			})
+		}
+		handleRemove(file : any, fileList : any) {
+			console.log(file, fileList);
+		}
+		handlePictureCardPreview(file : any) {
+			console.log(file);
+		}
+		// 导航切换
+		handleNodeClick(e : any) {
+			console.log('导航id ==> ',e.id);
+			// api.single({ categoryId: e.id }).then((res : any) => {
+			// 	if (res.code === 200) {
+			// 		(this.$refs.moduleView as any).setTableValue(res.data.records);
+			// 		let page = {
+			// 			pageNo: res.data.current, //当前页
+			// 			pageSize: res.data.size, //每页条数
+			// 			total: res.data.total //总条数
+			// 		};
+			// 		(this.$refs.moduleView as any).setPage(page)
+			// 	}
+			// })
+		}
+		//导出
+		onExport() {
+			let urlArr = '/maindata/maindataMaterial';
+			let query = (this.$refs.moduleView as any).getQuery();
+			(this as any).$download(urlArr + '/export', {
+				...query
+			}, urlArr[urlArr.length - 1] + `_${new Date().getTime()}.xlsx`)
+		}
+		// 运行错误
+		failHandle(err : any) {
+			let msg = err.msg ? err.msg : '运行错误!';
+			this.$message.error(msg)
+		}
+
+	}
+</script>
+<style lang="scss" scoped>
+	.my-container {
+		width: 100%;
+		box-sizing: border-box;
+		display: flex;
+		padding: 16px;
+
+		.search-btn {
+			width: 100%;
+			display: flex;
+			justify-content: flex-end;
+			margin-bottom: 20px;
+		}
+
+		.bill-left {
+			position: relative;
+			border-right: solid #EEE 1px;
+			padding-right: 16px;
+			flex-shrink: 0;
+
+			// box-sizing: border-box;
+			.bill-tab {
+				width: 150px;
+				height: 100%;
+				transition: all .5s;
+				overflow: hidden;
+			}
+
+			.title {
+				font-size: 16px;
+				padding-bottom: 16px;
+				width: 200px;
+			}
+
+			.bill-nav {
+				font-size: 14px;
+				height: 30px;
+				line-height: 30px;
+				width: 200px;
+				box-sizing: border-box;
+				padding: 0 8px;
+				cursor: pointer;
+				margin-bottom: 2px;
+				border-radius: 5px;
+			}
+
+			.onBill {
+				background-color: #bde3f7;
+			}
+
+			.bill-nav:hover {
+				background-color: #bde3f7;
+			}
+
+			.close {
+				height: 22px;
+				width: 22px;
+				border-radius: 50%;
+				border: solid #EEE 1px;
+				position: absolute;
+				top: 30px;
+				right: -11px;
+				background-color: #FFF;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				cursor: pointer;
+			}
+		}
+
+		.bill-main {
+			width: calc(100% - 16px);
+			box-sizing: border-box;
+			margin-left: 16px;
+			position: relative;
+
+			.bill-box {
+				width: 100%;
+				position: absolute;
+				left: 0;
+				top: 0;
+				opacity: 0;
+				z-index: -1;
+				transition: all .5s;
+
+				.bill-tool,
+				.table-tool {
+					width: 100%;
+					padding-bottom: 16px;
+				}
+
+				.form {
+					margin-bottom: 8px;
+				}
+			}
+
+			.on-show {
+				opacity: 1;
+				z-index: 1;
+			}
+		}
+	}
+</style>

+ 216 - 97
src/views/audit/attribute/index.vue

@@ -8,23 +8,49 @@
 		</div>
 		<div class="bill-main">
 			<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
-				@resert="getDataList" @clickHandle="clickHandle" />
+				@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit">
+			</module-view>
 		</div>
+		<!-- 新增/编辑弹窗 -->
+		<el-dialog :title="popTitle+'品牌'" :visible.sync="dialogFormVisible" width="30%">
+			<by-form :propConfig="addConfig" ref="addFormId">
+				<template v-slot:logo>
+					<el-upload :limit='1' :action="baseURL+'/file/upload'" list-type="picture-card"
+						:on-preview="handlePictureCardPreview" :on-remove="handleRemove">
+						<i class="el-icon-plus"></i>
+					</el-upload>
+				</template>
+				<template v-slot:status class="clearfix">
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="1">启用</el-radio>
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="0">禁用</el-radio>
+				</template>
+			</by-form>
+			<div slot="footer" class="dialog-footer">
+				<el-button @click="dialogFormVisible = false">取 消</el-button>
+				<el-button type="primary" @click="confirm">确 定</el-button>
+			</div>
+		</el-dialog>
 	</div>
 </template>
 <script lang="ts">
 	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
-	import api from "@/api/material";
+	import api from "@/api/currency";
 	import materialClass from "@/api/materialClass";
-	@Component({})
+	@Component
 	export default class Attribute extends Vue {
-		timeNum = 0;
-		timer : any = null
+		// 左边
 		data : any = []
 		props = {
 			label: 'name',
 			children: 'children'
 		}
+		// 右边
+		baseURL : any = process.env.VUE_APP_BASE_API
+		timeNum = 0;
+		timer : any = null
+		popTitle : any = ''
+		radio : any = 1
+		dialogFormVisible : boolean = false
 		config : any = {
 			search: {
 				attr: {
@@ -42,48 +68,45 @@
 								placeholder: '请输入名称',
 								clearable: true
 							},
-							event: {
-								click: (item : any) => {
-									console.log('该行数据:', item)
-								}
-							}
 						},
-					}, {
-						span: 6,
-						label: '简称',
-						prop: 'shortName',
-						component: 'by-input',
-						labelWidth: '70px',
-						compConfig: {
-							attr: {
-								placeholder: '请输入简称',
-								clearable: true
-							}
-						}
 					},
 					{
 						span: 6,
-						label: '状态',
-						prop: 'status',
-						component: 'by-input',
+						label: '属性类型',
+						prop: 'attributeType',
+						component: 'by-select',
 						labelWidth: '70px',
 						compConfig: {
 							attr: {
-								placeholder: '请输入状态',
-								clearable: true
+								placeholder: '请选择数据',
+								clearable: true,
+								data: [{
+									value: 0,
+									label: '销售属性'
+								}, {
+									value: 1,
+									label: '基本属性'
+								}]
 							}
 						}
 					},
 					{
 						span: 6,
-						label: '备注',
-						prop: 'remark',
-						component: 'by-input',
+						label: '状态',
+						prop: 'status',
+						component: 'by-select',
 						labelWidth: '70px',
 						compConfig: {
 							attr: {
-								placeholder: '请输入状态',
-								clearable: true
+								placeholder: '请选择数据',
+								clearable: true,
+								data: [{
+									value: 0,
+									label: '禁用'
+								}, {
+									value: 1,
+									label: '启用'
+								}]
 							}
 						}
 					},
@@ -91,7 +114,13 @@
 				]
 			},
 			tool: {
-				tools: this.getTools()
+				tools: {
+					add: true,
+					export: true,
+					delete: true,
+					search: true,
+					refresh: true
+				}
 			},
 			table: {
 				attr: {
@@ -99,40 +128,24 @@
 					seq: true,
 					align: 'center',
 					checkbox: true,
-					height:600
+					height: 600
 				},
 				columns: [{
 					title: '名称',
 					field: 'name',
+					isDetail: true,
 					width: 150,
 				}, {
-					title: '简称',
-					field: 'shortName',
-					width: 100
-				}, {
-					title: '财务编号',
-					field: 'accountingCode'
-				}, {
-					title: '国际码',
-					field: 'nsCode'
-				}, {
-					title: '基本售价',
-					field: 'basePrice'
-				}, {
-					title: '市场价格(统一售价)',
-					field: 'markPrice'
-				}, {
-					title: '单位',
-					field: 'unit'
-				}, {
-					title: '重量',
-					field: 'weight'
-				}, {
-					title: '保质期(天)',
-					field: 'shelfLife'
+					title: '属性值',
+					field: 'attributeValue'
+				},
+				{
+					title: '属性类型',
+					field: 'attributeType',
 				}, {
-					title: '库存',
-					field: 'stock'
+					title: '状态',
+					field: 'status',
+					prop: 'status',
 				}, {
 					title: '操作',
 					action: true,
@@ -142,26 +155,70 @@
 						audit: '',
 						event: {
 							click: (item : any) => {
-								console.log('该行数据:', item)
+								(this as any).openEdit(item)
 							}
 						}
 					}, {
 						name: '删除',
 						event: {
-							click: (item : any) => this.onDelete(item)
+							click: (item : any) => (this as any).doDelete2(item)
 						}
 					}]
 				}]
 			},
 		}
-		getTools() {
-			return {
-				add: true,
-				export: true,
-				delete: true,
-				search: true,
-				refresh: true
-			}
+		addConfig = {
+			attr: {
+				size: 'small',
+				rules: {
+					name: [{
+						required: true, message: '请输入名称', trigger: 'blur'
+					}],
+				}
+			},
+			columns: [
+				[
+					{
+						span: 20,
+						label: '名称',
+						prop: 'name',
+						component: 'by-input',
+					},
+					{
+						span: 20,
+						label: '属性值',
+						slot: true,
+						prop: 'attributeValue',
+						component: 'by-input',
+					},
+					{
+						span: 20,
+						label: '属性类型',
+						slot: true,
+						prop: 'attributeType',
+						component: 'by-select',
+						compConfig: {
+							attr: {
+								placeholder: '请选择数据',
+								clearable: true,
+								data: [{
+									value: 0,
+									label: '销售属性'
+								}, {
+									value: 1,
+									label: '基本属性'
+								}]
+							}
+						}
+					},
+					{
+						span: 20,
+						label: '显示状态',
+						slot: true,
+						prop: 'status',
+					},
+				],
+			]
 		}
 		created() {
 			this.getTreeList()
@@ -178,6 +235,35 @@
 				} else this.failHandle(res)
 			})
 		}
+		// 确认新增/编辑
+		confirm() {
+			(this as any).$refs.addFormId.validate().then(() => {
+				let query = (this as any).$refs.addFormId.getValue();
+				query.status = this.radio;
+				this.dialogFormVisible = false;
+				if (this.popTitle === '新增') {
+					api.saveList(query, 'maindataMaterialAttribute').then((res : any) => {
+						if (res.code === 200) {
+							this.$message({
+								type: 'success',
+								message: this.popTitle + '成功!'
+							});
+							this.getDataList();
+						} else this.failHandle(res)
+					})
+				} else if (this.popTitle === '编辑') {
+					api.updateList(query, 'maindataMaterialAttribute').then((res : any) => {
+						if (res.code === 200) {
+							this.$message({
+								type: 'success',
+								message: this.popTitle + '成功!'
+							});
+							this.getDataList();
+						} else this.failHandle(res)
+					})
+				}
+			})
+		}
 		// 获取列表数据
 		getDataList() {
 			if (!this.$refs.moduleView) {
@@ -189,9 +275,8 @@
 			}
 			clearInterval(this.timer)
 			let query = (this.$refs.moduleView as any).getQuery();
-			// console.log(query);
-			api.page(query).then((res : any) => {
-				// console.log(res.data);
+			console.log('表单字段 ==> ', query);
+			api.pageList(query, 'maindataMaterialAttribute').then((res : any) => {
 				if (res.code === 200) {
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
 					let page = {
@@ -205,45 +290,79 @@
 		}
 		// 工具栏方法
 		clickHandle(e : any) {
-			console.log(e);
 			if (e === 'onRefresh') (this.$refs.moduleView as any).resert();
 			if (e === 'onAdd') this.onAdd();
-			// if (e === 'onDelete') this.onDelete(e);
+			if (e === 'onDelete') this.onDelete();
 			if (e === 'onExport') this.onExport();
 		}
-		// 新增
-		onAdd(){
-			
-			(this as any).$router.push('/materialFile/detail')
+		// 打开新增
+		onAdd() {
+			this.popTitle = '新增'
+			this.dialogFormVisible = true;
+			setTimeout(() => {
+				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
+			}, 0)
 		}
-		// 删除
-		onDelete(item:any){
-			api.materialDelete({
-				ids:item.id
-			}).then((res:any) => {
-				if(res.code===200){
+		// 打开编辑
+		openEdit(e : any) {
+			this.popTitle = '编辑'
+			this.dialogFormVisible = true;
+			setTimeout(() => {
+				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);
+			}, 0)
+		}
+		// 工具栏删除
+		onDelete() {
+			let selectData = (this.$refs.moduleView as any).getSelectData()
+			let ids = '';
+			if (selectData.length > 0) {
+				selectData.map((v : any) => {
+					ids += v.id + ','
+				})
+			} else return this.$message({ type: 'warning', message: '请选择删除数据' })
+			ids = ids.slice(0, ids.length - 1);
+			api.deleteList({ ids: ids }, 'maindataMaterialAttribute').then((res : any) => {
+				if (res.code === 200) {
 					this.getDataList();
 					this.$message({
 						type: 'success',
 						message: '删除成功!'
 					});
-				}else this.failHandle(res)
+				} else this.failHandle(res)
 			})
 		}
-		// 导航切换
-		handleNodeClick(e : any) {
-			api.single({ categoryId: e.id }).then((res : any) => {
+		// 操作删除
+		doDelete2(item : any) {
+			api.deleteList({ ids: item.id }, 'maindataMaterialAttribute').then((res : any) => {
 				if (res.code === 200) {
-					(this.$refs.moduleView as any).setTableValue(res.data.records);
-					let page = {
-						pageNo: res.data.current, //当前页
-						pageSize: res.data.size, //每页条数
-						total: res.data.total //总条数
-					};
-					(this.$refs.moduleView as any).setPage(page)
-				}
+					this.getDataList();
+					this.$message({
+						type: 'success',
+						message: '删除成功!'
+					});
+				} else this.failHandle(res)
 			})
 		}
+		handleRemove(file : any, fileList : any) {
+			console.log(file, fileList);
+		}
+		handlePictureCardPreview(file : any) {
+			console.log(file);
+		}
+		// 导航切换
+		handleNodeClick(e : any) {
+			// api.single({ categoryId: e.id }).then((res : any) => {
+			// 	if (res.code === 200) {
+			// 		(this.$refs.moduleView as any).setTableValue(res.data.records);
+			// 		let page = {
+			// 			pageNo: res.data.current, //当前页
+			// 			pageSize: res.data.size, //每页条数
+			// 			total: res.data.total //总条数
+			// 		};
+			// 		(this.$refs.moduleView as any).setPage(page)
+			// 	}
+			// })
+		}
 		//导出
 		onExport() {
 			let urlArr = '/maindata/maindataMaterial';

+ 507 - 0
src/views/audit/binTable/index.vue

@@ -0,0 +1,507 @@
+<template>
+	<div class="my-container">
+		<div class="bill-main">
+			<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
+				@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit">
+			</module-view>
+		</div>
+		<!-- 新增/编辑弹窗 -->
+		<el-dialog :title="popTitle+'仓位'" :visible.sync="dialogFormVisible" width="30%">
+			<by-form :propConfig="addConfig" ref="addFormId">
+				<template v-slot:logo>
+					<el-upload :limit='1' :action="baseURL+'/file/upload'" list-type="picture-card"
+						:on-preview="handlePictureCardPreview" :on-remove="handleRemove">
+						<i class="el-icon-plus"></i>
+					</el-upload>
+				</template>
+				<template v-slot:status class="clearfix">
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="0">显示</el-radio>
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="1">禁用</el-radio>
+				</template>
+			</by-form>
+			<div slot="footer" class="dialog-footer">
+				<el-button @click="dialogFormVisible = false">取 消</el-button>
+				<el-button type="primary" @click="confirm">确 定</el-button>
+			</div>
+		</el-dialog>
+	</div>
+</template>
+<script lang="ts">
+	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+	import api from "@/api/currency";
+	@Component
+	export default class Brand extends Vue {
+		baseURL : any = process.env.VUE_APP_BASE_API
+		timeNum = 0;
+		timer : any = null
+		popTitle : any = ''
+		radio : any = 0
+		dialogFormVisible : boolean = false
+		config : any = {
+			search: {
+				attr: {
+					size: 'mini'
+				},
+				columns: [
+					[
+						{
+							label: '名称',
+							prop: 'name',
+							component: 'by-input',
+							compConfig: {
+								attr: {
+									placeholder: '请输入名称',
+									clearable: true
+								},
+							},
+						},
+						{
+							label: '所属机构名称',
+							prop: 'organizationName',
+							component: 'by-input',
+							compConfig: {
+								attr: {
+									placeholder: '请输入所属机构名称',
+									clearable: true
+								}
+							}
+						},
+						{
+							label: '所属机构id',
+							prop: 'organizationId',
+							component: 'by-input',
+							compConfig: {
+								attr: {
+									placeholder: '请输入所属机构id',
+									clearable: true
+								}
+							}
+						},
+						{
+							label: '库存',
+							prop: 'stock',
+							component: 'by-input',
+							compConfig: {
+								attr: {
+									placeholder: '请输入库存',
+									clearable: true
+								}
+							}
+						}
+					],
+					[
+						{
+							label: '库存体积',
+							prop: 'stockVolume',
+							component: 'by-input',
+							compConfig: {
+								attr: {
+									placeholder: '请输入库存体积',
+									clearable: true
+								},
+							},
+						},
+						{
+							label: '库存上限数量',
+							prop: 'maxStockNumber',
+							component: 'by-input',
+							compConfig: {
+								attr: {
+									placeholder: '请输入库存上限数量',
+									clearable: true
+								}
+							}
+						},
+						{
+							label: '库存体积上限',
+							prop: 'maxStockVolume',
+							component: 'by-input',
+							compConfig: {
+								attr: {
+									placeholder: '请输入库存体积上限',
+									clearable: true
+								}
+							}
+						},
+						{
+							label: '所属仓库id',
+							prop: 'storehouseId',
+							component: 'by-input',
+							compConfig: {
+								attr: {
+									placeholder: '请输入所属仓库id',
+									clearable: true
+								}
+							}
+						}
+					]
+				]
+			},
+			tool: {
+				tools: {
+					add: true,
+					export: true,
+					delete: true,
+					search: true,
+					refresh: true
+				}
+			},
+			table: {
+				attr: {
+					size: 'mini',
+					seq: true,
+					align: 'center',
+					checkbox: true,
+					height: 600
+				},
+				columns: [{
+					title: '名称',
+					field: 'name',
+					isDetail: true,
+					width: 150,
+				}, {
+					title: '所属机构名称',
+					field: 'organizationName',
+				}, {
+					title: '所属机构id',
+					field: 'organizationId'
+				},
+				{
+					title: '库存',
+					field: 'stock'
+				},
+				{
+					title: '库存体积',
+					field: 'stockVolume'
+				},
+				{
+					title: '库存数量上限',
+					field: 'maxStockNumber'
+				},
+				{
+					title: '库存体积上限',
+					field: 'maxStockVolume'
+				},
+				{
+					title: '所属仓库id',
+					field: 'storehouseId'
+				}, {
+					title: '操作',
+					action: true,
+					plugins: [{
+						icon: 'el-icon-edit',
+						name: '编辑',
+						audit: '',
+						event: {
+							click: (item : any) => {
+								(this as any).openEdit(item)
+							}
+						}
+					}, {
+						name: '删除',
+						event: {
+							click: (item : any) => (this as any).doDelete2(item)
+						}
+					}]
+				}]
+			},
+		}
+		addConfig = {
+			attr: {
+				size: 'small',
+				rules: {
+					name: [{
+						required: true, message: '请输入名称', trigger: 'blur'
+					}]
+				}
+			},
+			columns: [
+				[
+					{
+						span: 20,
+						label: '名称',
+						prop: 'name',
+						component: 'by-input',
+					},
+					{
+						span: 20,
+						label: '所属机构名称',
+						prop: 'organizationName',
+						component: 'by-input',
+					},
+					{
+						span: 20,
+						label: '所属机构id',
+						prop: 'organizationId',
+						component: 'by-input',
+					},
+					{
+						span: 20,
+						label: '库存',
+						prop: 'stock',
+						component: 'by-input',
+					},
+					{
+						span: 20,
+						label: '库存体积',
+						prop: 'stockVolume',
+						component: 'by-input',
+					},
+					{
+						span: 20,
+						label: '库存数量上限',
+						prop: 'maxStockNumber',
+						component: 'by-input',
+					},
+					{
+						span: 20,
+						label: '库存体积上限',
+						prop: 'maxStockVolume',
+						component: 'by-input',
+					},
+					{
+						span: 20,
+						label: '所属仓库id',
+						prop: 'storehouseId',
+						component: 'by-input',
+					},
+				]
+			]
+		}
+		created() {
+			this.timer = setInterval(() => {
+				this.getDataList()
+			}, 500)
+		}
+		// 确认新增/编辑
+		confirm() {
+			(this as any).$refs.addFormId.validate().then(() => {
+				let query = (this as any).$refs.addFormId.getValue();
+				query.status = this.radio;
+				this.dialogFormVisible = false;
+				if (this.popTitle === '新增') {
+					api.saveList(query, 'maindataStoringLocation').then((res : any) => {
+						if (res.code === 200) {
+							this.$message({
+								type: 'success',
+								message: this.popTitle + '成功!'
+							});
+							this.getDataList();
+						} else this.failHandle(res)
+					})
+				} else if (this.popTitle === '编辑') {
+					api.updateList(query, 'maindataStoringLocation').then((res : any) => {
+						if (res.code === 200) {
+							this.$message({
+								type: 'success',
+								message: this.popTitle + '成功!'
+							});
+							this.getDataList();
+						} else this.failHandle(res)
+					})
+				}
+			})
+		}
+		// 获取列表数据
+		getDataList() {
+			if (!this.$refs.moduleView) {
+				if (this.timeNum > 5) {
+					clearInterval(this.timer)
+				}
+				this.timeNum++;
+				return
+			}
+			clearInterval(this.timer)
+			let query = (this.$refs.moduleView as any).getQuery();
+			api.pageList(query, 'maindataStoringLocation').then((res : any) => {
+				if (res.code === 200) {
+					(this.$refs.moduleView as any).setTableValue(res.data.records);
+					let page = {
+						pageNo: res.data.current, //当前页
+						pageSize: res.data.size, //每页条数
+						total: res.data.total //总条数
+					};
+					(this.$refs.moduleView as any).setPage(page)
+				} else this.failHandle(res)
+			})
+		}
+		// 工具栏方法
+		clickHandle(e : any) {
+			if (e === 'onRefresh') (this.$refs.moduleView as any).resert();
+			if (e === 'onAdd') this.onAdd();
+			if (e === 'onDelete') this.onDelete();
+			if (e === 'onExport') this.onExport();
+		}
+		// 打开新增
+		onAdd() {
+			this.popTitle = '新增'
+			this.dialogFormVisible = true;
+			setTimeout(() => {
+				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
+			}, 0)
+		}
+		// 打开编辑
+		openEdit(e : any) {
+			this.popTitle = '编辑'
+			this.dialogFormVisible = true;
+			setTimeout(() => {
+				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);
+			}, 0)
+		}
+		// 工具栏删除
+		onDelete() {
+			let selectData = (this.$refs.moduleView as any).getSelectData()
+			let ids = '';
+			if (selectData.length > 0) {
+				selectData.map((v : any) => {
+					ids += v.id + ','
+				})
+			} else return this.$message({ type: 'warning', message: '请选择删除数据' })
+			ids = ids.slice(0, ids.length - 1);
+			api.deleteList({ ids: ids }, 'maindataStoringLocation').then((res : any) => {
+				if (res.code === 200) {
+					this.getDataList();
+					this.$message({
+						type: 'success',
+						message: '删除成功!'
+					});
+				} else this.failHandle(res)
+			})
+		}
+		// 操作删除
+		doDelete2(item : any) {
+			api.deleteList({ ids: item.id }, 'maindataStoringLocation').then((res : any) => {
+				if (res.code === 200) {
+					this.getDataList();
+					this.$message({
+						type: 'success',
+						message: '删除成功!'
+					});
+				} else this.failHandle(res)
+			})
+		}
+		handleRemove(file : any, fileList : any) {
+			console.log(file, fileList);
+		}
+		handlePictureCardPreview(file : any) {
+			console.log(file);
+		}
+		//导出
+		onExport() {
+			let urlArr = '/maindata/maindataMaterial';
+			let query = (this.$refs.moduleView as any).getQuery();
+			(this as any).$download(urlArr + '/export', {
+				...query
+			}, urlArr[urlArr.length - 1] + `_${new Date().getTime()}.xlsx`)
+		}
+		// 运行错误
+		failHandle(err : any) {
+			let msg = err.msg ? err.msg : '运行错误!';
+			this.$message.error(msg)
+		}
+
+	}
+</script>
+<style lang="scss" scoped>
+	.my-container {
+		width: 100%;
+		box-sizing: border-box;
+		display: flex;
+		padding: 16px;
+
+		.search-btn {
+			width: 100%;
+			display: flex;
+			justify-content: flex-end;
+			margin-bottom: 20px;
+		}
+
+		.bill-left {
+			position: relative;
+			border-right: solid #EEE 1px;
+			padding-right: 16px;
+			flex-shrink: 0;
+
+			// box-sizing: border-box;
+			.bill-tab {
+				width: 150px;
+				height: 100%;
+				transition: all .5s;
+				overflow: hidden;
+			}
+
+			.title {
+				font-size: 16px;
+				padding-bottom: 16px;
+				width: 200px;
+			}
+
+			.bill-nav {
+				font-size: 14px;
+				height: 30px;
+				line-height: 30px;
+				width: 200px;
+				box-sizing: border-box;
+				padding: 0 8px;
+				cursor: pointer;
+				margin-bottom: 2px;
+				border-radius: 5px;
+			}
+
+			.onBill {
+				background-color: #bde3f7;
+			}
+
+			.bill-nav:hover {
+				background-color: #bde3f7;
+			}
+
+			.close {
+				height: 22px;
+				width: 22px;
+				border-radius: 50%;
+				border: solid #EEE 1px;
+				position: absolute;
+				top: 30px;
+				right: -11px;
+				background-color: #FFF;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				cursor: pointer;
+			}
+		}
+
+		.bill-main {
+			width: calc(100% - 16px);
+			box-sizing: border-box;
+			margin-left: 16px;
+			position: relative;
+
+			.bill-box {
+				width: 100%;
+				position: absolute;
+				left: 0;
+				top: 0;
+				opacity: 0;
+				z-index: -1;
+				transition: all .5s;
+
+				.bill-tool,
+				.table-tool {
+					width: 100%;
+					padding-bottom: 16px;
+				}
+
+				.form {
+					margin-bottom: 8px;
+				}
+			}
+
+			.on-show {
+				opacity: 1;
+				z-index: 1;
+			}
+		}
+	}
+</style>

+ 7 - 6
src/views/audit/brand/index.vue

@@ -2,12 +2,12 @@
 	<div class="my-container">
 		<div class="bill-main">
 			<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
-				@resert="getDataList" @clickHandle="clickHandle">
-				<template v-slot:status="{ value }">
-					<!-- <el-tag :type="value.row.status===0?'primary':'danger'"
-						disable-transitions>{{value.row.status===0?'正常':'禁用'}}</el-tag> -->
+				@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit">
+				<!-- <template v-slot:status="{ value }">
+					<el-tag :type="value.row.status===0?'primary':'danger'"
+						disable-transitions>{{value.row.status===0?'正常':'禁用'}}</el-tag>
 						<div>{{value}}</div>
-				</template>
+				</template> -->
 			</module-view>
 		</div>
 		<!-- 新增/编辑弹窗 -->
@@ -122,6 +122,7 @@
 				columns: [{
 					title: '名称',
 					field: 'name',
+					isDetail:true,
 					width: 150,
 				}, {
 					title: '简称',
@@ -133,7 +134,7 @@
 				}, {
 					title: '状态',
 					field: 'status',
-					slot: true,
+					// slot: true,
 					prop: 'status',
 				}, {
 					title: '备注',

+ 407 - 0
src/views/audit/depots/index.vue

@@ -0,0 +1,407 @@
+<template>
+	<div class="my-container">
+		<div class="bill-main">
+			<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
+				@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit">
+			</module-view>
+		</div>
+		<!-- 新增/编辑弹窗 -->
+		<el-dialog :title="popTitle+'仓库'" :visible.sync="dialogFormVisible" width="30%">
+			<by-form :propConfig="addConfig" ref="addFormId">
+				<template v-slot:logo>
+					<el-upload :limit='1' :action="baseURL+'/file/upload'" list-type="picture-card"
+						:on-preview="handlePictureCardPreview" :on-remove="handleRemove">
+						<i class="el-icon-plus"></i>
+					</el-upload>
+				</template>
+				<template v-slot:status class="clearfix">
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="0">显示</el-radio>
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="1">禁用</el-radio>
+				</template>
+			</by-form>
+			<div slot="footer" class="dialog-footer">
+				<el-button @click="dialogFormVisible = false">取 消</el-button>
+				<el-button type="primary" @click="confirm">确 定</el-button>
+			</div>
+		</el-dialog>
+	</div>
+</template>
+<script lang="ts">
+	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+	import api from "@/api/currency";
+	@Component
+	export default class Brand extends Vue {
+		baseURL : any = process.env.VUE_APP_BASE_API
+		timeNum = 0;
+		timer : any = null
+		popTitle : any = ''
+		radio : any = 0
+		dialogFormVisible : boolean = false
+		config : any = {
+			search: {
+				attr: {
+					size: 'mini'
+				},
+				columns: [
+					[{
+						span: 6,
+						label: '名称',
+						prop: 'name',
+						component: 'by-input',
+						labelWidth: '70px',
+						compConfig: {
+							attr: {
+								placeholder: '请输入名称',
+								clearable: true
+							},
+						},
+					}, {
+						span: 6,
+						label: '地址',
+						prop: 'address',
+						component: 'by-input',
+						labelWidth: '70px',
+						compConfig: {
+							attr: {
+								placeholder: '请输入地址',
+								clearable: true
+							}
+						}
+					},
+					{
+						span: 6,
+						label: '坐标',
+						prop: 'coordinate',
+						component: 'by-input',
+						labelWidth: '70px',
+						compConfig: {
+							attr: {
+								placeholder: '请输入坐标',
+								clearable: true
+							}
+						}
+					},
+					]
+				]
+			},
+			tool: {
+				tools: {
+					add: true,
+					export: true,
+					delete: true,
+					search: true,
+					refresh: true
+				}
+			},
+			table: {
+				attr: {
+					size: 'mini',
+					seq: true,
+					align: 'center',
+					checkbox: true,
+					height: 600
+				},
+				columns: [{
+					title: '名称',
+					field: 'name',
+					isDetail:true,
+					width: 150,
+				}, {
+					title: '地址',
+					field: 'address',
+				},  {
+					title: '坐标',
+					field: 'coordinate'
+				}, {
+					title: '操作',
+					action: true,
+					plugins: [{
+						icon: 'el-icon-edit',
+						name: '编辑',
+						audit: '',
+						event: {
+							click: (item : any) => {
+								(this as any).openEdit(item)
+							}
+						}
+					}, {
+						name: '删除',
+						event: {
+							click: (item : any) => (this as any).doDelete2(item)
+						}
+					}]
+				}]
+			},
+		}
+		addConfig = {
+			attr: {
+				size: 'small',
+				rules: {
+					name: [{
+						required: true, message: '请输入名称', trigger: 'blur'
+					}],
+					shortName: [{
+						required: true, message: '请输入简称', trigger: 'blur'
+					}]
+				}
+			},
+			columns: [
+				[
+					{
+						span: 20,
+						label: '名称',
+						prop: 'name',
+						component: 'by-input',
+					},
+					{
+						span: 20,
+						label: '地址',
+						prop: 'address',
+						component: 'by-input',
+					},
+					{
+						span: 20,
+						label: '坐标',
+						prop: 'coordinate',
+						component: 'by-input',
+					},
+				]
+			]
+		}
+		created() {
+			this.timer = setInterval(() => {
+				this.getDataList()
+			}, 500)
+		}
+		// 确认新增/编辑
+		confirm() {
+			(this as any).$refs.addFormId.validate().then(() => {
+				let query = (this as any).$refs.addFormId.getValue();
+				query.status = this.radio;
+				this.dialogFormVisible = false;
+				if (this.popTitle === '新增') {
+					api.saveList(query, 'maindataStorehouse').then((res : any) => {
+						if (res.code === 200) {
+							this.$message({
+								type: 'success',
+								message: this.popTitle + '成功!'
+							});
+							this.getDataList();
+						} else this.failHandle(res)
+					})
+				} else if (this.popTitle === '编辑') {
+					api.updateList(query, 'maindataStorehouse').then((res : any) => {
+						if (res.code === 200) {
+							this.$message({
+								type: 'success',
+								message: this.popTitle + '成功!'
+							});
+							this.getDataList();
+						} else this.failHandle(res)
+					})
+				}
+			})
+		}
+		// 获取列表数据
+		getDataList() {
+			if (!this.$refs.moduleView) {
+				if (this.timeNum > 5) {
+					clearInterval(this.timer)
+				}
+				this.timeNum++;
+				return
+			}
+			clearInterval(this.timer)
+			let query = (this.$refs.moduleView as any).getQuery();
+			api.pageList(query, 'maindataStorehouse').then((res : any) => {
+				if (res.code === 200) {
+					(this.$refs.moduleView as any).setTableValue(res.data.records);
+					let page = {
+						pageNo: res.data.current, //当前页
+						pageSize: res.data.size, //每页条数
+						total: res.data.total //总条数
+					};
+					(this.$refs.moduleView as any).setPage(page)
+				} else this.failHandle(res)
+			})
+		}
+		// 工具栏方法
+		clickHandle(e : any) {
+			if (e === 'onRefresh') (this.$refs.moduleView as any).resert();
+			if (e === 'onAdd') this.onAdd();
+			if (e === 'onDelete') this.onDelete();
+			if (e === 'onExport') this.onExport();
+		}
+		// 打开新增
+		onAdd() {
+			this.popTitle = '新增'
+			this.dialogFormVisible = true;
+			setTimeout(() => {
+				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
+			}, 0)
+		}
+		// 打开编辑
+		openEdit(e : any) {
+			this.popTitle = '编辑'
+			this.dialogFormVisible = true;
+			setTimeout(() => {
+				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);
+			}, 0)
+		}
+		// 工具栏删除
+		onDelete() {
+			let selectData = (this.$refs.moduleView as any).getSelectData()
+			let ids = '';
+			if (selectData.length > 0) {
+				selectData.map((v : any) => {
+					ids += v.id + ','
+				})
+			} else return this.$message({ type: 'warning', message: '请选择删除数据' })
+			ids = ids.slice(0, ids.length - 1);
+			api.deleteList({ ids: ids }, 'maindataStorehouse').then((res : any) => {
+				if (res.code === 200) {
+					this.getDataList();
+					this.$message({
+						type: 'success',
+						message: '删除成功!'
+					});
+				} else this.failHandle(res)
+			})
+		}
+		// 操作删除
+		doDelete2(item : any) {
+			api.deleteList({ ids: item.id }, 'maindataStorehouse').then((res : any) => {
+				if (res.code === 200) {
+					this.getDataList();
+					this.$message({
+						type: 'success',
+						message: '删除成功!'
+					});
+				} else this.failHandle(res)
+			})
+		}
+		handleRemove(file : any, fileList : any) {
+			console.log(file, fileList);
+		}
+		handlePictureCardPreview(file : any) {
+			console.log(file);
+		}
+		//导出
+		onExport() {
+			let urlArr = '/maindata/maindataMaterial';
+			let query = (this.$refs.moduleView as any).getQuery();
+			(this as any).$download(urlArr + '/export', {
+				...query
+			}, urlArr[urlArr.length - 1] + `_${new Date().getTime()}.xlsx`)
+		}
+		// 运行错误
+		failHandle(err : any) {
+			let msg = err.msg ? err.msg : '运行错误!';
+			this.$message.error(msg)
+		}
+
+	}
+</script>
+<style lang="scss" scoped>
+	.my-container {
+		width: 100%;
+		box-sizing: border-box;
+		display: flex;
+		padding: 16px;
+
+		.search-btn {
+			width: 100%;
+			display: flex;
+			justify-content: flex-end;
+			margin-bottom: 20px;
+		}
+
+		.bill-left {
+			position: relative;
+			border-right: solid #EEE 1px;
+			padding-right: 16px;
+			flex-shrink: 0;
+
+			// box-sizing: border-box;
+			.bill-tab {
+				width: 150px;
+				height: 100%;
+				transition: all .5s;
+				overflow: hidden;
+			}
+
+			.title {
+				font-size: 16px;
+				padding-bottom: 16px;
+				width: 200px;
+			}
+
+			.bill-nav {
+				font-size: 14px;
+				height: 30px;
+				line-height: 30px;
+				width: 200px;
+				box-sizing: border-box;
+				padding: 0 8px;
+				cursor: pointer;
+				margin-bottom: 2px;
+				border-radius: 5px;
+			}
+
+			.onBill {
+				background-color: #bde3f7;
+			}
+
+			.bill-nav:hover {
+				background-color: #bde3f7;
+			}
+
+			.close {
+				height: 22px;
+				width: 22px;
+				border-radius: 50%;
+				border: solid #EEE 1px;
+				position: absolute;
+				top: 30px;
+				right: -11px;
+				background-color: #FFF;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				cursor: pointer;
+			}
+		}
+
+		.bill-main {
+			width: calc(100% - 16px);
+			box-sizing: border-box;
+			margin-left: 16px;
+			position: relative;
+
+			.bill-box {
+				width: 100%;
+				position: absolute;
+				left: 0;
+				top: 0;
+				opacity: 0;
+				z-index: -1;
+				transition: all .5s;
+
+				.bill-tool,
+				.table-tool {
+					width: 100%;
+					padding-bottom: 16px;
+				}
+
+				.form {
+					margin-bottom: 8px;
+				}
+			}
+
+			.on-show {
+				opacity: 1;
+				z-index: 1;
+			}
+		}
+	}
+</style>

+ 440 - 62
src/views/audit/orderTask/index.vue

@@ -1,84 +1,144 @@
 <template>
 	<div>
-		<by-bill :propConfig="config" @search="search" @onSmt="onSmt" ref="bill" @onAdd="onAdd">
-			<template v-slot:cus>我是插槽</template>
+		<by-bill :propConfig="config" @search="search" @onSmt="onSmt" ref="bill" @onAdd="onAdd" @onUpdate="onUpdate"
+			@resert="resert">
 		</by-bill>
-		<div style="clear: both;"></div>
-		<div>
-			<el-button type="primary" plain @click="setSmtValue">设置已提交数据</el-button><br />
-			<el-button type="primary" plain @click="setdraftsBoxValue">设置草稿箱数据</el-button>
-		</div>
-
+		<!-- 新增/编辑弹窗 -->
+		<el-dialog :title="popTitle+'订单'" :visible.sync="dialogFormVisible" width="30%">
+			<by-form :propConfig="addConfig" ref="addFormId">
+				<template v-slot:logo>
+					<el-upload :limit='1' :action="baseURL+'/file/upload'" list-type="picture-card"
+						:on-preview="handlePictureCardPreview" :on-remove="handleRemove">
+						<i class="el-icon-plus"></i>
+					</el-upload>
+				</template>
+				<template v-slot:status class="clearfix">
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="1">启用</el-radio>
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="0">禁用</el-radio>
+				</template>
+			</by-form>
+			<div slot="footer" class="dialog-footer">
+				<el-button @click="dialogFormVisible = false">取 消</el-button>
+				<el-button type="primary" @click="confirm">确 定</el-button>
+			</div>
+		</el-dialog>
 	</div>
 </template>
 
 <script lang="ts">
 	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+	import api from "@/api/order";
 	@Component
-	export default class BillDemo extends Vue {
+	export default class OrderTask extends Vue {
+		// 右边
+		baseURL : any = process.env.VUE_APP_BASE_API
+		timeNum = 0;
+		timer : any = null
+		popTitle : any = ''
+		radio : any = 1
+		dialogFormVisible : boolean = false
 		config : any = {
+			attr: {
+				activeName: 'all'
+			},
+			// 单据
 			bill: {
-				tool: {
-					tools: {
-						add: true,
-						edit: true
-					}
-				},
 				form: {
 					attr: {
 						size: 'small'
 					},
 					columns: [
 						[{
-							span: 6,
-							label: '创建时间',
-							prop: 'created',
-							component: 'by-date-picker',
+							label: '名称',
+							prop: 'name',
+							component: 'by-input',
 							compConfig: {
-								format: 'yyyy-MM-dd HH:mm:ss',
-								type: 'datetime'
+								attr: {
+									placeholder: '请输入名称',
+									clearable: true
+								},
+							},
+						}, {
+							label: '简称',
+							prop: 'shortName',
+							component: 'by-input',
+							compConfig: {
+								attr: {
+									placeholder: '请输入简称',
+									clearable: true
+								}
 							}
-						}]
+						},
+						{
+							label: '状态',
+							prop: 'status',
+							component: 'by-input',
+							compConfig: {
+								attr: {
+									placeholder: '请输入状态',
+									clearable: true
+								}
+							}
+						},
+						{
+							label: '备注',
+							prop: 'remark',
+							component: 'by-input',
+							compConfig: {
+								attr: {
+									placeholder: '请输入状态',
+									clearable: true
+								}
+							}
+						},
+						]
 					]
 				},
-				tableTool: {
-					tools: {
-						add: true
-					}
-				},
-				table: {
-					attr: {
-						size: 'mini',
-						height: 240,
-						seq: true,
-						align: 'center',
-						checkbox: true
-					},
-					columns: [{
-						title: 'id',
-						field: 'id',
-						width: 50
+				tableConfig: [{
+					tool: {
+						tools: {
+							add: true,
+							export: true,
+							delete: true,
+							search: true,
+							refresh: true
+						}
 					},
-					{
-						title: '姓名',
-						field: 'name',
-						width: 100
-					}, {
-						title: '操作',
-						action: true,
-						plugins: [{
-							icon: 'el-icon-edit',
-							name: '编辑',
-							audit: '',
-							event: {
-								click: (item : any) => {
-									console.log('该行数据:', item)
+					table: {
+						attr: {
+							size: 'mini',
+							height: 600,
+							seq: true,
+							align: 'center',
+							checkbox: true
+						},
+						columns: [{
+							title: 'id',
+							field: 'id',
+							width: 50
+						},
+						{
+							title: '姓名',
+							field: 'name',
+							width: 100
+						}, {
+							title: '操作',
+							action: true,
+							plugins: [{
+								icon: 'el-icon-edit',
+								name: '编辑',
+								audit: '',
+								event: {
+									click: (item : any) => {
+										console.log('该行数据:', item)
+									}
 								}
-							}
+							}]
 						}]
-					}]
-				}
+					}
+				}]
 			},
+			// 已提交
 			smt: {
 				search: {
 					attr: {
@@ -130,10 +190,10 @@
 					{
 						title: '日期',
 						field: 'time',
-						// width:200
 					}]
 				}
 			},
+			// 草稿箱
 			draftsBox: {
 				search: {
 					attr: {
@@ -177,22 +237,334 @@
 						{
 							title: '日期',
 							field: 'time',
-							// width:200
 						}]
+				},
+			},
+			// 综合
+			all: {
+				search: {
+					attr: {
+						size: 'mini',
+					},
+					columns: [
+						[{
+							label: '机构名称',
+							prop: 'organizationName',
+							component: 'by-input',
+							compConfig: {
+								attr: {
+									placeholder: '请输入机构名称',
+									clearable: true
+								},
+							},
+						}, {
+							label: '单据编号',
+							prop: 'orderNumber',
+							component: 'by-input',
+							compConfig: {
+								attr: {
+									placeholder: '请输入单据编号',
+									clearable: true
+								}
+							}
+						},
+						{
+							label: '机构id',
+							prop: 'organizationId',
+							component: 'by-input',
+							compConfig: {
+								attr: {
+									placeholder: '请输入机构id',
+									clearable: true
+								}
+							}
+						},
+						{
+							label: '交货地点',
+							prop: 'deliveryAddress',
+							component: 'by-input',
+							compConfig: {
+								attr: {
+									placeholder: '请输入交货地点',
+									clearable: true
+								}
+							}
+						},
+						],
+						[
+							{
+								label: '交货时间',
+								prop: 'deliveryData',
+								component:'by-date-picker',
+								compConfig:{
+								  format:'yyyy-MM-dd',
+								  type:'datetime'
+								}
+							},
+							{
+								label: '交货人',
+								prop: 'delivery',
+								component: 'by-input',
+								compConfig: {
+									attr: {
+										placeholder: '请输入交货人',
+										clearable: true
+									}
+								}
+							},
+							{
+								label: '状态',
+								prop: 'status',
+								component: 'by-input',
+								compConfig: {
+									attr: {
+										placeholder: '请输入状态',
+										clearable: true
+									}
+								}
+							},
+							{
+								label: '备注',
+								prop: 'remark',
+								component: 'by-input',
+								compConfig: {
+									attr: {
+										placeholder: '请输入备注',
+										clearable: true
+									}
+								}
+							},
+						]
+					]
+				},
+				tool: {
+					tools: {
+						add: true,
+						smt: true,
+						export: true,
+						delete: true,
+						search: true,
+						refresh: true
+					}
+				},
+				table: {
+					attr: {
+						size: 'mini',
+						seq: true,
+						align: 'center',
+						checkbox: true
+					},
+					columns: [
+						{
+							title: '单据编号',
+							field: 'orderNumber',
+							width: 80
+						},
+						{
+							title: '机构名称',
+							field: 'organizationName',
+						},
+						{
+							title: '机构id',
+							field: 'organizationId',
+							width: 100
+						},
+						{
+							title: '状态',
+							field: 'status',
+						},
+						{
+							title: '交货地点',
+							field: 'deliveryAddress',
+						},
+						{
+							title: '交货时间',
+							field: 'deliveryData',
+							width: 150
+						},
+						{
+							title: '交货人',
+							field: 'delivery',
+						},
+						{
+							title: '交货人联系方式',
+							field: 'deliveryPhone',
+						},
+						{
+							title: '交货方式',
+							field: 'deliveryWay',
+						},
+						{
+							title: '备注',
+							field: 'remark',
+						},
+						{
+							title: '操作',
+							action: true,
+							plugins: [{
+								icon: 'el-icon-edit',
+								name: '编辑',
+								audit: '',
+								event: {
+									click: (item : any) => {
+										(this as any).openEdit(item)
+									}
+								}
+							}, {
+								name: '删除',
+								event: {
+									click: (item : any) => (this as any).doDelete2(item)
+								}
+							}]
+						}
+					]
 				}
 			},
+			// 回收站
+			recycleBin: {
 
+			}
+		}
+		addConfig = {
+			attr: {
+				size: 'small',
+				rules: {
+					name: [{
+						required: true, message: '请输入名称', trigger: 'blur'
+					}],
+				}
+			},
+			columns: [
+				[
+					{
+						span: 20,
+						label: '名称',
+						prop: 'name',
+						component: 'by-input',
+					},
+					{
+						span: 20,
+						label: '简称',
+						slot: true,
+						prop: 'shortName',
+						component: 'by-input',
+					},
+					{
+						span: 20,
+						label: '显示状态',
+						slot: true,
+						prop: 'status',
+					},
+					{
+						span: 20,
+						label: '备注',
+						slot: true,
+						prop: 'remark',
+						component: 'by-input',
+					},
+				],
+			]
+		}
+		created() {
+			this.timer = setInterval(() => {
+				this.getDataList()
+			}, 500)
+		}
+		// 确认新增/编辑
+		confirm() {
+			(this as any).$refs.addFormId.validate().then(() => {
+				let query = (this as any).$refs.addFormId.getValue();
+				query.status = this.radio;
+				this.dialogFormVisible = false;
+				if (this.popTitle === '新增') {
+					api.saveList(query, 'maindataMaterialVmcategory').then((res : any) => {
+						if (res.code === 200) {
+							this.$message({
+								type: 'success',
+								message: this.popTitle + '成功!'
+							});
+							this.getDataList();
+						} else this.failHandle(res)
+					})
+				} else if (this.popTitle === '编辑') {
+					api.updateList(query, 'maindataMaterialVmcategory').then((res : any) => {
+						if (res.code === 200) {
+							this.$message({
+								type: 'success',
+								message: this.popTitle + '成功!'
+							});
+							this.getDataList();
+						} else this.failHandle(res)
+					})
+				}
+			})
+		}
+		getDataList() {
+			if (!this.$refs.bill) {
+				if (this.timeNum > 5) {
+					clearInterval(this.timer)
+				}
+				this.timeNum++;
+				return
+			}
+			clearInterval(this.timer)
+			api.pageList({}, 'supplyTaskOrder').then((res : any) => {
+				if (res.code === 200) {
+					(this.$refs.bill as any).setTabTableValue('all', res.data.records);
+					let page = {
+						pageNo: res.data.current, //当前页
+						pageSize: res.data.size, //每页条数
+						total: res.data.total //总条数
+					};
+					(this.$refs.bill as any).setTablePage('all', page)
+				} else this.failHandle(res)
+			})
+		}
+		// 打开新增
+		onAdd() {
+			this.popTitle = '新增'
+			this.dialogFormVisible = true;
+			setTimeout(() => {
+				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
+			}, 0)
+		}
+		// 打开编辑
+		openEdit(e : any) {
+			this.popTitle = '编辑'
+			this.dialogFormVisible = true;
+			setTimeout(() => {
+				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);
+			}, 0)
 		}
-
 		search(parames : any) {
-			console.log('搜索回传参数', parames);
+			api.pageList(parames.value, 'supplyTaskOrder').then((res : any) => {
+				if (res.code === 200) {
+					(this.$refs.bill as any).setTabTableValue(parames.type, res.data.records);
+					let page = {
+						pageNo: res.data.current, //当前页
+						pageSize: res.data.size, //每页条数
+						total: res.data.total //总条数
+					};
+					(this.$refs.bill as any).setTablePage(parames.type, page)
+				} else this.failHandle(res)
+			})
+		}
+		resert(parames : any) {
+			console.log('重置回传参数', parames);
 		}
 		onSmt(n : string) {
 			console.log(n + ':工具栏执行操作onSmt')
 		}
-		onAdd(n : string) {
-			console.log(n);
+		onUpdate(n : string) {
+			console.log(n + ':工具栏执行操作onUpdate')
+		}
+		handleRemove(file : any, fileList : any) {
+			console.log(file, fileList);
 		}
+		handlePictureCardPreview(file : any) {
+			console.log(file);
+		}
+		// 设置已提交数据
 		setSmtValue() {
 			let data : Array<any> = [{
 				id: 1,
@@ -206,6 +578,7 @@
 			console.log(data);
 			(this.$refs.bill as any).setTabTableValue('smt', data);
 		}
+		// 设置草稿箱数据
 		setdraftsBoxValue() {
 			let data : Array<any> = [{
 				name: '王五',
@@ -216,5 +589,10 @@
 			}];
 			(this.$refs.bill as any).setTabTableValue('draftsBox', data);
 		}
+		// 运行错误
+		failHandle(err : any) {
+			let msg = err.msg ? err.msg : '运行错误!';
+			this.$message.error(msg)
+		}
 	}
 </script>

+ 2 - 2
src/views/audit/productClassification/index.vue

@@ -211,8 +211,8 @@
 			api.treeList().then((res : any) => {
 				// console.log(res.data[0]);
 				if (res.code === 200) {
-					this.tableData = res.data[0].children;
-					this.data = res.data[0].children;
+					this.tableData = res.data;
+					this.data = res.data;
 					let arr : any = [{
 						name: '顶级',
 						id: 0,

+ 4 - 4
src/views/audit/productManagement/index.vue

@@ -8,7 +8,7 @@
 		</div>
 		<div class="bill-main">
 			<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
-				@resert="getDataList" @clickHandle="clickHandle" @detail="detail" />
+				@resert="getDataList" @clickHandle="clickHandle" @detail="getDetail" />
 		</div>
 	</div>
 </template>
@@ -193,7 +193,7 @@
 						event: {
 							click: (item : any) => {
 								(this as any).$router.push({ name: 'MaterialEdit', params: { baseInfo: item } });
-								console.log('该行数据:', item)
+								// console.log('该行数据:', item)
 							}
 						}
 					}, {
@@ -220,8 +220,8 @@
 				this.getDataList()
 			}, 500)
 		}
-		detail(e:any){
-			console.log(e);
+		getDetail(e:any){
+			(this as any).$router.push({ name: 'MaterialEdit', params: { baseInfo: e } });
 		}
 		// 获取树型导航数据
 		getTreeList() {

+ 477 - 0
src/views/audit/virtually/index.vue

@@ -0,0 +1,477 @@
+<template>
+	<div class="my-container">
+		<div class="bill-left">
+			<div class="bill-tab">
+				<div class="title">导航</div>
+				<el-tree :data="data" :props="props" @node-click="handleNodeClick"></el-tree>
+			</div>
+		</div>
+		<div class="bill-main">
+			<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
+				@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit">
+			</module-view>
+		</div>
+		<!-- 新增/编辑弹窗 -->
+		<el-dialog :title="popTitle+'品牌'" :visible.sync="dialogFormVisible" width="30%">
+			<by-form :propConfig="addConfig" ref="addFormId">
+				<template v-slot:logo>
+					<el-upload :limit='1' :action="baseURL+'/file/upload'" list-type="picture-card"
+						:on-preview="handlePictureCardPreview" :on-remove="handleRemove">
+						<i class="el-icon-plus"></i>
+					</el-upload>
+				</template>
+				<template v-slot:status class="clearfix">
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="1">启用</el-radio>
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="0">禁用</el-radio>
+				</template>
+			</by-form>
+			<div slot="footer" class="dialog-footer">
+				<el-button @click="dialogFormVisible = false">取 消</el-button>
+				<el-button type="primary" @click="confirm">确 定</el-button>
+			</div>
+		</el-dialog>
+	</div>
+</template>
+<script lang="ts">
+	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+	import api from "@/api/currency";
+	import materialClass from "@/api/materialClass";
+	@Component
+	export default class Virtually extends Vue {
+		// 左边
+		data : any = []
+		props = {
+			label: 'name',
+			children: 'children'
+		}
+		// 右边
+		baseURL : any = process.env.VUE_APP_BASE_API
+		timeNum = 0;
+		timer : any = null
+		popTitle : any = ''
+		radio : any = 1
+		dialogFormVisible : boolean = false
+		config : any = {
+			search: {
+				attr: {
+					size: 'mini'
+				},
+				columns: [
+					[{
+						span: 6,
+						label: '名称',
+						prop: 'name',
+						component: 'by-input',
+						labelWidth: '70px',
+						compConfig: {
+							attr: {
+								placeholder: '请输入名称',
+								clearable: true
+							},
+						},
+					},
+					{
+						span: 6,
+						label: '简称',
+						prop: 'shortName',
+						component: 'by-input',
+						labelWidth: '70px',
+						compConfig: {
+							attr: {
+								placeholder: '请输入简称',
+								clearable: true
+							},
+						},
+					},
+					{
+						span: 6,
+						label: '状态',
+						prop: 'status',
+						component: 'by-select',
+						labelWidth: '70px',
+						compConfig: {
+							attr: {
+								placeholder: '请选择数据',
+								clearable: true,
+								data: [{
+									value: 0,
+									label: '禁用'
+								}, {
+									value: 1,
+									label: '启用'
+								}]
+							}
+						}
+					},
+					{
+						span: 6,
+						label: '备注',
+						prop: 'remark',
+						component: 'by-input',
+						labelWidth: '70px',
+						compConfig: {
+							attr: {
+								placeholder: '请输入备注',
+								clearable: true
+							},
+						},
+					},
+					]
+				]
+			},
+			tool: {
+				tools: {
+					add: true,
+					export: true,
+					delete: true,
+					search: true,
+					refresh: true
+				}
+			},
+			table: {
+				attr: {
+					size: 'mini',
+					seq: true,
+					align: 'center',
+					checkbox: true,
+					height: 600
+				},
+				columns: [{
+					title: '名称',
+					field: 'name',
+					isDetail: true,
+					width: 150,
+				}, {
+					title: '简称',
+					field: 'shortName'
+				}, {
+					title: '状态',
+					field: 'status',
+					prop: 'status',
+				},
+				{
+					title: '备注',
+					field: 'remark',
+				}, {
+					title: '操作',
+					action: true,
+					plugins: [{
+						icon: 'el-icon-edit',
+						name: '编辑',
+						audit: '',
+						event: {
+							click: (item : any) => {
+								(this as any).openEdit(item)
+							}
+						}
+					}, {
+						name: '删除',
+						event: {
+							click: (item : any) => (this as any).doDelete2(item)
+						}
+					}]
+				}]
+			},
+		}
+		addConfig = {
+			attr: {
+				size: 'small',
+				rules: {
+					name: [{
+						required: true, message: '请输入名称', trigger: 'blur'
+					}],
+				}
+			},
+			columns: [
+				[
+					{
+						span: 20,
+						label: '名称',
+						prop: 'name',
+						component: 'by-input',
+					},
+					{
+						span: 20,
+						label: '简称',
+						slot: true,
+						prop: 'shortName',
+						component: 'by-input',
+					},
+					{
+						span: 20,
+						label: '显示状态',
+						slot: true,
+						prop: 'status',
+					},
+					{
+						span: 20,
+						label: '备注',
+						slot: true,
+						prop: 'remark',
+						component: 'by-input',
+					},
+				],
+			]
+		}
+		created() {
+			this.getTreeList()
+			this.timer = setInterval(() => {
+				this.getDataList()
+			}, 500)
+		}
+		// 获取树型导航数据
+		getTreeList() {
+			materialClass.treeList().then((res : any) => {
+				// console.log(res.data[0]);
+				if (res.code === 200) {
+					this.data = res.data[0].children;
+				} else this.failHandle(res)
+			})
+		}
+		// 确认新增/编辑
+		confirm() {
+			(this as any).$refs.addFormId.validate().then(() => {
+				let query = (this as any).$refs.addFormId.getValue();
+				query.status = this.radio;
+				this.dialogFormVisible = false;
+				if (this.popTitle === '新增') {
+					api.saveList(query, 'maindataMaterialVmcategory').then((res : any) => {
+						if (res.code === 200) {
+							this.$message({
+								type: 'success',
+								message: this.popTitle + '成功!'
+							});
+							this.getDataList();
+						} else this.failHandle(res)
+					})
+				} else if (this.popTitle === '编辑') {
+					api.updateList(query, 'maindataMaterialVmcategory').then((res : any) => {
+						if (res.code === 200) {
+							this.$message({
+								type: 'success',
+								message: this.popTitle + '成功!'
+							});
+							this.getDataList();
+						} else this.failHandle(res)
+					})
+				}
+			})
+		}
+		// 获取列表数据
+		getDataList() {
+			if (!this.$refs.moduleView) {
+				if (this.timeNum > 5) {
+					clearInterval(this.timer)
+				}
+				this.timeNum++;
+				return
+			}
+			clearInterval(this.timer)
+			let query = (this.$refs.moduleView as any).getQuery();
+			console.log('表单字段 ==> ', query);
+			api.pageList(query, 'maindataMaterialVmcategory').then((res : any) => {
+				if (res.code === 200) {
+					(this.$refs.moduleView as any).setTableValue(res.data.records);
+					let page = {
+						pageNo: res.data.current, //当前页
+						pageSize: res.data.size, //每页条数
+						total: res.data.total //总条数
+					};
+					(this.$refs.moduleView as any).setPage(page)
+				} else this.failHandle(res)
+			})
+		}
+		// 工具栏方法
+		clickHandle(e : any) {
+			if (e === 'onRefresh') (this.$refs.moduleView as any).resert();
+			if (e === 'onAdd') this.onAdd();
+			if (e === 'onDelete') this.onDelete();
+			if (e === 'onExport') this.onExport();
+		}
+		// 打开新增
+		onAdd() {
+			this.popTitle = '新增'
+			this.dialogFormVisible = true;
+			setTimeout(() => {
+				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
+			}, 0)
+		}
+		// 打开编辑
+		openEdit(e : any) {
+			this.popTitle = '编辑'
+			this.dialogFormVisible = true;
+			setTimeout(() => {
+				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);
+			}, 0)
+		}
+		// 工具栏删除
+		onDelete() {
+			let selectData = (this.$refs.moduleView as any).getSelectData()
+			let ids = '';
+			if (selectData.length > 0) {
+				selectData.map((v : any) => {
+					ids += v.id + ','
+				})
+			} else return this.$message({ type: 'warning', message: '请选择删除数据' })
+			ids = ids.slice(0, ids.length - 1);
+			api.deleteList({ ids: ids }, 'maindataMaterialVmcategory').then((res : any) => {
+				if (res.code === 200) {
+					this.getDataList();
+					this.$message({
+						type: 'success',
+						message: '删除成功!'
+					});
+				} else this.failHandle(res)
+			})
+		}
+		// 操作删除
+		doDelete2(item : any) {
+			api.deleteList({ ids: item.id }, 'maindataMaterialVmcategory').then((res : any) => {
+				if (res.code === 200) {
+					this.getDataList();
+					this.$message({
+						type: 'success',
+						message: '删除成功!'
+					});
+				} else this.failHandle(res)
+			})
+		}
+		handleRemove(file : any, fileList : any) {
+			console.log(file, fileList);
+		}
+		handlePictureCardPreview(file : any) {
+			console.log(file);
+		}
+		// 导航切换
+		handleNodeClick(e : any) {
+			// api.single({ categoryId: e.id }).then((res : any) => {
+			// 	if (res.code === 200) {
+			// 		(this.$refs.moduleView as any).setTableValue(res.data.records);
+			// 		let page = {
+			// 			pageNo: res.data.current, //当前页
+			// 			pageSize: res.data.size, //每页条数
+			// 			total: res.data.total //总条数
+			// 		};
+			// 		(this.$refs.moduleView as any).setPage(page)
+			// 	}
+			// })
+		}
+		//导出
+		onExport() {
+			let urlArr = '/maindata/maindataMaterial';
+			let query = (this.$refs.moduleView as any).getQuery();
+			(this as any).$download(urlArr + '/export', {
+				...query
+			}, urlArr[urlArr.length - 1] + `_${new Date().getTime()}.xlsx`)
+		}
+		// 运行错误
+		failHandle(err : any) {
+			let msg = err.msg ? err.msg : '运行错误!';
+			this.$message.error(msg)
+		}
+
+	}
+</script>
+<style lang="scss" scoped>
+	.my-container {
+		width: 100%;
+		box-sizing: border-box;
+		display: flex;
+		padding: 16px;
+
+		.search-btn {
+			width: 100%;
+			display: flex;
+			justify-content: flex-end;
+			margin-bottom: 20px;
+		}
+
+		.bill-left {
+			position: relative;
+			border-right: solid #EEE 1px;
+			padding-right: 16px;
+			flex-shrink: 0;
+
+			// box-sizing: border-box;
+			.bill-tab {
+				width: 150px;
+				height: 100%;
+				transition: all .5s;
+				overflow: hidden;
+			}
+
+			.title {
+				font-size: 16px;
+				padding-bottom: 16px;
+				width: 200px;
+			}
+
+			.bill-nav {
+				font-size: 14px;
+				height: 30px;
+				line-height: 30px;
+				width: 200px;
+				box-sizing: border-box;
+				padding: 0 8px;
+				cursor: pointer;
+				margin-bottom: 2px;
+				border-radius: 5px;
+			}
+
+			.onBill {
+				background-color: #bde3f7;
+			}
+
+			.bill-nav:hover {
+				background-color: #bde3f7;
+			}
+
+			.close {
+				height: 22px;
+				width: 22px;
+				border-radius: 50%;
+				border: solid #EEE 1px;
+				position: absolute;
+				top: 30px;
+				right: -11px;
+				background-color: #FFF;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				cursor: pointer;
+			}
+		}
+
+		.bill-main {
+			width: calc(100% - 16px);
+			box-sizing: border-box;
+			margin-left: 16px;
+			position: relative;
+
+			.bill-box {
+				width: 100%;
+				position: absolute;
+				left: 0;
+				top: 0;
+				opacity: 0;
+				z-index: -1;
+				transition: all .5s;
+
+				.bill-tool,
+				.table-tool {
+					width: 100%;
+					padding-bottom: 16px;
+				}
+
+				.form {
+					margin-bottom: 8px;
+				}
+			}
+
+			.on-show {
+				opacity: 1;
+				z-index: 1;
+			}
+		}
+	}
+</style>