浏览代码

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

ymy 1 年之前
父节点
当前提交
e86c59d263

+ 0 - 168
src/components/ForTab/index.vue

@@ -11,7 +11,6 @@
 		</div>
 		<div style="margin: 20px 0;" v-if="!isAdd" key="aaa">
 			<div class="el-button mr15 el-button--primary el-button--small" @click="isAdd=true">添加新规格</div>
-			<div @click="generateNow" class="el-button el-button--success el-button--small">立即生成</div>
 		</div>
 		<div style="display: flex;margin: 20px 0;" v-else key='item2'>
 			<div class="flex-item">
@@ -29,7 +28,6 @@
 			<div @click="doComfirm" class="el-button el-button--primary el-button--small">确定</div>
 			<div @click="isAdd=false" class="el-button el-button--danger el-button--small">取消</div>
 		</div>
-		<div v-if="isTable"><by-table :propConfig="tableConfig" ref="table"></by-table></div>
 	</div>
 </template>
 
@@ -44,150 +42,6 @@
 		isAdd : any = false
 		isTable : any = false
 		tableData : any = ''
-		tableConfig : any = {
-			attr: {
-				size: 'mini',
-				height: 486,
-				align: 'center',
-			},
-			columns: [
-				{
-					// width:'100px',
-					title: '标题',
-					field: 'skuTitle',
-					component: 'by-input',
-					compConfig:{
-						attr:{
-							size:'mini',
-							placeholder:' '
-						},
-					}
-				},
-				{
-					// width:'100px',
-					title: '副标题',
-					field: 'skuSubtitle',
-					component: 'by-input',
-					compConfig:{
-						attr:{
-							size:'mini',
-							placeholder:' '
-						},
-					}
-				},
-				{
-					width:'100px',
-					title: '价格',
-					field: 'price',
-					component: 'by-input',
-					compConfig:{
-						attr:{
-							size:'mini',
-							placeholder:' '
-						},
-					}
-				},
-				{
-					width:'100px',
-					title: '库存',
-					field: 'stock',
-					component: 'by-input',
-					compConfig:{
-						attr:{
-							size:'mini',
-							placeholder:' '
-						},
-					}
-				},
-				{
-					width:'100px',
-					title: '保质期(天)',
-					field: 'shelfLife',
-					component: 'by-input',
-					compConfig:{
-						attr:{
-							size:'mini',
-							placeholder:' '
-						},
-					}
-				},
-				{
-					width:'100px',
-					title: '重量',
-					field: 'weight',
-					component: 'by-input',
-					compConfig:{
-						attr:{
-							size:'mini',
-							placeholder:' '
-						},
-					}
-				},
-				{
-					width:'100px',
-					title: '长',
-					field: 'length',
-					component: 'by-input',
-					compConfig:{
-						attr:{
-							size:'mini',
-							placeholder:' '
-						},
-					}
-				},
-				{
-					width:'100px',
-					title: '宽',
-					field: 'width',
-					component: 'by-input',
-					compConfig:{
-						attr:{
-							size:'mini',
-							placeholder:' '
-						},
-					}
-				},
-				{
-					width:'100px',
-					title: '高',
-					field: 'height',
-					component: 'by-input',
-					compConfig:{
-						attr:{
-							size:'mini',
-							placeholder:' '
-						},
-					}
-				},
-				{
-					width:'100px',
-					title: '体积',
-					field: 'volume',
-					component: 'by-input',
-					compConfig:{
-						attr:{
-							size:'mini',
-							placeholder:' '
-						},
-					}
-				},
-				{
-					width: '80px',
-					title: '操作',
-					action: true,
-					plugins: [{
-						icon: 'el-icon-delete',
-						name: '删除',
-						audit: '',
-						event: {
-							click: (item : any) => {
-								(this as any).doDelete(item)
-							}
-						}
-					}]
-				}
-			]
-		}
 		
 		get columns(){
 		  return this.config?.columns ? this.config.columns : [];
@@ -207,28 +61,6 @@
 			}
 			(this as any).$refs['getValue_' + index][0].clearValue();
 		}
