AlanWong 2 жил өмнө
parent
commit
aaaba30ef7

+ 9 - 0
src/api/currency.ts

@@ -7,6 +7,14 @@ function treeList(url : any) {
 		method: 'GET',
 		method: 'GET',
 	})
 	})
 }
 }
+// 通过父级id查子集
+function childrenTreeList(data : any, url : any) {
+	return request({
+		url: '/maindata/' + url + '/childrenTreeList',
+		method: 'GET',
+		params: data
+	})
+}
 
 
 // 分页查询数据
 // 分页查询数据
 function pageList(data : any, url : any) {
 function pageList(data : any, url : any) {
@@ -43,6 +51,7 @@ function deleteList(data : any, url : any) {
 }
 }
 export default {
 export default {
 	treeList,
 	treeList,
+	childrenTreeList,
 	pageList,
 	pageList,
 	saveList,
 	saveList,
 	updateList,
 	updateList,

+ 72 - 65
src/views/audit/agencyGoods/index.vue

@@ -12,7 +12,7 @@
 			</module-view>
 			</module-view>
 		</div>
 		</div>
 		<!-- 新增/编辑弹窗 -->
 		<!-- 新增/编辑弹窗 -->
-		<el-dialog :title="popTitle+'品牌'" :visible.sync="dialogFormVisible" width="30%">
+		<el-dialog :title="popTitle+'机构商品分类'" :visible.sync="dialogFormVisible" width="30%">
 			<by-form :propConfig="addConfig" ref="addFormId">
 			<by-form :propConfig="addConfig" ref="addFormId">
 				<template v-slot:logo>
 				<template v-slot:logo>
 					<el-upload :limit='1' :action="baseURL+'/file/upload'" list-type="picture-card"
 					<el-upload :limit='1' :action="baseURL+'/file/upload'" list-type="picture-card"
@@ -21,8 +21,8 @@
 					</el-upload>
 					</el-upload>
 				</template>
 				</template>
 				<template v-slot:status class="clearfix">
 				<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>
+					<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>
 			</by-form>
 			</by-form>
 			<div slot="footer" class="dialog-footer">
 			<div slot="footer" class="dialog-footer">
@@ -35,8 +35,9 @@
 <script lang="ts">
 <script lang="ts">
 	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
 	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
 	import api from "@/api/currency";
 	import api from "@/api/currency";
+	import Assembly from "@/benyun/components/Assembly/material.vue";
 	@Component
 	@Component
-	export default class Virtually extends Vue {
+	export default class AgencyGoods extends Vue {
 		// 左边
 		// 左边
 		data : any = []
 		data : any = []
 		props = {
 		props = {
@@ -48,7 +49,7 @@
 		timeNum = 0;
 		timeNum = 0;
 		timer : any = null
 		timer : any = null
 		popTitle : any = ''
 		popTitle : any = ''
-		radio : any = 1
+		radio : any = 0
 		dialogFormVisible : boolean = false
 		dialogFormVisible : boolean = false
 		config : any = {
 		config : any = {
 			search: {
 			search: {
@@ -93,28 +94,15 @@
 								placeholder: '请选择数据',
 								placeholder: '请选择数据',
 								clearable: true,
 								clearable: true,
 								data: [{
 								data: [{
+									value: 1,
+									label: '正常'
+								}, {
 									value: 0,
 									value: 0,
 									label: '禁用'
 									label: '禁用'
-								}, {
-									value: 1,
-									label: '启用'
 								}]
 								}]
 							}
 							}
 						}
 						}
 					},
 					},
-					{
-						span: 6,
-						label: '备注',
-						prop: 'remark',
-						component: 'by-input',
-						labelWidth: '70px',
-						compConfig: {
-							attr: {
-								placeholder: '请输入备注',
-								clearable: true
-							},
-						},
-					},
 					]
 					]
 				]
 				]
 			},
 			},
