Преглед на файлове

Merge branch 'master' of http://47.107.53.207:3000/ymy/oms

ymy преди 2 години
родител
ревизия
20b879f490

+ 11 - 9
src/api/material.ts

@@ -1,5 +1,14 @@
 import request from '@/benyun/utils/request'
 
+// 获取树形导航分类
+function treeList(data : any) {
+	return request({
+		url: '/maindata/maindataMaterialCategory/treeList',
+		method: 'GET',
+		params: data
+	})
+}
+
 // 获取物料分页列表
 function page(data : any) {
 	return request({
@@ -73,14 +82,7 @@ function deleteSku(data : any) {
 		params: data
 	})
 }
-// 机构商品分类
-function institutionList(data : any) {
-	return request({
-		url: '/maindata/maindataMaterialOrganizationCategory/treeList',
-		method: 'GET',
-		params: data
-	})
-}
+
 export default {
 	page,
 	single,
@@ -91,5 +93,5 @@ export default {
 	addSku,
 	updateSku,
 	deleteSku,
-	institutionList
+	treeList
 }

+ 0 - 56
src/api/materialClass.ts

@@ -1,56 +0,0 @@
-import request from '@/benyun/utils/request'
-
-// 获取物料树形分类
-function treeList() {
-	return request({
-		url: '/maindata/maindataMaterialCategory/treeList',
-		method: 'GET',
-	})
-}
-// 根据主键id查询物料分类数据
-function searchTreeList(data : any) {
-	return request({
-		url: '/maindata/maindataMaterialCategory/page',
-		method: 'GET',
-		params: data
-	})
-}
-// 新增物料分类
-function saveCategory(data : any) {
-	return request({
-		url: '/maindata/maindataMaterialCategory/saveCategory',
-		method: 'POST',
-		data: data
-	})
-}
-// 修改物料分类
-function updateCategory(data : any) {
-	return request({
-		url: '/maindata/maindataMaterialCategory/update',
-		method: 'POST',
-		data: data
-	})
-}
-// 删除数据
-function classDelete(data : any) {
-	return request({
-		url: '/maindata/maindataMaterialCategory/delete',
-		method: 'POST',
-		params: data
-	})
-}
-// 根据父ID查询所有子节点列表
-function childrenTreeList(data : any) {
-	return request({
-		url: '/maindata/maindataMaterialCategory/childrenTreeList/id?id=' + data,
-		method: 'GET'
-	})
-}
-export default {
-	treeList,
-	searchTreeList,
-	saveCategory,
-	updateCategory,
-	classDelete,
-	childrenTreeList
-}

+ 13 - 12
src/views/audit/attribute/index.vue

@@ -23,7 +23,7 @@
 <script lang="ts">
 	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
 	import api from "@/api/currency";
-	import materialClass from "@/api/materialClass";
+	// import materialClass from "@/api/materialClass";
 	import Assembly from "@/benyun/components/Assembly/material.vue";
 	import AssemblyNature from "@/benyun/components/Assembly/nature.vue";
 	@Component
@@ -65,10 +65,10 @@
 								placeholder: '请选择数据',
 								clearable: true,
 								data: [{
-									value: 1,
+									value: 0,
 									label: '正常'
 								}, {
-									value: 0,
+									value: 1,
 									label: '禁用'
 								}]
 							}
@@ -214,24 +214,25 @@
 			]
 		}
 		created() {
-			this.getTreeList()
+			// 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)
-			})
-		}
+		// 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();
+				console.log(query);
 				query.status = this.radio;
 				this.dialogFormVisible = false;
 				if (this.popTitle === '新增') {

+ 1 - 0
src/views/audit/brand/index.vue

@@ -198,6 +198,7 @@
 		confirm() {
 			(this as any).$refs.addFormId.validate().then(() => {
 				let query = (this as any).$refs.addFormId.getValue();
+				console.log(query);
 				query.status = this.radio;
 				this.dialogFormVisible = false;
 				if (this.popTitle === '新增') {

+ 277 - 348
src/views/audit/productClassification/index.vue

@@ -7,138 +7,153 @@
 			</div>
 		</div>
 		<div class="bill-main">
-			<div v-show="!hideSearch">
-				<by-form :propConfig="formConfig" ref="formId" />
-				<div class="search-btn">
-					<el-button type="primary" size="mini" icon="el-icon-search" @click="searchHandle">搜索</el-button>
-					<el-button size="mini" icon="el-icon-refresh" @click="resertHandle">重置</el-button>
-				</div>
-			</div>
-			<by-tool :propConfig="toolConfig" ref="toolId" @clickHandle="clickHandle" />
-			<el-table :data="tableData" v-loading="loading" style="width: 100%;margin: 20px 0;" :show-overflow-tooltip="true"
-				row-key="id" ref="tableId" :tree-props="{children: 'children'}" @cell-click="doClick">
-				<el-table-column prop="name" label="名称" width="300" @click="clickMy" />
-				<el-table-column prop="shortName" label="简称" width="300" />
-				<el-table-column prop="status" label="状态">
-					<template slot-scope="scope">
-						<el-tag size='mini' :type="scope.row.status===0?'primary':'danger'"
-							disable-transitions>{{scope.row.status===0?'正常':'禁用'}}</el-tag>
-					</template>
-				</el-table-column>
-				<el-table-column prop="remark" label="备注" />
-				<el-table-column label="操作" width="100" style="text-align: center;">
-					<template>
-						<el-button type="text" size="small" icon="el-icon-edit" @click="dialogEdit">编辑</el-button>
-						<el-button type="text" size="small" @click="doDelete">删除</el-button>
-					</template>
-				</el-table-column>
-			</el-table>
-			<!-- 新增/编辑弹窗 -->
-			<el-dialog :title="title+'商品分类'" :visible.sync="dialogFormVisible" width="30%">
-				<by-form :propConfig="addConfig" ref="addFormId">
-					<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>
-					<template v-slot:category>
-						<el-cascader style="width: 100%;" v-model="cascaderValue" :options="options" :props="props"
-							:show-all-levels="false" clearable @change="getChange" />
-					</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>
+			<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: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/materialClass";
-	@Component({})
+	import api from "@/api/currency";
+	import Assembly from "@/benyun/components/Assembly/material.vue";
+	@Component
 	export default class ProductClassification extends Vue {
-		hideSearch = false
-		title = '新增'
-		loading : boolean = true
-		dialogFormVisible : boolean = false
-		cellsData : any = ''
-		cascaderValue : any = ''
-		radio = '0'
+		// 左边
 		data : any = []
 		props = {
 			label: 'name',
-			value: 'id',
-			children: 'children',
-			checkStrictly: true
+			children: 'children'
 		}
-		options : Array<any> = []
-		tableData : Array<any> = []
-		toolConfig = {
-			tools: {
-				add: true,
-				export: true,
-				search: true,
-				refresh: true
-			},
-			audit: {
-				add: 'audit:collaborationLog:add',
-				export: 'audit:collaborationLog:export'
-			}
-		}
-		formConfig = {
-			attr: {
-				size: 'small',
-			},
-			columns: [
-				[{
-					span: 6,
-					label: '名称',
-					prop: 'name',
-					component: 'by-input',
-					labelWidth: '70px',
-					compConfig: {
-						attr: {
-							placeholder: '请输入名称',
-							clearable: true
+		// 右边
+		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: '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: 1,
+									label: '正常'
+								}, {
+									value: 0,
+									label: '禁用'
+								}]
+							}
 						}
 					},
+					]
+				]
+			},
+			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: [{
+					width: 300,
+					title: '名称',
+					field: 'name',
+					isDetail: true,
 				}, {
-					span: 6,
-					label: '简称',
-					prop: 'shortName',
-					component: 'by-input',
-					labelWidth: '70px',
-					compConfig: {
-						attr: {
-							placeholder: '请输入简称',
-							clearable: true
-						}
-					}
+					title: '简称',
+					field: 'shortName'
+				}, {
+					width: 80,
+					title: '状态',
+					field: 'status',
+					component: Assembly,
 				},
 				{
-					span: 6,
-					label: '状态',
-					prop: 'status',
-					labelWidth: '70px',
-					component: 'by-select',
-					compConfig: {
-						attr: {
-							placeholder: '请选择状态',
-							clearable: true,
-							data: [{
-								value: 0,
-								label: '正常'
-							}, {
-								value: 1,
-								label: '禁用'
-							}]
+					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: {
@@ -147,159 +162,80 @@
 					name: [{
 						required: true, message: '请输入名称', trigger: 'blur'
 					}],
-					shortName: [{
-						required: true, message: '请输入简称', trigger: 'blur'
-					}]
 				}
 			},
 			columns: [
 				[
 					{
-						labelWidth: '80px',
-						span: 24,
-						label: '上级分类',
-						prop: 'category',
-						component:'select-tree',
-						compConfig:{
-						  attr:{
-								width:400,
-						    label:'name',
-						    clearable:true,
-						    retConfig:{
-						      treeName:'name',
-						      treeId:'id'
-						    }
-						  },
-						  request:{
-						    url:'/maindata/maindataMaterialCategory/treeList'
-						  }
-						}
-					},
-					{
-						span: 24,
+						span: 23,
+						labelWidth: '70px',
 						label: '名称',
 						prop: 'name',
 						component: 'by-input',
-						labelWidth: '80px',
 					},
 					{
-						span: 24,
+						span: 23,
+						labelWidth: '70px',
 						label: '简称',
+						slot: true,
 						prop: 'shortName',
 						component: 'by-input',
-						labelWidth: '80px',
 					},
 					{
-						span: 24,
+						span: 23,
+						labelWidth: '70px',
 						label: '状态',
 						slot: true,
 						prop: 'status',
-						labelWidth: '80px',
 					},
 					{
-						span: 24,
+						span: 23,
+						labelWidth: '70px',
 						label: '备注',
+						slot: true,
 						prop: 'remark',
 						component: 'by-input',
-						labelWidth: '80px',
-					},]
+					},
+				],
 			]
 		}
 		created() {
-			this.getDataList()
-		}
-		clickMy(e : any) {
-			console.log(e);
+			this.getTreeList()
+			this.timer = setInterval(() => {
+				this.getDataList()
+			}, 500)
 		}
-		// 获取列表数据
-		getDataList() {
-			api.treeList().then((res : any) => {
+		// 获取树型导航数据
+		getTreeList() {
+			api.treeList('maindataMaterialCategory').then((res : any) => {
 				// console.log(res.data[0]);
 				if (res.code === 200) {
-					this.tableData = res.data;
-					this.data = res.data;
-					let arr : any = [{
-						name: '顶级',
-						id: 0,
-						children: res.data
-					}]
-					this.options = arr;
-					this.loading = false;
+					this.data = res.data[0].children;
 				} else this.failHandle(res)
 			})
 		}
-		// 工具栏方法
-		clickHandle(e : any) {
-			console.log('工具栏方法 ==> ', e);
-			if (e === 'toggleSearch') this.toggleSearch();
-			if (e === 'onRefresh') this.onRefresh();
-			if (e === 'onExport') this.onExport();
-			if (e === 'onAdd') this.onAdd();
-		}
-		// 单元格点击
-		doClick(e : any) {
-			console.log('单元格点击 ==> ', e);
-			this.cellsData = e;
-			this.radio = e.status.toString();
-			if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);
-		}
-		// 新增
-		onAdd() {
-			this.title = '新增';
-			this.radio = '0';
-			this.cascaderValue = [0];
-			this.dialogFormVisible = true;
-			setTimeout(() => {
-				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
-			}, 0)
-		}
-		// 编辑
-		dialogEdit() {
-			this.title = '编辑';
-			this.cascaderValue = [0];
-			this.dialogFormVisible = true;
-		}
-		// 获取选择节点
-		getChange(e : any) {
-			console.log('获取选择节点 ==> ', e);
-			// this.cascaderValue = e;
-		}
 		// 确认新增/编辑
 		confirm() {
 			(this as any).$refs.addFormId.validate().then(() => {
 				let query = (this as any).$refs.addFormId.getValue();
-				let pareteId : any = this.cascaderValue[this.cascaderValue.length - 1];
-				// console.log(pareteId, this.radio);
+				query.status = this.radio;
 				this.dialogFormVisible = false;
-				if (this.title === '新增') {
-					api.saveCategory({
-						name: query.name,
-						shortName: query.shortName,
-						status: this.radio,
-						remark: query.remark,
-						parentId: pareteId// 父级id
-					}).then((res : any) => {
+				if (this.popTitle === '新增') {
+					api.saveList(query, 'maindataMaterialCategory').then((res : any) => {
 						if (res.code === 200) {
 							this.$message({
 								type: 'success',
-								message: this.title + '成功!'
+								message: this.popTitle + '成功!'
 							});
 							this.getDataList();
 						} else this.failHandle(res)
 					})
-				} else if (this.title === '编辑') {
-					api.updateCategory({
-						id: this.cellsData.id,
-						name: query.name,
-						shortName: query.shortName,
-						status: this.radio,
-						remark: query.remark,
-						parentId: pareteId // 父级id
-					}).then((res : any) => {
+				} else if (this.popTitle === '编辑') {
+					api.updateList(query, 'maindataMaterialCategory').then((res : any) => {
 						if (res.code === 200) {
 							this.$message({
 								type: 'success',
-								message: this.title + '成功!'
+								message: this.popTitle + '成功!'
 							});
 							this.getDataList();
 						} else this.failHandle(res)
@@ -307,132 +243,141 @@
 				}
 			})
 		}
-		// 删除
-		doDelete() {
+		// 获取列表数据
+		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, 'maindataMaterialCategory').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;
+			this.radio = 0
 			setTimeout(() => {
-				if (this.cellsData.children.length > 0) return this.$message({
-					type: 'error',
-					message: '此节点还有子集,不能做此操作'
+				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
+			}, 0)
+		}
+		// 打开编辑
+		openEdit(e : any) {
+			this.popTitle = '编辑'
+			this.dialogFormVisible = true;
+			this.radio = e.status
+			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);
+			this.$confirm('确定删除吗,此操作不能撤销!', '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning',
+				center: true
+			}).then(() => {
+				api.deleteList({ ids: ids }, 'maindataMaterialCategory').then((res : any) => {
+					if (res.code === 200) {
+						this.getDataList();
+						this.$message({
+							type: 'success',
+							message: '删除成功!'
+						});
+					} else this.failHandle(res)
+				})
+			}).catch(() => {
+				this.$message({
+					type: 'info',
+					message: '已取消删除'
 				});
-				this.$confirm('确定删除吗,此操作不能撤销!', '提示', {
-					confirmButtonText: '确定',
-					cancelButtonText: '取消',
-					type: 'warning',
-					center: true
-				}).then(() => {
-					api.classDelete({
-						ids: this.cellsData.id
-					}).then((res : any) => {
-						if (res.code === 200) {
-							this.getDataList();
-							this.$message({
-								type: 'success',
-								message: '删除成功!'
-							});
-						}
-					})
-				}).catch(() => {
-					this.$message({
-						type: 'info',
-						message: '已取消删除'
-					});
+			});
+		}
+		// 操作删除
+		doDelete2(item : any) {
+			this.$confirm('确定删除吗,此操作不能撤销!', '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning',
+				center: true
+			}).then(() => {
+				api.deleteList({ ids: item.id }, 'maindataMaterialCategory').then((res : any) => {
+					if (res.code === 200) {
+						this.getDataList();
+						this.$message({
+							type: 'success',
+							message: '删除成功!'
+						});
+					} else this.failHandle(res)
+				})
+			}).catch(() => {
+				this.$message({
+					type: 'info',
+					message: '已取消删除'
 				});
-			}, 0)
+			});
 		}
 		// 导航切换
 		handleNodeClick(e : any) {
-			// console.log('导航切换id ==> ', e.id);
-			this.loading = true;
-			api.childrenTreeList(e.id).then((res : any) => {
+			api.childrenTreeList({ id: e.id },'maindataMaterialCategory').then((res : any) => {
 				if (res.code === 200) {
-					this.tableData = res.data;
-					this.loading = false;
+					(this.$refs.moduleView as any).setTableValue(res.data);
+					let page = {
+						pageNo: res.data.current, //当前页
+						pageSize: res.data.size, //每页条数
+						total: res.data.total //总条数
+					};
+					(this.$refs.moduleView as any).setPage(page)
 				}
 			})
 		}
-		//重置
-		resertHandle() {
-			this.loading = true;
-			(this.$refs.formId as any).setValue({});
-			// (this.$refs.tableId as any).setPage({ pageNo: 1, total: 0 });
-			this.getDataList();
-		}
-		//刷新
-		onRefresh() {
-			this.loading = true;
-			// (this.$refs.formId as any).setValue({});
-			// (this.$refs.tableId as any).setPage({ pageNo: 1, total: 0 });
-			this.getDataList();
-		}
-		// 搜索
-		searchHandle() {
-			this.loading = true;
-			let query : any = (this.$refs.formId as any).getValue();
-			console.log(query);
-			if (!query) return this.getDataList();
-			api.searchTreeList(query).then((res : any) => {
-				if (res.code === 200) {
-					this.tableData = [];
-					this.tableData = res.data.records;
-					this.loading = false;
-				};
-			})
-		}
-		//获取查询值
-		getQuery() {
-			let query : any = (this.$refs.formId as any).getValue();
-			// const page:any = (this.$refs.tableId as any).getPage();
-			// query.pageNum = page.pageNo;
-			// query.pageSize = page.pageSize;
-			return query;
-		}
 		//导出
 		onExport() {
-			let urlArr = '/maindata/maindataMaterialOrganizationCategory';
-			let query = this.getQuery();
+			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`)
-
-		}
-		//显示/隐藏搜索
-		toggleSearch() {
-			this.hideSearch = !this.hideSearch
 		}
 		// 运行错误
 		failHandle(err : any) {
 			let msg = err.msg ? err.msg : '运行错误!';
 			this.$message.error(msg)
 		}
-	}
-</script>
-<style lang="scss">
-	.my-container {
-		.el-form-item__label {
-			text-align: center;
-		}
-
-		.el-form-item__content {
-			margin-right: 20px;
-		}
-
-		.has-gutter .is-leaf.el-table__cell:nth-of-type(5) {
-			text-align: center;
-		}
-
-		.form-row.el-row>div {
-			margin-bottom: 10px;
-		}
-	}
-
-	.el-dialog:not(.is-fullscreen) {
-		margin-top: 15vh !important;
-	}
 
-	.el-message-box {
-		vertical-align: baseline;
 	}
-</style>
+</script>
 <style lang="scss" scoped>
 	.my-container {
 		width: 100%;
@@ -440,6 +385,13 @@
 		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;
@@ -502,29 +454,6 @@
 			margin-left: 16px;
 			position: relative;
 
-			.upload-img {
-				width: 150px;
-				height: 150px;
-				line-height: 150px;
-				text-align: center;
-				border-radius: 5px;
-				background-color: #fbfdff;
-				color: #8c939d;
-				border: 1px dashed #c0ccda;
-				font-size: 28px;
-			}
-
-			.upload-img:hover {
-				border-color: #1890ff;
-			}
-
-			.search-btn {
-				width: 100%;
-				display: flex;
-				justify-content: flex-end;
-				margin-bottom: 20px;
-			}
-
 			.bill-box {
 				width: 100%;
 				position: absolute;

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

@@ -15,7 +15,6 @@
 <script lang="ts">
 	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
 	import api from "@/api/material";
-	import materialClass from "@/api/materialClass";
 	@Component({})
 	export default class productManagement extends Vue {
 		timeNum = 0;
@@ -168,11 +167,11 @@
 					title: '基本售价',
 					field: 'basePrice'
 				}, {
-					title: '市场价格(统一售价)',
+					title: '市场价格', // 市场价格统一售价)
 					field: 'markPrice'
 				},
 				{
-					title: '价格(成交、成本价)',
+					title: '价格', // 价格(成交、成本价)
 					field: 'price'
 				}, {
 					title: '单位',
@@ -181,7 +180,7 @@
 					title: '重量',
 					field: 'weight'
 				}, {
-					title: '保质期(天)',
+					title: '保质期', // 保质期(天)
 					field: 'shelfLife'
 				}, {
 					title: '库存',
@@ -229,7 +228,7 @@
 		}
 		// 获取树型导航数据
 		getTreeList() {
-			materialClass.treeList().then((res : any) => {
+			api.treeList({}).then((res : any) => {
 				// console.log(res.data[0]);
 				if (res.code === 200) {
 					this.data = res.data[0].children;

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

@@ -14,12 +14,6 @@
 		<!-- 新增/编辑弹窗 -->
 		<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>