-		// 立即生成
-		generateNow() {
-			this.isTable = true;
-			this.forFun(this.columns[0], 0);
-			let data = (this as any).$lodash.cloneDeep(this.tableConfig);
-			let newColumns = (this as any).$lodash.cloneDeep(this.columns).reverse();
-			// console.log(newColumns);
-			this.tableData.map((v : any, i : any) => {
-				v.dataIndex = i
-			})
-			newColumns.map((v : any) => {
-				data.columns.unshift({
-					width:'100px',
-					title: v.title,
-					field: v.field
-				})
-			});
-			setTimeout(() => {
-				(this as any).$refs.table.setValue(this.tableData); // 设置表格数据
-				(this as any).$refs.table.setTableConfig(data); // 设置表格配置
-			}, 0)
-		}
 		// 添加新规格
 		doComfirm() {
 			if (!this.normsValue || !this.norms) return (this as any).$message({ type: "warning", message: '请添加完整的规格!' })

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

@@ -14,7 +14,7 @@
 				</template>
 				<template v-slot:attributeValue>
 					<div style="margin-bottom: 20px;" v-if="tableConfig.length>0">
-						<div v-for="(item,index) of tableConfig" :key="index" style="position: relative;">
+						<div v-for="(item,index) of tableConfig" :key="index">
 							<div>{{item.title}} <i class="el-icon-circle-close" @click="closeGroup(index)"></i>
 							</div>
 							<div class="clearfix">

+ 19 - 20
src/views/audit/distributor/index.vue

@@ -262,11 +262,11 @@
 								clearable: true,
 								data: [
 									{
-										value: '金蝶K3',
+										value: 'kingdee',
 										label: '金蝶K3'
 									},
 									// {
-									// 	value: '用友U8',
+									// 	value: 'yonbip',
 									// 	label: '用友U8'
 									// },
 								]
@@ -339,8 +339,8 @@
 					};
 					(this.$refs.moduleView as any).setPage(page);
 					loading.close();
-				}
-			})
+				} else loading.close();
+			}).catch(() => loading.close());
 		}
 		// 内页工具栏方法
 		insideTools(e : any) {
@@ -365,26 +365,26 @@
 				let loading = this.$loading({ target: '.main-container' });
 				if (this.popTitle === '新增') {
 					api.saveList(query, 'maindataMaterialDistributor').then((res : any) => {
+						loading.close();
 						if (res.code === 200) {
-							loading.close();
 							this.$message.success('保存成功');
 							(this as any).$refs.sideTree.request();
 							this.isShow = 'home'; // 展示类型
 							this.getDataList();
 						} else this.$message.error(res.msg);
-					})
+					}).catch(() => loading.close());
 				} else if (this.popTitle === '编辑') {
 					api.updateList(query, 'maindataMaterialDistributor').then((res : any) => {
+						loading.close();
 						if (res.code === 200) {
-							loading.close();
 							this.$message.success('编辑成功');
 							(this as any).$refs.sideTree.request();
 							this.isShow = 'home'; // 展示类型
 							this.getDataList();
 						} else this.$message.error(res.msg);
-					})
+					}).catch(() => loading.close());
 				}
-				
+
 			})
 		}
 		// 获取列表数据