@@ -136,17 +124,18 @@
 					height: 600
 					height: 600
 				},
 				},
 				columns: [{
 				columns: [{
+					width: 300,
 					title: '名称',
 					title: '名称',
 					field: 'name',
 					field: 'name',
 					isDetail: true,
 					isDetail: true,
-					width: 150,
 				}, {
 				}, {
 					title: '简称',
 					title: '简称',
 					field: 'shortName'
 					field: 'shortName'
 				}, {
 				}, {
+					width: 80,
 					title: '状态',
 					title: '状态',
 					field: 'status',
 					field: 'status',
-					prop: 'status',
+					component: Assembly,
 				},
 				},
 				{
 				{
 					title: '备注',
 					title: '备注',
@@ -184,26 +173,26 @@
 			columns: [
 			columns: [
 				[
 				[
 					{
 					{
-						span: 20,
+						span: 24,
 						label: '名称',
 						label: '名称',
 						prop: 'name',
 						prop: 'name',
 						component: 'by-input',
 						component: 'by-input',
 					},
 					},
 					{
 					{
-						span: 20,
+						span: 24,
 						label: '简称',
 						label: '简称',
 						slot: true,
 						slot: true,
 						prop: 'shortName',
 						prop: 'shortName',
 						component: 'by-input',
 						component: 'by-input',
 					},
 					},
 					{
 					{
-						span: 20,
+						span: 24,
 						label: '显示状态',
 						label: '显示状态',
 						slot: true,
 						slot: true,
 						prop: 'status',
 						prop: 'status',
 					},
 					},
 					{
 					{
-						span: 20,
+						span: 24,
 						label: '备注',
 						label: '备注',
 						slot: true,
 						slot: true,
 						prop: 'remark',
 						prop: 'remark',
@@ -221,9 +210,8 @@
 		// 获取树型导航数据
 		// 获取树型导航数据
 		getTreeList() {
 		getTreeList() {
 			api.treeList('maindataMaterialOrganizationCategory').then((res : any) => {
 			api.treeList('maindataMaterialOrganizationCategory').then((res : any) => {
-				// console.log(res.data[0]);
 				if (res.code === 200) {
 				if (res.code === 200) {
-					this.data = res.data[0].children;
+					this.data = res.data;
 				} else this.failHandle(res)
 				} else this.failHandle(res)
 			})
 			})
 		}
 		}
@@ -291,6 +279,7 @@
 		onAdd() {
 		onAdd() {
 			this.popTitle = '新增'
 			this.popTitle = '新增'
 			this.dialogFormVisible = true;
 			this.dialogFormVisible = true;
+			this.radio = 0
 			setTimeout(() => {
 			setTimeout(() => {
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
 			}, 0)
 			}, 0)
@@ -299,6 +288,7 @@
 		openEdit(e : any) {
 		openEdit(e : any) {
 			this.popTitle = '编辑'
 			this.popTitle = '编辑'
 			this.dialogFormVisible = true;
 			this.dialogFormVisible = true;
+			this.radio = e.status
 			setTimeout(() => {
 			setTimeout(() => {
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);
 			}, 0)
 			}, 0)
@@ -313,48 +303,65 @@
 				})
 				})
 			} else return this.$message({ type: 'warning', message: '请选择删除数据' })
 			} else return this.$message({ type: 'warning', message: '请选择删除数据' })
 			ids = ids.slice(0, ids.length - 1);
 			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)
-			})
+			this.$confirm('确定删除吗,此操作不能撤销!', '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning',
+				center: true
+			}).then(() => {
+				api.deleteList({ ids: ids }, 'maindataMaterialOrganizationCategory').then((res : any) => {
+					if (res.code === 200) {
+						this.getDataList();
+						this.$message({
+							type: 'success',
+							message: '删除成功!'
+						});
+					} else this.failHandle(res)
+				})
+			}).catch(() => {
+				this.$message({
+					type: 'info',
+					message: '已取消删除'
+				});
+			});
 		}
 		}
 		// 操作删除
 		// 操作删除
 		doDelete2(item : any) {
 		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);
+			this.$confirm('确定删除吗,此操作不能撤销!', '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning',
+				center: true
+			}).then(() => {
+				api.deleteList({ ids: item.id }, 'maindataMaterialOrganizationCategory').then((res : any) => {
+					if (res.code === 200) {
+						this.getDataList();
+						this.$message({
+							type: 'success',
+							message: '删除成功!'
+						});
+					} else this.failHandle(res)
+				})
+			}).catch(() => {
+				this.$message({
+					type: 'info',
+					message: '已取消删除'
+				});
+			});
 		}
 		}
 		// 导航切换
 		// 导航切换
 		handleNodeClick(e : any) {
 		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)
