Explorar o código

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

ymy %!s(int64=2) %!d(string=hai) anos
pai
achega
194952bb56

+ 10 - 1
src/api/currency.ts

@@ -70,6 +70,14 @@ function deleteList(data : any, url : any) {
 		params: data
 		params: data
 	})
 	})
 }
 }
+// 删除数据
+function delCategoryId(data : any, url : any) {
+	return request({
+		url: '/maindata/' + url + '/CategoryId',
+		method: 'delete',
+		params: data
+	})
+}
 export default {
 export default {
 	treeList,
 	treeList,
 	treeUseList,
 	treeUseList,
@@ -79,5 +87,6 @@ export default {
 	pageList,
 	pageList,
 	saveList,
 	saveList,
 	updateList,
 	updateList,
-	deleteList
+	deleteList,
+	delCategoryId
 }
 }

+ 15 - 19
src/views/audit/attribute/index.vue

@@ -275,7 +275,7 @@
 		doComfirm() {
 		doComfirm() {
 			this.normsValue = this.normsValue.trim();
 			this.normsValue = this.normsValue.trim();
 			this.norms = this.norms.trim();
 			this.norms = this.norms.trim();
-			if (!this.normsValue || !this.norms) return (this as any).$message({ type: "warning", message: '请添加完整的规格!' });
+			if (!this.normsValue || !this.norms) return (this as any).$message.warning('请添加完整的规格');
 			let obj : any = {
 			let obj : any = {
 				title: this.norms,
 				title: this.norms,
 				field: this.norms + '_field_name',
 				field: this.norms + '_field_name',
@@ -288,7 +288,7 @@
 		// 确认新增/编辑
 		// 确认新增/编辑
 		confirm() {
 		confirm() {
 			(this as any).$refs.addFormId.validate().then(() => {
 			(this as any).$refs.addFormId.validate().then(() => {
-				if (this.tableConfig.length <= 0) return this.$message({ type: 'warning', message: '验证未通过,请添加完整的规格!' })
+				if (this.tableConfig.length <= 0) return this.$message.warning('验证未通过,请添加完整的规格');
 				let query = (this as any).$refs.addFormId.getValue();
 				let query = (this as any).$refs.addFormId.getValue();
 				query.status = this.radio;
 				query.status = this.radio;
 				query.attributeValue = JSON.stringify(this.tableConfig)
 				query.attributeValue = JSON.stringify(this.tableConfig)
@@ -312,7 +312,7 @@
 						} else this.$message.error(res.msg);
 						} else this.$message.error(res.msg);
 					})
 					})
 				}
 				}
-				
+
 			})
 			})
 		}
 		}
 		// 获取列表数据
 		// 获取列表数据
@@ -348,7 +348,6 @@
 		clickHandle(e : any) {
 		clickHandle(e : any) {
 			if (e === 'onAdd') this.onAdd();
 			if (e === 'onAdd') this.onAdd();
 			if (e === 'onDelete') this.onDelete();
 			if (e === 'onDelete') this.onDelete();
-			if (e === 'onExport') this.onExport();
 		}
 		}
 		// 打开新增
 		// 打开新增
 		onAdd() {
 		onAdd() {
@@ -362,13 +361,18 @@
 		}
 		}
 		// 打开编辑
 		// 打开编辑
 		openEdit(e : any) {
 		openEdit(e : any) {
-			console.log('编辑 ==> ', e);
-			this.popTitle = '编辑'
-			this.dialogFormVisible = true;
-			this.radio = e.status
-			this.tableConfig = JSON.parse(e.attributeValue);
-			this.$nextTick(() => {
-				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);
+			this.popTitle = '编辑';
+			let loading = this.$loading({ target: '.main-container' });
+			api.single({ id: e.id }, 'maindataMaterialAttribute').then((res : any) => {
+				if (res.code === 200) {
+					let data = res.data;
+					this.dialogFormVisible = true;
+					this.radio = data.status;
+					loading.close();
+					this.$nextTick(() => {
+						if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(data);
+					})
+				}
 			})
 			})
 		}
 		}
 		// 工具栏删除
 		// 工具栏删除
@@ -416,14 +420,6 @@
 			(this as any).$refs.moduleView.clearSearch();
 			(this as any).$refs.moduleView.clearSearch();
 			this.getDataList();
 			this.getDataList();
 		}
 		}