@@ -405,6 +405,7 @@
 		getPageList(query : any) {
 			let loading = this.$loading({ target: '.main-container' });
 			api.pageList(query, 'maindataMaterialDistributor').then((res : any) => {
+				loading.close();
 				if (res.code === 200) {
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
 					let page = {
@@ -413,9 +414,8 @@
 						total: res.data.total //总条数
 					};
 					(this.$refs.moduleView as any).setPage(page);
-					loading.close();
 				} else this.$message.error(res.msg);
-			})
+			}).catch(() => loading.close());
 		}
 		// 工具栏方法
 		clickHandle(e : any) {
@@ -427,9 +427,7 @@
 			this.popTitle = '新增'
 			this.dialogFormVisible = true;
 			this.radio = 0
-			this.$nextTick(() => {
-				(this as any).$refs.addFormId.setValue();
-			});
+			this.$nextTick(() => (this as any).$refs.addFormId.setValue());
 		}
 		// 打开编辑
 		openEdit(e : any) {
@@ -438,16 +436,14 @@
 			this.popTitle = '编辑'
 			let loading = this.$loading({ target: '.main-container' });
 			api.single({ id: e.id }, 'maindataMaterialDistributor').then((res : any) => {
+				loading.close();
 				if (res.code === 200) {
 					let data = res.data;
 					this.radio = data.status;
-					loading.close();
 					this.dialogFormVisible = true;
-					this.$nextTick(() => {
-						(this as any).$refs.addFormId.setValue(data);
-					});
+					this.$nextTick(() => (this as any).$refs.addFormId.setValue(data));
 				}
-			})
+			}).catch(() => loading.close());
 		}
 		// 操作删除
 		doDelete(item : any) {
@@ -457,13 +453,15 @@
 				type: 'warning',
 				center: true
 			}).then(() => {
+				let loading = this.$loading({ target: '.main-container' });
 				api.deleteList({ ids: item.id }, 'maindataMaterialDistributor').then((res : any) => {
+					loading.close();
 					if (res.code === 200) {
 						(this as any).$refs.sideTree.request();
 						this.getDataList();
 						this.$message.success('删除成功');
 					} else this.$message.error(res.msg);
-				})
+				}).catch(() => loading.close());
 			}).catch(() => this.$message.info('已取消删除'));
 		}
 		// 刷新/重置
@@ -481,6 +479,7 @@
 		box-sizing: border-box;
 		display: flex;
 		padding: 16px;
+
 		.search-btn {
 			width: 100%;
 			display: flex;

+ 19 - 21
src/views/audit/manufacturer/index.vue

@@ -262,11 +262,11 @@
 								clearable: true,
 								data: [
 									{
-										value: '金蝶K3',
+										value: 'kingdee',
 										label: '金蝶K3'
 									},
 									// {
-									// 	value: '用友U8',
+									// 	value: 'yonbip',
 									// 	label: '用友U8'
 									// },
 								]
@@ -304,7 +304,6 @@
 						component: 'by-input',
 					},
 					{
-						labelWidth: '90px',
 						span: 6,
 						label: 'URL地址',
 						slot: true,
@@ -340,8 +339,8 @@
 					};
 					(this.$refs.moduleView as any).setPage(page);
 					loading.close();
-				}
-			})
+				} else loading.close();
+			}).catch(() => loading.close());
 		}
 		// 内页工具栏方法
 		insideTools(e : any) {
@@ -366,26 +365,26 @@
 				let loading = this.$loading({ target: '.main-container' });
 				if (this.popTitle === '新增') {
 					api.saveList(query, 'maindataMaterialManufacturer').then((res : any) => {
+						loading.close();
 						if (res.code === 200) {
-							loading.close();
 							this.$message.success('保存成功');
 							(this as any).$refs.sideTree.request();
 							this.isShow = 'home'; // 展示类型
 							this.getDataList();
 						} else this.$message.error(res.msg);
-					})
+					}).catch(() => loading.close());
 				} else if (this.popTitle === '编辑') {
 					api.updateList(query, 'maindataMaterialManufacturer').then((res : any) => {
+						loading.close();
 						if (res.code === 200) {
-							loading.close();
 							this.$message.success('编辑成功');
 							(this as any).$refs.sideTree.request();
 							this.isShow = 'home'; // 展示类型
 							this.getDataList();
 						} else this.$message.error(res.msg);
-					})
+					}).catch(() => loading.close());
 				}
-				
+
 			})
 		}
 		// 获取列表数据