-			// 	}
-			// })
+			api.childrenTreeList({ id: e.id }, 'maindataMaterialOrganizationCategory').then((res : any) => {
+				if (res.code === 200) {
+					(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)
+				}
+			})
 		}
 		}
 		//导出
 		//导出
 		onExport() {
 		onExport() {

+ 5 - 3
src/views/audit/attribute/index.vue

@@ -9,8 +9,8 @@
 		<el-dialog :title="popTitle+'属性'" :visible.sync="dialogFormVisible" width="30%">
 		<el-dialog :title="popTitle+'属性'" :visible.sync="dialogFormVisible" width="30%">
 			<by-form :propConfig="addConfig" ref="addFormId">
 			<by-form :propConfig="addConfig" ref="addFormId">
 				<template v-slot:status class="clearfix">
 				<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>
+					<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>
 			</by-form>
 			</by-form>
 			<div slot="footer" class="dialog-footer">
 			<div slot="footer" class="dialog-footer">
@@ -33,7 +33,7 @@
 		timeNum = 0;
 		timeNum = 0;
 		timer : any = null
 		timer : any = null
 		popTitle : any = ''
 		popTitle : any = ''
-		radio : any = 1
+		radio : any = 0
 		dialogFormVisible : boolean = false
 		dialogFormVisible : boolean = false
 		config : any = {
 		config : any = {
 			search: {
 			search: {
@@ -288,6 +288,7 @@
 		onAdd() {
 		onAdd() {
 			this.popTitle = '新增'
 			this.popTitle = '新增'
 			this.dialogFormVisible = true;
 			this.dialogFormVisible = true;
+			this.radio = 0
 			setTimeout(() => {
 			setTimeout(() => {
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
 			}, 0)
 			}, 0)
@@ -296,6 +297,7 @@
 		openEdit(e : any) {
 		openEdit(e : any) {
 			this.popTitle = '编辑'
 			this.popTitle = '编辑'
 			this.dialogFormVisible = true;
 			this.dialogFormVisible = true;
+			this.radio = e.status
 			setTimeout(() => {
 			setTimeout(() => {
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);
 			}, 0)
 			}, 0)

+ 63 - 49
src/views/audit/binTable/index.vue

@@ -45,6 +45,7 @@
 				columns: [
 				columns: [
 					[
 					[
 						{
 						{
+							span: 6,
 							label: '名称',
 							label: '名称',
 							prop: 'name',
 							prop: 'name',
 							component: 'by-input',
 							component: 'by-input',
@@ -56,6 +57,7 @@
 							},
 							},
 						},
 						},
 						{
 						{
+							span: 6,
 							label: '所属机构名称',
 							label: '所属机构名称',
 							prop: 'organizationName',
 							prop: 'organizationName',
 							component: 'by-input',
 							component: 'by-input',
@@ -67,17 +69,7 @@
 							}
 							}
 						},
 						},
 						{
 						{
-							label: '所属机构id',
-							prop: 'organizationId',
-							component: 'by-input',
-							compConfig: {
-								attr: {
-									placeholder: '请输入所属机构id',
-									clearable: true
-								}
-							}
-						},
-						{
+							span: 6,
 							label: '库存',
 							label: '库存',
 							prop: 'stock',
 							prop: 'stock',
 							component: 'by-input',
 							component: 'by-input',
@@ -87,10 +79,9 @@
 									clearable: true
 									clearable: true
 								}
 								}
 							}
 							}
-						}
-					],
-					[
+						},
 						{
 						{
+							span: 6,
 							label: '库存体积',
 							label: '库存体积',
 							prop: 'stockVolume',
 							prop: 'stockVolume',
 							component: 'by-input',
 							component: 'by-input',
@@ -101,7 +92,10 @@
 								},
 								},
 							},
 							},
 						},
 						},
+					],
+					[
 						{
 						{
+							span: 6,
 							label: '库存上限数量',
 							label: '库存上限数量',
 							prop: 'maxStockNumber',
 							prop: 'maxStockNumber',
 							component: 'by-input',
 							component: 'by-input',
@@ -113,6 +107,7 @@
 							}
 							}
 						},
 						},
 						{
 						{
+							span: 6,
 							label: '库存体积上限',
 							label: '库存体积上限',
 							prop: 'maxStockVolume',
 							prop: 'maxStockVolume',
 							component: 'by-input',
 							component: 'by-input',
@@ -124,12 +119,13 @@
 							}
 							}
 						},
 						},
 						{
 						{
-							label: '所属仓库id',
+							span: 6,
+							label: '所属仓库',
 							prop: 'storehouseId',
 							prop: 'storehouseId',
 							component: 'by-input',
 							component: 'by-input',
 							compConfig: {
 							compConfig: {
 								attr: {
 								attr: {
-									placeholder: '请输入所属仓库id',
+									placeholder: '请输入所属仓库',
 									clearable: true
 									clearable: true
 								}
 								}
 							}
 							}
@@ -155,10 +151,10 @@
 					height: 600
 					height: 600
 				},
 				},
 				columns: [{
 				columns: [{
+					width: 300,
 					title: '名称',
 					title: '名称',
 					field: 'name',
 					field: 'name',
 					isDetail: true,
 					isDetail: true,
-					width: 150,
 				}, {
 				}, {
 					title: '所属机构名称',
 					title: '所属机构名称',
 					field: 'organizationName',
 					field: 'organizationName',
@@ -218,49 +214,49 @@
 			columns: [
 			columns: [
 				[
 				[
 					{
 					{
-						span: 20,
+						span: 24,
 						label: '名称',
 						label: '名称',
 						prop: 'name',
 						prop: 'name',
 						component: 'by-input',
 						component: 'by-input',
 					},
 					},
 					{
 					{
-						span: 20,
+						span: 24,
 						label: '所属机构名称',
 						label: '所属机构名称',
 						prop: 'organizationName',
 						prop: 'organizationName',
 						component: 'by-input',
 						component: 'by-input',
 					},
 					},
 					{
 					{
-						span: 20,
+						span: 24,
 						label: '所属机构id',
 						label: '所属机构id',
 						prop: 'organizationId',
 						prop: 'organizationId',
 						component: 'by-input',
 						component: 'by-input',
 					},
 					},
 					{
 					{
-						span: 20,
+						span: 24,
 						label: '库存',
 						label: '库存',
 						prop: 'stock',
 						prop: 'stock',
 						component: 'by-input',
 						component: 'by-input',
 					},
 					},
 					{
 					{
-						span: 20,
+						span: 24,
 						label: '库存体积',
 						label: '库存体积',
 						prop: 'stockVolume',
 						prop: 'stockVolume',
 						component: 'by-input',
 						component: 'by-input',
 					},
 					},
 					{
 					{
-						span: 20,
+						span: 24,
 						label: '库存数量上限',
 						label: '库存数量上限',
 						prop: 'maxStockNumber',
 						prop: 'maxStockNumber',
 						component: 'by-input',
 						component: 'by-input',
 					},
 					},
 					{
 					{
-						span: 20,
+						span: 24,
 						label: '库存体积上限',
 						label: '库存体积上限',
 						prop: 'maxStockVolume',
 						prop: 'maxStockVolume',
 						component: 'by-input',
 						component: 'by-input',
 					},
 					},
 					{
 					{
-						span: 20,
+						span: 24,
 						label: '所属仓库id',
 						label: '所属仓库id',
 						prop: 'storehouseId',
 						prop: 'storehouseId',
 						component: 'by-input',
 						component: 'by-input',
@@ -358,33 +354,51 @@
 				})
 				})
 			} else return this.$message({ type: 'warning', message: '请选择删除数据' })
 			} else return this.$message({ type: 'warning', message: '请选择删除数据' })
 			ids = ids.slice(0, ids.length - 1);
 			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)
-			})
+			this.$confirm('确定删除吗,此操作不能撤销!', '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning',
+				center: true
+			}).then(() => {
+				api.deleteList({ ids: ids }, 'maindataStoringLocation').then((res : any) => {
+					if (res.code === 200) {
+						this.getDataList();
+						this.$message({
+							type: 'success',
+							message: '删除成功!'
+						});
+					} else this.failHandle(res)
+				})
+			}).catch(() => {
+				this.$message({
+					type: 'info',
+					message: '已取消删除'
+				});
+			});
 		}
 		}
 		// 操作删除
 		// 操作删除
 		doDelete2(item : any) {
 		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);