-		//导出
-		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`);
-		}
 	}
 	}
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>

+ 15 - 20
src/views/audit/brand/index.vue

@@ -22,12 +22,11 @@
 </template>
 </template>
 <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 Parent from "@/components/Parent/Parent";
 	import api from "@/api/currency";
 	import api from "@/api/currency";
 	import Assembly from "@/components/Assembly/material.vue";
 	import Assembly from "@/components/Assembly/material.vue";
 	@Component
 	@Component
 	export default class Brand extends Vue {
 	export default class Brand extends Vue {
-		baseURL : any = process.env.VUE_APP_BASE_API
-		loading : any = null
 		timeNum = 0;
 		timeNum = 0;
 		timer : any = null
 		timer : any = null
 		popTitle : any = ''
 		popTitle : any = ''
@@ -98,7 +97,6 @@
 			table: {
 			table: {
 				attr: {
 				attr: {
 					size: 'mini',
 					size: 'mini',
-					// seq: true,
 					align: 'left',
 					align: 'left',
 					checkbox: true,
 					checkbox: true,
 					height: 600
 					height: 600
@@ -216,17 +214,17 @@
 				if (this.popTitle === '新增') {
 				if (this.popTitle === '新增') {
 					api.saveList(query, 'maindataMaterialBrand').then((res : any) => {
 					api.saveList(query, 'maindataMaterialBrand').then((res : any) => {
 						if (res.code === 200) {
 						if (res.code === 200) {
+							loading.close();
 							this.$message.success('新增成功');
 							this.$message.success('新增成功');
 							this.getDataList();
 							this.getDataList();
-							loading.close();
 						} else this.$message.error(res.msg);
 						} else this.$message.error(res.msg);
 					})
 					})
 				} else if (this.popTitle === '编辑') {
 				} else if (this.popTitle === '编辑') {
 					api.updateList(query, 'maindataMaterialBrand').then((res : any) => {
 					api.updateList(query, 'maindataMaterialBrand').then((res : any) => {
 						if (res.code === 200) {
 						if (res.code === 200) {
+							loading.close();
 							this.$message.success('编辑成功');
 							this.$message.success('编辑成功');
 							this.getDataList();
 							this.getDataList();
-							loading.close();
 						} else this.$message.error(res.msg);
 						} else this.$message.error(res.msg);
 					})
 					})
 				}
 				}
@@ -258,7 +256,7 @@
 					(this.$refs.moduleView as any).setPage(page);
 					(this.$refs.moduleView as any).setPage(page);
 					loading.close();
 					loading.close();
 				} else {
 				} else {
-					loading.close();
+					loading.close();0
 					this.$message.error(res.msg);
 					this.$message.error(res.msg);
 				}
 				}
 			})
 			})
@@ -267,7 +265,6 @@
 		clickHandle(e : any) {
 		clickHandle(e : any) {
 			if (e === 'onAdd') this.onAdd();
 			if (e === 'onAdd') this.onAdd();
 			if (e === 'onDelete') this.onDelete();
 			if (e === 'onDelete') this.onDelete();
-			if (e === 'onExport') this.onExport();
 		}
 		}
 		// 打开新增
 		// 打开新增
 		onAdd() {
 		onAdd() {
@@ -281,12 +278,18 @@
 		// 打开编辑
 		// 打开编辑
 		openEdit(e : any) {
 		openEdit(e : any) {
 			this.popTitle = '编辑';
 			this.popTitle = '编辑';
-			this.dialogFormVisible = true;
-			this.radio = e.status;
-			this.$nextTick(() => {
-				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);
+			let loading = this.$loading({ target: '.main-container' });
+			api.single({ id: e.id }, 'maindataMaterialBrand').then((res : any) => {
+				if (res.code === 200) {
+					let data = res.data;
+					this.dialogFormVisible = true;
+					this.radio = data.status;
+					loading.close();
+					this.$nextTick(() => {
+						if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(data);
+					})
+				}
 			})
 			})
-
 		}
 		}
 		// 工具栏删除
 		// 工具栏删除
 		onDelete() {
 		onDelete() {
@@ -333,14 +336,6 @@
 			(this as any).$refs.moduleView.clearSearch();
 			(this as any).$refs.moduleView.clearSearch();
 			this.getDataList();
 			this.getDataList();
 		}
 		}
-		//导出
-		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`)
-		}
 	}
 	}
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>