@@ -406,6 +405,7 @@
 		getPageList(query : any) {
 			let loading = this.$loading({ target: '.main-container' });
 			api.pageList(query, 'maindataMaterialManufacturer').then((res : any) => {
+				loading.close();
 				if (res.code === 200) {
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
 					let page = {
@@ -414,9 +414,8 @@
 						total: res.data.total //总条数
 					};
 					(this.$refs.moduleView as any).setPage(page);
-					loading.close();
 				} else this.$message.error(res.msg);
-			})
+			}).catch(() => loading.close());
 		}
 		// 工具栏方法
 		clickHandle(e : any) {
@@ -428,9 +427,7 @@
 			this.popTitle = '新增'
 			this.dialogFormVisible = true;
 			this.radio = 0
-			this.$nextTick(() => {
-				(this as any).$refs.addFormId.setValue();
-			});
+			this.$nextTick(() => (this as any).$refs.addFormId.setValue());
 		}
 		// 打开编辑
 		openEdit(e : any) {
@@ -439,16 +436,14 @@
 			this.popTitle = '编辑'
 			let loading = this.$loading({ target: '.main-container' });
 			api.single({ id: e.id }, 'maindataMaterialManufacturer').then((res : any) => {
+				loading.close();
 				if (res.code === 200) {
 					let data = res.data;
 					this.radio = data.status;
-					loading.close();
 					this.dialogFormVisible = true;
-					this.$nextTick(() => {
-						(this as any).$refs.addFormId.setValue(data);
-					});
+					this.$nextTick(() => (this as any).$refs.addFormId.setValue(data));
 				}
-			})
+			}).catch(() => loading.close());
 		}
 		// 操作删除
 		doDelete(item : any) {
@@ -458,13 +453,15 @@
 				type: 'warning',
 				center: true
 			}).then(() => {
+				let loading = this.$loading({ target: '.main-container' });
 				api.deleteList({ ids: item.id }, 'maindataMaterialManufacturer').then((res : any) => {
+					loading.close();
 					if (res.code === 200) {
 						(this as any).$refs.sideTree.request();
 						this.getDataList();
 						this.$message.success('删除成功');
 					} else this.$message.error(res.msg);
-				})
+				}).catch(() => loading.close());
 			}).catch(() => this.$message.info('已取消删除'));
 		}
 		// 刷新/重置
@@ -482,6 +479,7 @@
 		box-sizing: border-box;
 		display: flex;
 		padding: 16px;
+
 		.search-btn {
 			width: 100%;
 			display: flex;

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

@@ -984,7 +984,7 @@
 						loading.close();
 					};
 				}
-			})
+			}).catch(() => loading.close());
 		}
 		// 设置只读
 		setReadonly(e : any, isReturn : any) {

+ 7 - 7
src/views/audit/organClassify/index.vue

@@ -233,8 +233,8 @@
 					};
 					(this.$refs.moduleView as any).setPage(page);
 					loading.close();
-				}
-			})
+				} else loading.close();
+			}).catch(() => loading.close());
 		}
 		// 确认新增/编辑
 		confirm() {
@@ -279,6 +279,7 @@
 		getPageList(query : any) {
 			let loading = this.$loading({ target: '.main-container' });
 			api.pageList(query, 'maindataOrganizationCategory').then((res : any) => {
+				loading.close();
 				if (res.code === 200) {
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
 					let page = {
@@ -287,9 +288,8 @@
 						total: res.data.total //总条数
 					};
 					(this.$refs.moduleView as any).setPage(page);
-					loading.close();
 				} else this.$message.error(res.msg);
-			})
+			}).catch(() => loading.close());
 		}
 		// 工具栏方法
 		clickHandle(e : any) {
@@ -311,15 +311,15 @@
 					let data = res.data;
 					this.radio = res.data.status;
 					api.single({ id: res.data.parentId }, 'maindataOrganizationCategory').then((res : any) => {
+						loading.close();
 						if (res.code === 200) {
 							data.parentName = res.data.name;
-							loading.close();
 							this.dialogFormVisible = true;
 							this.$nextTick(() => (this as any).$refs.addFormId.setValue(data));
 						}
-					});
+					}).catch(() => loading.close());
 				}