+			this.$confirm('确定删除吗,此操作不能撤销!', '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning',
+				center: true
+			}).then(() => {
+				api.deleteList({ ids: item.id }, 'maindataStoringLocation').then((res : any) => {
+					if (res.code === 200) {
+						this.getDataList();
+						this.$message({
+							type: 'success',
+							message: '删除成功!'
+						});
+					} else this.failHandle(res)
+				})
+			}).catch(() => {
+				this.$message({
+					type: 'info',
+					message: '已取消删除'
+				});
+			});
 		}
 		}
 		//导出
 		//导出
 		onExport() {
 		onExport() {

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

@@ -253,6 +253,7 @@
 		onAdd() {
 		onAdd() {
 			this.popTitle = '新增'
 			this.popTitle = '新增'
 			this.dialogFormVisible = true;
 			this.dialogFormVisible = true;
+			this.radio = 0
 			setTimeout(() => {
 			setTimeout(() => {
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
 			}, 0)
 			}, 0)
@@ -261,6 +262,7 @@
 		openEdit(e : any) {
 		openEdit(e : any) {
 			this.popTitle = '编辑'
 			this.popTitle = '编辑'
 			this.dialogFormVisible = true;
 			this.dialogFormVisible = true;
+			this.radio = e.status
 			setTimeout(() => {
 			setTimeout(() => {
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);
 			}, 0)
 			}, 0)

+ 48 - 43
src/views/audit/depots/index.vue

@@ -68,19 +68,6 @@
 							}
 							}
 						}
 						}
 					},
 					},
-					{
-						span: 6,
-						label: '坐标',
-						prop: 'coordinate',
-						component: 'by-input',
-						labelWidth: '70px',
-						compConfig: {
-							attr: {
-								placeholder: '请输入坐标',
-								clearable: true
-							}
-						}
-					},
 					]
 					]
 				]
 				]
 			},
 			},