+ 2 - 1
src/views/audit/outbound/index.vue

@@ -80,7 +80,8 @@
 							size: 'mini',
 							size: 'mini',
 							seq: true,
 							seq: true,
 							align: 'left',
 							align: 'left',
-							radio: true
+							radio: true,
+							triggerRowCheck: 'row'
 						},
 						},
 						columns: [
 						columns: [
 							{
 							{

+ 18 - 75
src/views/audit/productClassification/index.vue

@@ -32,11 +32,8 @@
 	import Assembly from "@/components/Assembly/material.vue";
 	import Assembly from "@/components/Assembly/material.vue";
 	@Component
 	@Component
 	export default class ProductClassification extends Vue {
 	export default class ProductClassification extends Vue {
-		loading : any = null
 		// 左边
 		// 左边
-		data : any = []
 		expandedKeys : any = []
 		expandedKeys : any = []
-		parentId : any = ''
 		parentIds : any = ''
 		parentIds : any = ''
 		// 右边
 		// 右边
 		baseURL : any = process.env.VUE_APP_BASE_API
 		baseURL : any = process.env.VUE_APP_BASE_API
@@ -124,7 +121,6 @@
 			table: {
 			table: {
 				attr: {
 				attr: {
 					size: 'mini',
 					size: 'mini',
-					// seq: true,
 					align: 'left',
 					align: 'left',
 					checkbox: false,
 					checkbox: false,
 					height: 600,
 					height: 600,
@@ -162,7 +158,7 @@
 					}, {
 					}, {
 						name: '删除',
 						name: '删除',
 						event: {
 						event: {
-							click: (item : any) => (this as any).doDelete2(item)
+							click: (item : any) => (this as any).doDelete(item)
 						}
 						}
 					}]
 					}]
 				}]
 				}]
@@ -236,7 +232,7 @@
 							attr: {
 							attr: {
 								size: 'mini',
 								size: 'mini',
 								placeholder: '请输入备注',
 								placeholder: '请输入备注',
-								type:'textarea'
+								type: 'textarea'
 							},
 							},
 						}
 						}
 					},
 					},
@@ -257,7 +253,7 @@
 			} else {
 			} else {
 				data.parentId = e.id;
 				data.parentId = e.id;
 			};
 			};