-			});
+			}).catch(() => loading.close());
 		}
 		// 操作删除
 		doDelete(item : any) {

+ 20 - 14
src/views/audit/supplier/index.vue

@@ -155,7 +155,7 @@
 				{
 					width: 300,
 					title: '财务系统类型',
-					field: 'financeType',
+					field: 'financeType2',
 				},
 				{
 					width: 80,
@@ -262,11 +262,11 @@
 								clearable: true,
 								data: [
 									{
-										value: '金蝶K3',
+										value: 'kingdee',
 										label: '金蝶K3'
 									},
 									// {
-									// 	value: '用友U8',
+									// 	value: 'yonbip',
 									// 	label: '用友U8'
 									// },
 								]
@@ -339,8 +339,8 @@
 					};
 					(this.$refs.moduleView as any).setPage(page);
 					loading.close();
-				}
-			})
+				} else loading.close();
+			}).catch(() => loading.close());
 		}
 		// 内页工具栏方法
 		insideTools(e : any) {
@@ -365,24 +365,24 @@
 				let loading = this.$loading({ target: '.main-container' });
 				if (this.popTitle === '新增') {
 					api.saveList(query, 'maindataMaterialSupplier').then((res : any) => {
+						loading.close();
 						if (res.code === 200) {
-							loading.close();
 							this.$message.success('保存成功');
 							(this as any).$refs.sideTree.request();
 							this.isShow = 'home'; // 展示类型
 							this.getDataList();
 						} else this.$message.error(res.msg);
-					})
+					}).catch(() => loading.close());
 				} else if (this.popTitle === '编辑') {
 					api.updateList(query, 'maindataMaterialSupplier').then((res : any) => {
+						loading.close();
 						if (res.code === 200) {
-							loading.close();
 							this.$message.success('编辑成功');
 							(this as any).$refs.sideTree.request();
 							this.isShow = 'home'; // 展示类型
 							this.getDataList();
 						} else this.$message.error(res.msg);
-					})
+					}).catch(() => loading.close());
 				}
 
 			})
@@ -405,7 +405,12 @@
 		getPageList(query : any) {
 			let loading = this.$loading({ target: '.main-container' });
 			api.pageList(query, 'maindataMaterialSupplier').then((res : any) => {
+				loading.close();
 				if (res.code === 200) {
+					res.data.records.map((v : any) => {
+						if(v.financeType==='kingdee')v.financeType2 = '金蝶K3';
+						if(v.financeType==='yonbip')v.financeType2 = '用友U8';
+					});
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
 					let page = {
 						pageNo: res.data.current, //当前页
@@ -413,9 +418,8 @@
 						total: res.data.total //总条数
 					};
 					(this.$refs.moduleView as any).setPage(page);
-					loading.close();
 				} else this.$message.error(res.msg);
-			})
+			}).catch(() => loading.close());
 		}
 		// 工具栏方法
 		clickHandle(e : any) {
@@ -436,14 +440,14 @@
 			this.popTitle = '编辑'
 			let loading = this.$loading({ target: '.main-container' });
 			api.single({ id: e.id }, 'maindataMaterialSupplier').then((res : any) => {
+				loading.close();
 				if (res.code === 200) {
 					let data = res.data;
 					this.radio = data.status;
-					loading.close();
 					this.dialogFormVisible = true;
 					this.$nextTick(() => (this as any).$refs.addFormId.setValue(data));
 				}
-			})
+			}).catch(() => loading.close());
 		}
 		// 操作删除
 		doDelete(item : any) {
@@ -453,13 +457,15 @@
 				type: 'warning',
 				center: true
 			}).then(() => {
+				let loading = this.$loading({ target: '.main-container' });
 				api.deleteList({ ids: item.id }, 'maindataMaterialSupplier').then((res : any) => {
+					loading.close();
 					if (res.code === 200) {
 						(this as any).$refs.sideTree.request();
 						this.getDataList();
 						this.$message.success('删除成功');
 					} else this.$message.error(res.msg);
-				})
+				}).catch(() => loading.close());
 			}).catch(() => this.$message.info('已取消删除'));
 		}
 		// 刷新/重置