@@ -102,14 +89,14 @@
 					height: 600
 					height: 600
 				},
 				},
 				columns: [{
 				columns: [{
+					width: 300,
 					title: '名称',
 					title: '名称',
 					field: 'name',
 					field: 'name',
-					isDetail:true,
-					width: 150,
+					isDetail: true,
 				}, {
 				}, {
 					title: '地址',
 					title: '地址',
 					field: 'address',
 					field: 'address',
-				},  {
+				}, {
 					title: '坐标',
 					title: '坐标',
 					field: 'coordinate'
 					field: 'coordinate'
 				}, {
 				}, {
@@ -148,19 +135,19 @@
 			columns: [
 			columns: [
 				[
 				[
 					{
 					{
-						span: 20,
+						span: 24,
 						label: '名称',
 						label: '名称',
 						prop: 'name',
 						prop: 'name',
 						component: 'by-input',
 						component: 'by-input',
 					},
 					},
 					{
 					{
-						span: 20,
+						span: 24,
 						label: '地址',
 						label: '地址',
 						prop: 'address',
 						prop: 'address',
 						component: 'by-input',
 						component: 'by-input',
 					},
 					},
 					{
 					{
-						span: 20,
+						span: 24,
 						label: '坐标',
 						label: '坐标',
 						prop: 'coordinate',
 						prop: 'coordinate',
 						component: 'by-input',
 						component: 'by-input',
@@ -258,33 +245,51 @@
 				})
 				})
 			} else return this.$message({ type: 'warning', message: '请选择删除数据' })
 			} else return this.$message({ type: 'warning', message: '请选择删除数据' })
 			ids = ids.slice(0, ids.length - 1);
 			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)
-			})
+			this.$confirm('确定删除吗,此操作不能撤销!', '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning',
+				center: true
+			}).then(() => {
+				api.deleteList({ ids: ids }, 'maindataStorehouse').then((res : any) => {
+					if (res.code === 200) {
+						this.getDataList();
+						this.$message({
+							type: 'success',
+							message: '删除成功!'
+						});
+					} else this.failHandle(res)
+				})
+			}).catch(() => {
+				this.$message({
+					type: 'info',
+					message: '已取消删除'
+				});
+			});
 		}
 		}
 		// 操作删除
 		// 操作删除
 		doDelete2(item : any) {
 		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);