-			this.parentId = e.id;
+			this.parentIds = e.id;
 			api.childrenTreeList(data, 'maindataMaterialCategory').then((res : any) => {
 			api.childrenTreeList(data, 'maindataMaterialCategory').then((res : any) => {
 				if (res.code === 200) {
 				if (res.code === 200) {
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
@@ -307,7 +303,7 @@
 			}
 			}
 			clearInterval(this.timer)
 			clearInterval(this.timer)
 			let query = (this.$refs.moduleView as any).getQuery();
 			let query = (this.$refs.moduleView as any).getQuery();
-			if (this.parentId) query.parentId = this.parentId;
+			if (this.parentIds) query.parentIds = this.parentIds;
 			let newData : any = {}
 			let newData : any = {}
 			for (let key in query) {
 			for (let key in query) {
 				if (query[key].toString()) {
 				if (query[key].toString()) {
@@ -318,6 +314,7 @@
 			this.getPageList(newData)
 			this.getPageList(newData)
 		}
 		}
 		getPageList(query : any) {
 		getPageList(query : any) {
+			let loading = this.$loading({ target: '.main-container' });
 			api.pageList(query, 'maindataMaterialCategory').then((res : any) => {
 			api.pageList(query, 'maindataMaterialCategory').then((res : any) => {
 				if (res.code === 200) {
 				if (res.code === 200) {
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
@@ -326,24 +323,23 @@
 						pageSize: res.data.size, //每页条数
 						pageSize: res.data.size, //每页条数
 						total: res.data.total //总条数
 						total: res.data.total //总条数
 					};
 					};
-					(this.$refs.moduleView as any).setPage(page)
+					(this.$refs.moduleView as any).setPage(page);
+					loading.close();
 				} else this.$message.error(res.msg);
 				} else this.$message.error(res.msg);
 			})
 			})
 		}
 		}
 		// 工具栏方法
 		// 工具栏方法
 		clickHandle(e : any) {
 		clickHandle(e : any) {
 			if (e === 'onAdd') this.onAdd();
 			if (e === 'onAdd') this.onAdd();
-			if (e === 'onDelete') this.onDelete();
-			if (e === 'onExport') this.onExport();
 		}
 		}
 		// 打开新增
 		// 打开新增
 		onAdd() {
 		onAdd() {
 			this.popTitle = '新增'
 			this.popTitle = '新增'
 			this.dialogFormVisible = true;
 			this.dialogFormVisible = true;
 			this.radio = 0
 			this.radio = 0
-			setTimeout(() => {
-				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
-			}, 0)
+			this.$nextTick(() => {
+				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue();
+			});
 		}
 		}
 		// 打开编辑
 		// 打开编辑
 		openEdit(e : any) {
 		openEdit(e : any) {
@@ -354,88 +350,35 @@
 			api.single({ id: e.parentId }, 'maindataMaterialCategory').then((res : any) => {
 			api.single({ id: e.parentId }, 'maindataMaterialCategory').then((res : any) => {
 				if (res.code === 200) {
 				if (res.code === 200) {
 					e.parentName = res.data.name
 					e.parentName = res.data.name
-					setTimeout(() => {
+					this.$nextTick(() => {
 						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)
+					});
 				}
 				}
 			})
 			})
 		}
 		}
-		// 工具栏删除
-		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);
+		// 操作删除
+		doDelete(item : any) {
 			this.$confirm('确定删除吗,此操作不能撤销!', '注意', {
 			this.$confirm('确定删除吗,此操作不能撤销!', '注意', {
 				confirmButtonText: '确定',
 				confirmButtonText: '确定',
 				cancelButtonText: '取消',
 				cancelButtonText: '取消',
 				type: 'warning',
 				type: 'warning',
 				center: true
 				center: true
 			}).then(() => {
 			}).then(() => {
-				api.deleteList({ ids: ids }, 'maindataMaterialCategory').then((res : any) => {
+				api.delCategoryId({ id: item.id }, 'maindataMaterialCategory').then((res : any) => {
 					if (res.code === 200) {
 					if (res.code === 200) {
 						(this as any).$refs.sideTree.request();
 						(this as any).$refs.sideTree.request();
 						this.getDataList();
 						this.getDataList();
 						this.$message.success('删除成功');
 						this.$message.success('删除成功');
 					} else this.$message.error(res.msg);
 					} else this.$message.error(res.msg);
 				})
 				})
-			}).catch(() => {
-				this.$message({
-					type: 'info',
-					message: '已取消删除'
-				});
-			});
-		}
-		// 操作删除
-		doDelete2(item : any) {
-			this.$confirm('确定删除吗,此操作不能撤销!', '注意', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning',
-				center: true
-			}).then(() => {
-				api.childrenTreeList({ id: item.id }, 'maindataMaterialCategory').then((v : any) => {
-					if (v.code === 200) {
-						if (v.data.length > 0) return this.$message({ type: 'error', message: '此数据有子节点,不能进行删除!' })
-						api.deleteList({ ids: item.id }, 'maindataMaterialCategory').then((res : any) => {
-							if (res.code === 200) {
-								(this as any).$refs.sideTree.request();
-								this.getDataList();
-								this.$message({
-									type: 'success',
-									message: '删除成功!'
-								});
-							} else this.$message.error(res.msg);
-						})
-					} else this.$message({ type: 'error', message: '删除失败!请稍后再试' })
-				})
-			}).catch(() => {
-				this.$message({
-					type: 'info',
-					message: '已取消删除'
-				});
-			});
+			}).catch(() => this.$message.info('已取消删除'));
 		}
 		}
 		// 刷新/重置
 		// 刷新/重置
 		onRefresh() {
 		onRefresh() {
-			let loading = this.$loading({ target: '.main-container' });
 			(this as any).$refs.moduleView.clearSearch();
 			(this as any).$refs.moduleView.clearSearch();
-			this.parentId = '';
 			(this as any).$refs.sideTree.request();
 			(this as any).$refs.sideTree.request();
-			this.getPageList({});
-			loading.close();
-		}
-		//导出
-		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`)
+			this.parentIds = '';
+			this.getDataList();
 		}
 		}
 	}
 	}
 </script>
 </script>

+ 41 - 58
src/views/audit/productManagement/index.vue

@@ -9,7 +9,7 @@
 			</div>
 			</div>
 			<div class="bill-main" v-show="isShow==='home'" key="item2">
 			<div class="bill-main" v-show="isShow==='home'" key="item2">
 				<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
 				<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
-					@resert="getDataList" @clickHandle="clickHandle" @detail="getDetail" @onRefresh="onRefresh" />
+					@resert="onRefresh" @clickHandle="clickHandle" @detail="getDetail" @onRefresh="onRefresh" />
 			</div>
 			</div>
 			<!-- 新增/编辑 -->
 			<!-- 新增/编辑 -->
 			<div class="detil" v-show="isShow==='add'" key="item3">
 			<div class="detil" v-show="isShow==='add'" key="item3">
@@ -29,17 +29,17 @@
 							<el-button class="button-new-tag" @click="getTagsValue">添加</el-button>
 							<el-button class="button-new-tag" @click="getTagsValue">添加</el-button>
 						</template>
 						</template>
 						<template v-slot:status>
 						<template v-slot:status>
-							<el-radio v-model="radioStatus" :label="1">启用</el-radio>
-							<el-radio v-model="radioStatus" :label="2">备用</el-radio>
-							<el-radio v-model="radioStatus" :label="3">禁用</el-radio>
+							<el-radio v-model="status" :label="0">启用</el-radio>
+							<el-radio v-model="status" :label="1">备用</el-radio>
+							<el-radio v-model="status" :label="2">禁用</el-radio>
 						</template>
 						</template>
 						<template v-slot:ismakeup>
 						<template v-slot:ismakeup>
-							<el-radio v-model="ismakeup" :label="1">是</el-radio>
-							<el-radio v-model="ismakeup" :label="2">否</el-radio>
+							<el-radio v-model="ismakeup" :label="0">是</el-radio>
+							<el-radio v-model="ismakeup" :label="1">否</el-radio>
 						</template>
 						</template>
 						<template v-slot:issued>
 						<template v-slot:issued>
-							<el-radio v-model="issued" :label="1">是</el-radio>
-							<el-radio v-model="issued" :label="2">否</el-radio>
+							<el-radio v-model="issued" :label="0">是</el-radio>
+							<el-radio v-model="issued" :label="1">否</el-radio>
 						</template>
 						</template>
 						<template v-slot:materialSpec>
 						<template v-slot:materialSpec>
 							<el-radio v-model="materialSpec" :label="0" @input="changeSingle">单规格</el-radio>
 							<el-radio v-model="materialSpec" :label="0" @input="changeSingle">单规格</el-radio>
@@ -127,11 +127,11 @@
 		data : any = []
 		data : any = []
 		expandedKeys : any = []
 		expandedKeys : any = []
 		materialSpec : any = 0
 		materialSpec : any = 0
-		radioStatus : any = 1
-		ismakeup : any = 1
-		issued : any = 1
+		status : any = 0
+		ismakeup : any = 0
+		issued : any = 0
 		textarea : any = ''
 		textarea : any = ''
-		categoryId : any = ''
+		categoryIds : any = ''
 		selectList = []
 		selectList = []
 		selectValue = ''
 		selectValue = ''
 		// tab
 		// tab
@@ -799,7 +799,6 @@
 			table: {
 			table: {
 				attr: {
 				attr: {
 					size: 'mini',
 					size: 'mini',
-					// seq: true,
 					align: 'left',
 					align: 'left',
 					checkbox: true,
 					checkbox: true,
 					height: 560,
 					height: 560,
@@ -810,25 +809,27 @@
 					field: 'name',
 					field: 'name',
 					isDetail: true,
 					isDetail: true,
 				}, {
 				}, {
+					width: 200,
 					title: '简称',
 					title: '简称',
 					field: 'shortName'
 					field: 'shortName'
 				}, {
 				}, {
+					width: 200,
 					title: '货号',
 					title: '货号',
 					field: 'itemNumber'
 					field: 'itemNumber'
 				}, {
 				}, {
-					// width: 120,
+					width: 200,
 					title: '财务编号',
 					title: '财务编号',
 					field: 'accountingCode'
 					field: 'accountingCode'
 				}, {
 				}, {
-					// width: 120,
+					width: 200,
 					title: '国际码',
 					title: '国际码',
 					field: 'nsCode'
 					field: 'nsCode'
 				}, {
 				}, {
-					width: 80,
+					width: 90,
 					title: '基本售价',
 					title: '基本售价',
 					field: 'basePrice'
 					field: 'basePrice'
 				}, {
 				}, {
-					width: 80,
+					width: 90,
 					title: '市场价格', // (市场价格统一售价)
 					title: '市场价格', // (市场价格统一售价)
 					field: 'markPrice'
 					field: 'markPrice'
 				},
 				},
@@ -862,8 +863,8 @@
 		}
 		}
 		//点击树获取数据
 		//点击树获取数据
 		onChangeTree(e : any) {
 		onChangeTree(e : any) {
-			this.categoryId = e.id;
-			api.byCategoryPage({ categoryId: e.id },'maindataMaterialCategory').then((res : any) => {
+			this.categoryIds = e.id;
+			api.byCategoryPage({ categoryId: e.id }, 'maindataMaterialCategory').then((res : any) => {
 				if (res.code === 200) {
 				if (res.code === 200) {
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
 					let page = {
 					let page = {
@@ -883,7 +884,7 @@
 				query.materialSpec = this.materialSpec; // 商品规格
 				query.materialSpec = this.materialSpec; // 商品规格
 				query.attributeList = JSON.stringify(this.attributeList) // 物料属性
 				query.attributeList = JSON.stringify(this.attributeList) // 物料属性
 				query.attributeId = this.attributeId // 物料属性ID
 				query.attributeId = this.attributeId // 物料属性ID
-				query.status = this.radioStatus; // 物料状态
+				query.status = this.status; // 物料状态
 				query.tags = this.tagsData.join(","); // 标签
 				query.tags = this.tagsData.join(","); // 标签
 				// query.ismakeup = this.ismakeup; // 商品组合
 				// query.ismakeup = this.ismakeup; // 商品组合
 				query.issued = this.issued; // 是否公布
 				query.issued = this.issued; // 是否公布
@@ -999,8 +1000,9 @@
 		// 编辑
 		// 编辑
 		getDetail(e : any) {
 		getDetail(e : any) {
 			console.log('编辑 ==> ', e);
 			console.log('编辑 ==> ', e);
-			(this as any).$refs.byTool.setTool({ return: true, save: true, delete: true })
+			(this as any).$refs.byTool.setTool({ return: true, save: true, delete: true });
 			this.loading = this.$loading({ target: '.my-container' });
 			this.loading = this.$loading({ target: '.my-container' });
+			// api.single({id:e.id},'maindataMaterial').then((res:any) => {})
 			api.single({ id: e.vmCategoryId }, 'maindataMaterialVmcategory').then((res : any) => {
 			api.single({ id: e.vmCategoryId }, 'maindataMaterialVmcategory').then((res : any) => {
 				if (res.code === 200) {
 				if (res.code === 200) {
 					if (res.data) e.vmCategoryName = res.data.name;
 					if (res.data) e.vmCategoryName = res.data.name;
@@ -1033,6 +1035,9 @@
 				if (e.attributeList) this.attributeList = JSON.parse(e.attributeList);
 				if (e.attributeList) this.attributeList = JSON.parse(e.attributeList);
 				other.selectByMaterialId({ id: e.id }, 'maindataMaterialSku').then((res : any) => {
 				other.selectByMaterialId({ id: e.id }, 'maindataMaterialSku').then((res : any) => {
 					if (res.code === 200) {
 					if (res.code === 200) {
+						this.status = e.status
+						this.ismakeup = e.ismakeup
+						this.issued = e.issued
 						if (this.isSingle) {
 						if (this.isSingle) {
 							this.selectValue = '' // 物料属性名称
 							this.selectValue = '' // 物料属性名称
 							this.towTable = '' // 表格数据
 							this.towTable = '' // 表格数据
@@ -1175,7 +1180,7 @@
 						}, 0)
 						}, 0)
 					}
 					}
 				})
 				})
-			}).catch(() => {});
+			}).catch(() => { });
 		}
 		}
 		// 切换商品规格
 		// 切换商品规格
 		changeSingle() {
 		changeSingle() {
@@ -1321,7 +1326,7 @@
 				type: 'warning',
 				type: 'warning',
 				center: true
 				center: true
 			}).then(() => {
 			}).then(() => {
-				this.attributeList.splice(index, 1)
+				this.attributeList.splice(index, 1);
 				this.generateNow();
 				this.generateNow();
 				this.$message.success('删除成功!');
 				this.$message.success('删除成功!');
 			}).catch(() => this.$message.info('已取消删除'));
 			}).catch(() => this.$message.info('已取消删除'));
@@ -1336,9 +1341,7 @@
 			}).then(() => {
 			}).then(() => {
 				console.log(this.tableList);
 				console.log(this.tableList);
 				(this as any).tableList.map((v : any) => {
 				(this as any).tableList.map((v : any) => {
-					if (v.dataIndex === item.dataIndex) {
-						v.isDeleted = 1
-					}
+					if (v.dataIndex === item.dataIndex) v.isDeleted = 1;
 				})
 				})
 				let filterList = this.tableList.filter((v : any) => v.isDeleted !== 1);
 				let filterList = this.tableList.filter((v : any) => v.isDeleted !== 1);
 				(this as any).$refs.table.setValue(filterList); // 设置表格数据
 				(this as any).$refs.table.setValue(filterList); // 设置表格数据
@@ -1364,15 +1367,13 @@
 			}
 			}
 			clearInterval(this.timer)
 			clearInterval(this.timer)
 			let query = (this.$refs.moduleView as any).getQuery();
 			let query = (this.$refs.moduleView as any).getQuery();
-			query.categoryId = this.categoryId;
-			let newData : any = {}
-			for (let key in query) {
-				if (query[key].toString()) {
-					newData[key] = query[key]
-				}
-			}
-			// console.log('表单字段 ==> ', newData);
-			api.pageList(newData, 'maindataMaterial').then((res : any) => {
+			if (this.categoryIds) query.categoryIds = this.categoryIds;
+			console.log('表单字段 ==> ', query);
+			this.getPageList(query)
+		}
+		getPageList(query : any) {
+			let loading = this.$loading({ target: '.main-container' });
+			api.pageList(query, 'maindataMaterial').then((res : any) => {
 				if (res.code === 200) {
 				if (res.code === 200) {
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
 					let page = {
 					let page = {
@@ -1380,7 +1381,8 @@
 						pageSize: res.data.size, //每页条数
 						pageSize: res.data.size, //每页条数
 						total: res.data.total //总条数
 						total: res.data.total //总条数
 					};
 					};
-					(this.$refs.moduleView as any).setPage(page)
+					(this.$refs.moduleView as any).setPage(page);
+					loading.close();
 				} else this.$message.error(res.msg);
 				} else this.$message.error(res.msg);
 			})
 			})
 		}
 		}
@@ -1388,7 +1390,6 @@
 		clickHandle(e : any) {
 		clickHandle(e : any) {
 			if (e === 'onAdd') this.onAdd();
 			if (e === 'onAdd') this.onAdd();
 			if (e === 'onDelete') this.doDelete();
 			if (e === 'onDelete') this.doDelete();
-			if (e === 'onExport') this.onExport();
 		}
 		}
 		// 内页工具栏方法
 		// 内页工具栏方法
 		insideTools(e : any) {
 		insideTools(e : any) {
@@ -1459,28 +1460,10 @@
 		}
 		}
 		// 刷新
 		// 刷新
 		onRefresh() {
 		onRefresh() {
-			this.loading = this.$loading({ target: '.main-container' });
 			(this as any).$refs.moduleView.clearSearch();
 			(this as any).$refs.moduleView.clearSearch();
-			api.pageList({}, 'maindataMaterialSku').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.loading.close();
-				} else this.$message.error(res.msg);
-			})
-		}
-		//导出
-		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`)
+			(this as any).$refs.sideTree.request();
+			this.categoryIds = '';
+			this.getDataList();
 		}
 		}
 	}
 	}
 </script>
 </script>

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

@@ -111,6 +111,8 @@
 					search: {
 					search: {
 						attr: {
 						attr: {
 							size: 'mini',
 							size: 'mini',
+							align: 'left',
+							triggerRowCheck: 'row'
 						},
 						},
 						columns: [
 						columns: [
 							[
 							[

+ 13 - 19
src/views/audit/virtually/index.vue

@@ -35,7 +35,7 @@
 		// 左边
 		// 左边
 		data : any = []
 		data : any = []
 		expandedKeys : any = []
 		expandedKeys : any = []
-		parentId : any = ''
+		parentIds : any = ''
 		// 右边
 		// 右边
 		baseURL : any = process.env.VUE_APP_BASE_API
 		baseURL : any = process.env.VUE_APP_BASE_API
 		timeNum = 0;
 		timeNum = 0;
@@ -122,7 +122,6 @@
 			table: {
 			table: {
 				attr: {
 				attr: {
 					size: 'mini',
 					size: 'mini',
-					// seq: true,
 					align: 'left',
 					align: 'left',
 					checkbox: false,
 					checkbox: false,
 					height: 600
 					height: 600
@@ -256,7 +255,7 @@
 			} else {
 			} else {
 				data.parentId = e.id;
 				data.parentId = e.id;
 			};
 			};
-			this.parentId = e.id;
+			this.parentIds = e.id;
 			api.childrenTreeList(data, 'maindataMaterialVmcategory').then((res : any) => {
 			api.childrenTreeList(data, 'maindataMaterialVmcategory').then((res : any) => {
 				if (res.code === 200) {
 				if (res.code === 200) {
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
@@ -306,7 +305,7 @@
 			}
 			}
 			clearInterval(this.timer)
 			clearInterval(this.timer)
 			let query = (this.$refs.moduleView as any).getQuery();
 			let query = (this.$refs.moduleView as any).getQuery();
-			if (this.parentId) query.parentId = this.parentId;
+			if (this.parentIds) query.parentIds = this.parentIds;
 			let newData : any = {}
 			let newData : any = {}
 			for (let key in query) {
 			for (let key in query) {
 				if (query[key].toString()) {
 				if (query[key].toString()) {
@@ -340,9 +339,9 @@
 			this.popTitle = '新增'
 			this.popTitle = '新增'
 			this.dialogFormVisible = true;
 			this.dialogFormVisible = true;
 			this.radio = 0
 			this.radio = 0
-			setTimeout(() => {
-				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
-			}, 0)
+			this.$nextTick(() => {
+				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue();
+			});
 		}
 		}
 		// 打开编辑
 		// 打开编辑
 		openEdit(e : any) {
 		openEdit(e : any) {
@@ -392,17 +391,12 @@
 				type: 'warning',
 				type: 'warning',
 				center: true
 				center: true
 			}).then(() => {
 			}).then(() => {
-				api.childrenTreeList({ id: item.id }, 'maindataMaterialVmcategory').then((v : any) => {
-					if (v.code === 200) {
-						if (v.data.length > 0) return this.$message.error('此数据有子节点,不能进行删除!')
-						api.deleteList({ ids: item.id }, 'maindataMaterialVmcategory').then((res : any) => {
-							if (res.code === 200) {
-								(this as any).$refs.sideTree.request();
-								this.getDataList();
-								this.$message.success('删除成功!');
-							} else this.$message.error(res.msg);;
-						})
-					} else this.$message.error('删除失败!请稍后再试');
+				api.delCategoryId({ id: item.id }, 'maindataMaterialVmcategory').then((res : any) => {
+					if (res.code === 200) {
+						(this as any).$refs.sideTree.request();
+						this.getDataList();
+						this.$message.success('删除成功');
+					} else this.$message.error(res.msg);
 				})
 				})
 			}).catch(() => this.$message.info('已取消删除'));
 			}).catch(() => this.$message.info('已取消删除'));
 		}
 		}
@@ -410,7 +404,7 @@
 		onRefresh() {
 		onRefresh() {
 			let loading = this.$loading({ target: '.main-container' });
 			let loading = this.$loading({ target: '.main-container' });
 			(this as any).$refs.moduleView.clearSearch();
 			(this as any).$refs.moduleView.clearSearch();
-			this.parentId = '';
+			this.parentIds = '';
 			(this as any).$refs.sideTree.request();
 			(this as any).$refs.sideTree.request();
 			this.getPageList({});
 			this.getPageList({});
 			loading.close();
 			loading.close();