+			this.$confirm('确定删除吗,此操作不能撤销!', '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning',
+				center: true
+			}).then(() => {
+				api.deleteList({ ids: item.id }, 'maindataStorehouse').then((res : any) => {
+					if (res.code === 200) {
+						this.getDataList();
+						this.$message({
+							type: 'success',
+							message: '删除成功!'
+						});
+					} else this.failHandle(res)
+				})
+			}).catch(() => {
+				this.$message({
+					type: 'info',
+					message: '已取消删除'
+				});
+			});
 		}
 		}
 		//导出
 		//导出
 		onExport() {
 		onExport() {

+ 12 - 72
src/views/audit/materialAdd/index.vue

@@ -250,24 +250,9 @@
 							attr: {
 							attr: {
 								placeholder: '请选择数据',
 								placeholder: '请选择数据',
 								clearable: true,
 								clearable: true,
-								data: [{
-									value: '选项1',
-									label: '黄金糕'
-								}, {
-									value: '选项2',
-									label: '双皮奶'
-								}, {
-									value: '选项3',
-									label: '蚵仔煎'
-								}, {
-									value: '选项4',
-									label: '龙须面'
-								}, {
-									value: '选项5',
-									label: '北京烤鸭'
-								}]
-							}
-						}
+							},
+							request: '/maindata/maindataMaterialCategory/treeList'
+						},
 					},
 					},
 					{
 					{
 						span: 6,
 						span: 6,
@@ -278,24 +263,9 @@
 							attr: {
 							attr: {
 								placeholder: '请选择数据',
 								placeholder: '请选择数据',
 								clearable: true,
 								clearable: true,
-								data: [{
-									value: '选项1',
-									label: '黄金糕'
-								}, {
-									value: '选项2',
-									label: '双皮奶'
-								}, {
-									value: '选项3',
-									label: '蚵仔煎'
-								}, {
-									value: '选项4',
-									label: '龙须面'
-								}, {
-									value: '选项5',
-									label: '北京烤鸭'
-								}]
-							}
-						}
+							},
+							request: '/maindata/maindataMaterialCategory/treeList'
+						},
 					}
 					}
 				],
 				],
 				[
 				[
@@ -308,24 +278,9 @@
 							attr: {
 							attr: {
 								placeholder: '请选择数据',
 								placeholder: '请选择数据',
 								clearable: true,
 								clearable: true,
-								data: [{
-									value: '选项1',
-									label: '黄金糕'
-								}, {
-									value: '选项2',
-									label: '双皮奶'
-								}, {
-									value: '选项3',
-									label: '蚵仔煎'
-								}, {
-									value: '选项4',
-									label: '龙须面'
-								}, {
-									value: '选项5',
-									label: '北京烤鸭'
-								}]
-							}
-						}
+							},
+							request: '/maindata/maindataMaterialCategory/treeList'
+						},
 					},
 					},
 					{
 					{
 						span: 6,
 						span: 6,
@@ -336,24 +291,9 @@
 							attr: {
 							attr: {
 								placeholder: '请选择数据',
 								placeholder: '请选择数据',
 								clearable: true,
 								clearable: true,
-								data: [{
-									value: '选项1',
-									label: '黄金糕'
-								}, {
-									value: '选项2',
-									label: '双皮奶'
-								}, {
-									value: '选项3',
-									label: '蚵仔煎'
-								}, {
-									value: '选项4',
-									label: '龙须面'
-								}, {
-									value: '选项5',
-									label: '北京烤鸭'
-								}]
-							}
-						}
+							},
+							request: '/maindata/maindataMaterialCategory/treeList'
+						},
 					}
 					}
 				],
 				],
 				[
 				[

+ 16 - 93
src/views/audit/materialEdit/index.vue

@@ -236,24 +236,9 @@
 							attr: {
 							attr: {
 								placeholder: '请选择数据',
 								placeholder: '请选择数据',
 								clearable: true,
 								clearable: true,
-								data: [{
-									value: '选项1',
-									label: '黄金糕'
-								}, {
-									value: '选项2',
-									label: '双皮奶'
-								}, {
-									value: '选项3',
-									label: '蚵仔煎'
-								}, {
-									value: '选项4',
-									label: '龙须面'
-								}, {
-									value: '选项5',
-									label: '北京烤鸭'
-								}]
-							}
-						}
+							},
+							request: '/maindata/maindataMaterialCategory/treeList'
+						},
 					},
 					},
 					{
 					{
 						span: 6,
 						span: 6,
@@ -264,24 +249,9 @@
 							attr: {
 							attr: {
 								placeholder: '请选择数据',
 								placeholder: '请选择数据',
 								clearable: true,
 								clearable: true,
-								data: [{
-									value: '选项1',
-									label: '黄金糕'
-								}, {
-									value: '选项2',
-									label: '双皮奶'
-								}, {
-									value: '选项3',
-									label: '蚵仔煎'
-								}, {
-									value: '选项4',
-									label: '龙须面'
-								}, {
-									value: '选项5',
-									label: '北京烤鸭'
-								}]
-							}
-						}
+							},
+							request: '/maindata/maindataMaterialCategory/treeList'
+						},
 					},
 					},
 					{
 					{
 						span: 6,
 						span: 6,
@@ -292,24 +262,9 @@
 							attr: {
 							attr: {
 								placeholder: '请选择数据',
 								placeholder: '请选择数据',
 								clearable: true,
 								clearable: true,
-								data: [{
-									value: '选项1',
-									label: '黄金糕'
-								}, {
-									value: '选项2',
-									label: '双皮奶'
-								}, {
-									value: '选项3',
-									label: '蚵仔煎'
-								}, {
-									value: '选项4',
-									label: '龙须面'
-								}, {
-									value: '选项5',
-									label: '北京烤鸭'
-								}]
-							}
-						}
+							},
+							request: '/maindata/maindataMaterialCategory/treeList'
+						},
 					}
 					}
 				],
 				],
 				[
 				[
@@ -322,27 +277,10 @@
 							attr: {
 							attr: {
 								placeholder: '请选择数据',
 								placeholder: '请选择数据',
 								clearable: true,
 								clearable: true,
-								data: [{
-									value: '选项1',
-									label: '黄金糕'
-								}, {
-									value: '选项2',
-									label: '双皮奶'
-								}, {
-									value: '选项3',
-									label: '蚵仔煎'
-								}, {
-									value: '选项4',
-									label: '龙须面'
-								}, {
-									value: '选项5',
-									label: '北京烤鸭'
-								}]
-							}
-						}
+							},
+							request: '/maindata/maindataMaterialCategory/treeList'
+						},
 					},
 					},
-				],
-				[
 					{
 					{
 						span: 6,
 						span: 6,
 						label: '物料属性表',
 						label: '物料属性表',
@@ -352,29 +290,14 @@
 							attr: {
 							attr: {
 								placeholder: '请选择数据',
 								placeholder: '请选择数据',
 								clearable: true,
 								clearable: true,
-								data: [{
-									value: '选项1',
-									label: '黄金糕'
-								}, {
-									value: '选项2',
-									label: '双皮奶'
-								}, {
-									value: '选项3',
-									label: '蚵仔煎'
-								}, {
-									value: '选项4',
-									label: '龙须面'
-								}, {
-									value: '选项5',
-									label: '北京烤鸭'
-								}]
-							}
-						}
+							},
+							request: '/maindata/maindataMaterialCategory/treeList'
+						},
 					}
 					}
 				],
 				],
 				[
 				[
 					{
 					{
-						span: 10,
+						span: 30,
 						label: '描述',
 						label: '描述',
 						slot: true,
 						slot: true,
 						prop: 'description',
 						prop: 'description',

+ 0 - 2
src/views/audit/order/index.vue

@@ -28,8 +28,6 @@
 						{
 						{
 							name: '接单', icon: 'el-icon-plus', audit: [''], event: {
 							name: '接单', icon: 'el-icon-plus', audit: [''], event: {
 								click: () => {
 								click: () => {
-									let value = (this.$refs.bill as any).getBillFormValue(); // 设置单据表单数据
-									console.log(value);
 									// (this as any).getOrder()
 									// (this as any).getOrder()
 								}
 								}
 							}
 							}

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

@@ -34,7 +34,7 @@
 				</el-table-column>
 				</el-table-column>
 			</el-table>
 			</el-table>
 			<!-- 新增/编辑弹窗 -->
 			<!-- 新增/编辑弹窗 -->
-			<el-dialog :title="title+'分类'" :visible.sync="dialogFormVisible" width="30%">
+			<el-dialog :title="title+'商品分类'" :visible.sync="dialogFormVisible" width="30%">
 				<by-form :propConfig="addConfig" ref="addFormId">
 				<by-form :propConfig="addConfig" ref="addFormId">
 					<template v-slot:status class="clearfix">
 					<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="0">正常</el-radio>

+ 71 - 63
src/views/audit/virtually/index.vue

@@ -12,7 +12,7 @@
 			</module-view>
 			</module-view>
 		</div>
 		</div>
 		<!-- 新增/编辑弹窗 -->
 		<!-- 新增/编辑弹窗 -->
-		<el-dialog :title="popTitle+'品牌'" :visible.sync="dialogFormVisible" width="30%">
+		<el-dialog :title="popTitle+'虚拟分类'" :visible.sync="dialogFormVisible" width="30%">
 			<by-form :propConfig="addConfig" ref="addFormId">
 			<by-form :propConfig="addConfig" ref="addFormId">
 				<template v-slot:logo>
 				<template v-slot:logo>
 					<el-upload :limit='1' :action="baseURL+'/file/upload'" list-type="picture-card"
 					<el-upload :limit='1' :action="baseURL+'/file/upload'" list-type="picture-card"
@@ -21,8 +21,8 @@
 					</el-upload>
 					</el-upload>
 				</template>
 				</template>
 				<template v-slot:status class="clearfix">
 				<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>
+					<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>
 			</by-form>
 			</by-form>
 			<div slot="footer" class="dialog-footer">
 			<div slot="footer" class="dialog-footer">
@@ -35,7 +35,7 @@
 <script lang="ts">
 <script lang="ts">
 	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
 	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
 	import api from "@/api/currency";
 	import api from "@/api/currency";
-	import materialClass from "@/api/materialClass";
+	import Assembly from "@/benyun/components/Assembly/material.vue";
 	@Component
 	@Component
 	export default class Virtually extends Vue {
 	export default class Virtually extends Vue {
 		// 左边
 		// 左边
@@ -49,7 +49,7 @@
 		timeNum = 0;
 		timeNum = 0;
 		timer : any = null
 		timer : any = null
 		popTitle : any = ''
 		popTitle : any = ''
-		radio : any = 1
+		radio : any = 0
 		dialogFormVisible : boolean = false
 		dialogFormVisible : boolean = false
 		config : any = {
 		config : any = {
 			search: {
 			search: {
@@ -94,28 +94,15 @@
 								placeholder: '请选择数据',
 								placeholder: '请选择数据',
 								clearable: true,
 								clearable: true,
 								data: [{
 								data: [{
+									value: 1,
+									label: '正常'
+								}, {
 									value: 0,
 									value: 0,
 									label: '禁用'
 									label: '禁用'
-								}, {
-									value: 1,
-									label: '启用'
 								}]
 								}]
 							}
 							}
 						}
 						}
 					},
 					},
-					{
-						span: 6,
-						label: '备注',
-						prop: 'remark',
-						component: 'by-input',
-						labelWidth: '70px',
-						compConfig: {
-							attr: {
-								placeholder: '请输入备注',
-								clearable: true
-							},
-						},
-					},
 					]
 					]
 				]
 				]
 			},
 			},
@@ -137,17 +124,18 @@
 					height: 600
 					height: 600
 				},
 				},
 				columns: [{
 				columns: [{
+					width: 300,
 					title: '名称',
 					title: '名称',
 					field: 'name',
 					field: 'name',
 					isDetail: true,
 					isDetail: true,
-					width: 150,
 				}, {
 				}, {
 					title: '简称',
 					title: '简称',
 					field: 'shortName'
 					field: 'shortName'
 				}, {
 				}, {
+					width: 80,
 					title: '状态',
 					title: '状态',
 					field: 'status',
 					field: 'status',
-					prop: 'status',
+					component: Assembly,
 				},
 				},
 				{
 				{
 					title: '备注',
 					title: '备注',
@@ -185,26 +173,26 @@
 			columns: [
 			columns: [
 				[
 				[
 					{
 					{
-						span: 20,
+						span: 24,
 						label: '名称',
 						label: '名称',
 						prop: 'name',
 						prop: 'name',
 						component: 'by-input',
 						component: 'by-input',
 					},
 					},
 					{
 					{
-						span: 20,
+						span: 24,
 						label: '简称',
 						label: '简称',
 						slot: true,
 						slot: true,
 						prop: 'shortName',
 						prop: 'shortName',
 						component: 'by-input',
 						component: 'by-input',
 					},
 					},
 					{
 					{
-						span: 20,
+						span: 24,
 						label: '显示状态',
 						label: '显示状态',
 						slot: true,
 						slot: true,
 						prop: 'status',
 						prop: 'status',
 					},
 					},
 					{
 					{
-						span: 20,
+						span: 24,
 						label: '备注',
 						label: '备注',
 						slot: true,
 						slot: true,
 						prop: 'remark',
 						prop: 'remark',
@@ -221,7 +209,7 @@
 		}
 		}
 		// 获取树型导航数据
 		// 获取树型导航数据
 		getTreeList() {
 		getTreeList() {
-			materialClass.treeList().then((res : any) => {
+			api.treeList('maindataMaterialVmcategory').then((res : any) => {
 				// console.log(res.data[0]);
 				// console.log(res.data[0]);
 				if (res.code === 200) {
 				if (res.code === 200) {
 					this.data = res.data[0].children;
 					this.data = res.data[0].children;
@@ -292,6 +280,7 @@
 		onAdd() {
 		onAdd() {
 			this.popTitle = '新增'
 			this.popTitle = '新增'
 			this.dialogFormVisible = true;
 			this.dialogFormVisible = true;
+			this.radio = 0
 			setTimeout(() => {
 			setTimeout(() => {
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
 			}, 0)
 			}, 0)
@@ -300,6 +289,7 @@
 		openEdit(e : any) {
 		openEdit(e : any) {
 			this.popTitle = '编辑'
 			this.popTitle = '编辑'
 			this.dialogFormVisible = true;
 			this.dialogFormVisible = true;
+			this.radio = e.status
 			setTimeout(() => {
 			setTimeout(() => {
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);
 			}, 0)
 			}, 0)
@@ -314,47 +304,65 @@
 				})
 				})
 			} else return this.$message({ type: 'warning', message: '请选择删除数据' })
 			} else return this.$message({ type: 'warning', message: '请选择删除数据' })
 			ids = ids.slice(0, ids.length - 1);
 			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)
-			})
+			this.$confirm('确定删除吗,此操作不能撤销!', '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning',
+				center: true
+			}).then(() => {
+				api.deleteList({ ids: ids }, 'maindataMaterialVmcategory').then((res : any) => {
+					if (res.code === 200) {
+						this.getDataList();
+						this.$message({
+							type: 'success',
+							message: '删除成功!'
+						});
+					} else this.failHandle(res)
+				})
+			}).catch(() => {
+				this.$message({
+					type: 'info',
+					message: '已取消删除'
+				});
+			});
 		}
 		}
 		// 操作删除
 		// 操作删除
 		doDelete2(item : any) {
 		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);
+			this.$confirm('确定删除吗,此操作不能撤销!', '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning',
+				center: true
+			}).then(() => {
+				api.deleteList({ ids: item.id }, 'maindataMaterialVmcategory').then((res : any) => {
+					if (res.code === 200) {
+						this.getDataList();
+						this.$message({
+							type: 'success',
+							message: '删除成功!'
+						});
+					} else this.failHandle(res)
+				})
+			}).catch(() => {
+				this.$message({
+					type: 'info',
+					message: '已取消删除'
+				});
+			});
 		}
 		}
 		// 导航切换
 		// 导航切换
 		handleNodeClick(e : any) {
 		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)
-			// 	}
-			// })
+			api.childrenTreeList({ id: e.id },'maindataMaterialVmcategory').then((res : any) => {
+				if (res.code === 200) {
+					(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)
+				}
+			})
 		}
 		}
 		//导出
 		//导出
 		onExport() {
 		onExport() {