AlanWong 1 gadu atpakaļ
vecāks
revīzija
046d677005

+ 1 - 1
src/api/currency.ts

@@ -73,7 +73,7 @@ function deleteList(data : any, url : any) {
 // 删除数据
 function delCategoryId(data : any, url : any) {
 	return request({
-		url: '/maindata/' + url + '/CategoryId',
+		url: '/maindata/' + url + '/delete',
 		method: 'delete',
 		params: data
 	})

+ 5 - 5
src/views/audit/agencyGoods/index.vue

@@ -62,7 +62,8 @@
 		config : any = {
 			search: {
 				attr: {
-					size: 'mini'
+					size: 'mini',
+					calculateH: true
 				},
 				columns: [
 					[{
@@ -124,10 +125,8 @@
 			table: {
 				attr: {
 					size: 'mini',
-					// seq: true,
 					align: 'left',
 					checkbox: false,
-					height: 600
 				},
 				columns: [{
 					width: 300,
@@ -361,7 +360,7 @@
 				type: 'warning',
 				center: true
 			}).then(() => {
-				api.deleteList({ id: item.id }, 'maindataMaterialOrganizationCategory').then((res : any) => {
+				api.delCategoryId({ id: item.id }, 'maindataMaterialOrganizationCategory').then((res : any) => {
 					if (res.code === 200) {
 						(this as any).$refs.sideTree.request();
 						this.getDataList();
@@ -455,7 +454,8 @@
 			box-sizing: border-box;
 			margin-left: 16px;
 			position: relative;
-
+			height: 600px;
+			// overflow-y: auto;
 			.bill-box {
 				width: 100%;
 				position: absolute;

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

@@ -146,7 +146,7 @@
 					size: 'mini',
 					align: 'left',
 					checkbox: true,
-					height: 600
+					calculateH: '100%',
 				},
 				columns: [{
 					width: 500,

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

@@ -130,7 +130,7 @@
 					seq: true,
 					align: 'center',
 					checkbox: true,
-					height: 600
+					calculateH: '100%',
 				},
 				columns: [{
 					width: 300,

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

@@ -99,7 +99,7 @@
 					size: 'mini',
 					align: 'left',
 					checkbox: true,
-					height: 600
+					calculateH: '100%'
 				},
 				columns: [{
 					title: '名称',

+ 58 - 35
src/views/audit/depots/index.vue

@@ -109,10 +109,8 @@
 			table: {
 				attr: {
 					size: 'mini',
-					seq: true,
-					align: 'center',
-					checkbox: true,
-					height: 630
+					align: 'left',
+					calculateH: '100%'
 				},
 				columns: [{
 					title: '名称',
@@ -270,7 +268,7 @@
 					seq: true,
 					align: 'center',
 					checkbox: true,
-					height: 590
+					calculateH: '100%',
 				},
 				columns: [{
 					width: 300,
@@ -336,8 +334,8 @@
 					name: [{
 						required: true, message: '请输入名称', trigger: 'blur'
 					}],
-					shortName: [{
-						required: true, message: '请输入简称', trigger: 'blur'
+					address: [{
+						required: true, message: '请输入地址', trigger: 'blur'
 					}]
 				}
 			},
@@ -369,6 +367,9 @@
 					}],
 					organizationName: [{
 						required: true, message: '请输入所属机构名称', trigger: 'blur'
+					}],
+					stock: [{
+						required: true, message: '请输入库存', trigger: 'blur'
 					}]
 				}
 			},
@@ -428,22 +429,34 @@
 		confirm() {
 			(this as any).$refs.addFormId.validate().then(() => {
 				let query = (this as any).$refs.addFormId.getValue();
-				console.log(query);
 				this.dialogFormVisible = false;
 				if (this.popTitle === '注册') {
+					let loading = this.$loading({ target: '.main-container' });
 					api.saveList(query, 'maindataStorehouse').then((res : any) => {
+						loading.close();
 						if (res.code === 200) {
-							this.$message.success(this.popTitle + '成功!');
+							this.$message.success(this.popTitle + '成功');
 							this.getDataList();
+							this.$confirm('是否注册仓位', '提示', {
+								confirmButtonText: '确定',
+								cancelButtonText: '取消',
+							}).then(() => {
+								api.single({ id: res.data }, 'maindataStorehouse').then((data : any) => {
+									this.changeTab(data.data);
+									this.onAdd2();
+								})
+							}).catch(() => { });
 						} else this.$message.error(res.msg)
-					})
+					}).catch(() => loading.close());
 				} else if (this.popTitle === '编辑') {
+					let loading = this.$loading({ target: '.main-container' });
 					api.updateList(query, 'maindataStorehouse').then((res : any) => {
+						loading.close();
 						if (res.code === 200) {
-							this.$message.success(this.popTitle + '成功!');
+							this.$message.success(this.popTitle + '成功');
 							this.getDataList();
 						} else this.$message.error(res.msg)
-					})
+					}).catch(() => loading.close());
 				}
 			})
 		}
@@ -456,19 +469,23 @@
 				query.idDelete = 0;
 				this.dialogFormVisible2 = false;
 				if (this.popTitle === '注册') {
+					let loading = this.$loading({ target: '.main-container' });
 					api.saveList(query, 'maindataStoringLocation').then((res : any) => {
+						loading.close();
 						if (res.code === 200) {
-							this.$message.success(this.popTitle + '成功!');
+							this.$message.success(this.popTitle + '成功');
 							this.getOneself(query.storehouseId);
 						} else this.$message.error(res.msg)
-					})
+					}).catch(() => loading.close());
 				} else if (this.popTitle === '编辑') {
+					let loading = this.$loading({ target: '.main-container' });
 					api.updateList(query, 'maindataStoringLocation').then((res : any) => {
+						loading.close();
 						if (res.code === 200) {
-							this.$message.success(this.popTitle + '成功!');
+							this.$message.success(this.popTitle + '成功');
 							this.getOneself(query.storehouseId);
 						} else this.$message.error(res.msg)
-					})
+					}).catch(() => loading.close());
 				}
 			})
 		}
@@ -495,7 +512,9 @@
 			}
 			clearInterval(this.timer)
 			let query = (this.$refs.moduleView as any).getQuery();
+			let loading = this.$loading({ target: '.main-container' });
 			api.pageList(query, 'maindataStorehouse').then((res : any) => {
+				loading.close();
 				if (res.code === 200) {
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
 					let page = {
@@ -505,7 +524,7 @@
 					};
 					(this.$refs.moduleView as any).setPage(page)
 				} else this.$message.error(res.msg)
-			})
+			}).catch(() => loading.close());
 		}
 		// 获取仓位列表数据
 		getDataList2() {
@@ -520,7 +539,9 @@
 			let query = (this.$refs.moduleView2 as any).getQuery();
 			console.log(query);
 			query.storehouseId = this.tableData.id;
+			let loading = this.$loading({ target: '.main-container' });
 			api.pageList(query, 'maindataStoringLocation').then((res : any) => {
+				loading.close();
 				if (res.code === 200) {
 					res.data.records.map((v : any) => {
 						v.ckName = this.tableData.name;
@@ -533,7 +554,7 @@
 					};
 					(this.$refs.moduleView2 as any).setPage(page)
 				} else this.$message.error(res.msg)
-			})
+			}).catch(() => loading.close());
 		}
 		// 工具栏方法
 		clickHandle2(e : any) {
@@ -589,13 +610,17 @@
 		}
 		// 查看仓位
 		changeTab(item : any) {
-			this.tableData = item;
-			this.tableData.subList.map((v : any) => {
-				v.ckName = this.tableData.name;
+			api.single({id:item.id},'maindataStorehouse').then((res:any) => {
+				if(res.code===200){
+					this.tableData = res.data;
+					res.data.subList.map((v : any) => {
+						v.ckName = res.data.name;
+					})
+					console.log('仓库表数据 ==> ', res.data);
+					(this.$refs.moduleView2 as any).setTableValue(res.data.subList);
+					this.isShow = 'cwb';
+				}
 			})
-			console.log('仓库表数据 ==> ', this.tableData);
-			(this.$refs.moduleView2 as any).setTableValue(this.tableData.subList);
-			this.isShow = 'cwb';
 		}
 		// 刷新仓库
 		onRefresh() {
@@ -618,12 +643,14 @@
 				if (item.subList.length > 0) {
 					this.$message.warning('此仓库下有仓位,不可删除!');
 				} else {
+					let loading = this.$loading({ target: '.main-container' });
 					api.deleteList({ ids: item.id }, url).then((res : any) => {
+						loading.close();
 						if (res.code === 200) {
 							this.getDataList();
 							this.$message.success('删除成功');
 						} else this.$message.error(res.msg)
-					})
+					}).catch(() => loading.close());
 				}
 			}).catch(() => this.$message.info('已取消删除'));
 		}
@@ -643,12 +670,14 @@
 				type: 'warning',
 				center: true
 			}).then(() => {
+				let loading = this.$loading({ target: '.main-container' });
 				api.deleteList({ ids: ids }, url).then((res : any) => {
+					loading.close();
 					if (res.code === 200) {
 						this.getDataList2();
 						this.$message.success('删除成功');
 					} else this.$message.error(res.msg)
-				})
+				}).catch(() => loading.close());
 			}).catch(() => this.$message.info('已取消删除'));
 		}
 		// 仓位操作删除
@@ -660,22 +689,16 @@
 				type: 'warning',
 				center: true
 			}).then(() => {
+				let loading = this.$loading({ target: '.main-container' });
 				api.deleteList({ ids: item.id }, url).then((res : any) => {
+					loading.close();
 					if (res.code === 200) {
 						this.getDataList2();
 						this.$message.success('删除成功');
 					} else this.$message.error(res.msg)
-				})
+				}).catch(() => loading.close());
 			}).catch(() => this.$message.info('已取消删除'));
 		}
-		//导出
-		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>
 <style lang="scss" scoped>

+ 6 - 2
src/views/audit/distributor/index.vue

@@ -129,7 +129,7 @@
 				attr: {
 					size: 'mini',
 					align: 'left',
-					height: 600
+					calculateH: '100%',
 				},
 				columns: [{
 					title: '名称',
@@ -155,7 +155,7 @@
 				{
 					width: 300,
 					title: '财务系统类型',
-					field: 'financeType',
+					field: 'financeType2',
 				},
 				{
 					width: 80,
@@ -407,6 +407,10 @@
 			api.pageList(query, 'maindataMaterialDistributor').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, //当前页

+ 6 - 2
src/views/audit/manufacturer/index.vue

@@ -129,7 +129,7 @@
 				attr: {
 					size: 'mini',
 					align: 'left',
-					height: 600
+					calculateH: '100%',
 				},
 				columns: [{
 					title: '名称',
@@ -155,7 +155,7 @@
 				{
 					width: 300,
 					title: '财务系统类型',
-					field: 'financeType',
+					field: 'financeType2',
 				},
 				{
 					width: 80,
@@ -407,6 +407,10 @@
 			api.pageList(query, 'maindataMaterialManufacturer').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, //当前页

+ 6 - 4
src/views/audit/order/index.vue

@@ -105,7 +105,7 @@
 						table: {
 							attr: {
 								size: 'mini',
-								height: 500,
+								calculateH: '100%',
 								align: 'center',
 								readonly: true
 							},
@@ -193,8 +193,10 @@
 								prop: 'deliveryData',
 								component: 'by-date-picker',
 								compConfig: {
-									format: 'yyyy-MM-dd',
-									type: 'datetime'
+									attr: {
+										format: 'yyyy-MM-dd hh:ss:mm',
+										type: 'datetime',
+									},
 								}
 							},
 							{
@@ -228,7 +230,7 @@
 				},
 				table: {
 					attr: {
-						height: 620,
+						calculateH: '100%',
 						size: 'mini',
 						seq: true,
 						align: 'left',

+ 1 - 1
src/views/audit/orderTask/components/productModal.vue

@@ -63,7 +63,7 @@
 					align: 'left',
 					checkbox:true,
 					triggerRowCheck: 'row',
-					height:'520px'
+					calculateH:'100%'
 				},
 				columns:
 					[

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

@@ -142,7 +142,7 @@
 						table: {
 							attr: {
 								size: 'mini',
-								height: 500,
+								calculateH: '100%',
 								align: 'center',
 								readonly: true
 							},
@@ -299,7 +299,7 @@
 				},
 				table: {
 					attr: {
-						height: 620,
+						calculateH: '100%',
 						size: 'mini',
 						seq: true,
 						align: 'left',
@@ -456,7 +456,7 @@
 				},
 				table: {
 					attr: {
-						height: 620,
+						calculateH: '100%',
 						size: 'mini',
 						seq: true,
 						align: 'left',
@@ -612,7 +612,7 @@
 				},
 				table: {
 					attr: {
-						height: 620,
+						calculateH: '100%',
 						size: 'mini',
 						seq: true,
 						align: 'left',
@@ -779,7 +779,7 @@
 				},
 				table: {
 					attr: {
-						height: 620,
+						calculateH: '100%',
 						size: 'mini',
 						seq: true,
 						align: 'left',

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

@@ -105,7 +105,7 @@
 				attr: {
 					size: 'mini',
 					align: 'left',
-					height: 600
+					calculateH: '100%',
 				},
 				columns: [{
 					title: '名称',

+ 42 - 32
src/views/audit/outbound/index.vue

@@ -76,7 +76,7 @@
 					},
 					table: {
 						attr: {
-							height: 600,
+							calculateH: '100%',
 							size: 'mini',
 							seq: true,
 							align: 'left',
@@ -216,7 +216,7 @@
 						table: {
 							attr: {
 								size: 'mini',
-								height: 500,
+								calculateH: '100%',
 								align: 'left',
 								readonly: true,
 							},
@@ -353,7 +353,7 @@
 				},
 				table: {
 					attr: {
-						height: 620,
+						calculateH: '100%',
 						size: 'mini',
 						seq: true,
 						align: 'left',
@@ -470,7 +470,7 @@
 				},
 				table: {
 					attr: {
-						height: 620,
+						calculateH: '100%',
 						size: 'mini',
 						seq: true,
 						align: 'left',
@@ -601,7 +601,7 @@
 				},
 				table: {
 					attr: {
-						height: 620,
+						calculateH: '100%',
 						size: 'mini',
 						seq: true,
 						align: 'left',
@@ -715,7 +715,7 @@
 				},
 				table: {
 					attr: {
-						height: 620,
+						calculateH: '100%',
 						size: 'mini',
 						seq: true,
 						align: 'left',
@@ -808,7 +808,7 @@
 						v.deliveryNumber = v.number - v.outNumber;
 						if (v.deliveryNumber < v.number) v.number = v.deliveryNumber;
 					});
-					this.tableData = parentData[0];
+					this.tableData = parentData[0].suborderList;
 					billConfig.tool.tools = { save: true, smt: true };
 					// console.log('this.tableData ==> ', this.tableData);
 					// billConfig.tool.tools = { save: true };
@@ -849,7 +849,7 @@
 					for (let v of query.suborderList) {
 						if (!v.unitPrice || v.unitPrice <= 0) return this.$message.warning('请输入正确物料单价');
 						if (v.deliveryNumber < v.number) return this.$message.warning('数量不能大于应出数量');
-						if (v.number > v.inventory) return this.$message.warning('出库数不能大于库存数量');
+						if (v.number > v.inventory) return this.$message.warning('出库数不能大于库存数量');
 						v.taskOrderId = query.id;
 						v.purchaseSuborderId = v.id;
 					}
@@ -860,7 +860,6 @@
 						query.suborderList.splice(i, 1)
 					}
 				});
-				if (query.deliveryData) query.deliveryData = query.deliveryData + ' 00:00:00';
 				console.log('出库参数query ==> ', query);
 
 				let loading = this.$loading({ target: '.main-container' });
@@ -927,8 +926,8 @@
 					this.baseInfo = parentData;
 					if (this.tabType === 'all' || this.tabType === 'draftsBox') {
 						if (parentData.submitState === 1) {
-							this.setReadonly(parentData)
-							return loading.close();
+							loading.close();
+							return this.setReadonly(parentData)
 						}
 						let billConfig = (this as any).$lodash.cloneDeep(this.config.bill);
 						if (billConfig.tableConfig[0].table.columns.at(-1).title != '操作') {
@@ -981,6 +980,7 @@
 							} else loading.close();
 						}).catch(() => loading.close());
 					} else {
+						loading.close();
 						this.setReadonly(parentData);
 					};
 				}
@@ -1195,25 +1195,35 @@
 		// 分页
 		pagination(e : any) {
 			console.log('分页 ==> ', e);
-			let query : any = (this as any).$refs.bill.getSearchValue(e.type);
-			query.pageNo = e.page.pageNum;
-			query.pageSize = e.page.pageSize;
-			let loading = this.$loading({ target: '.main-container' });
-			if (e.type === 'recycleBin') {
-				api.selectDeleteList(query, 'supplyOutOrder').then((res : any) => {
-					loading.close();
-					if (res.code === 200) {
-						(this.$refs.bill as any).setTabTableValue('recycleBin', res.data.records);
-					} else this.$message.error(res.msg)
-				}).catch(() => loading.close());
-			} else {
-				api.pageList(query, 'supplyOutOrder').then((res : any) => {
-					loading.close();
-					if (res.code === 200) {
-						(this.$refs.bill as any).setTabTableValue(e.type, res.data.records);
-					} else this.$message.error(res.msg)
-				}).catch(() => loading.close());
+			if(e.type==='source_0'){
+				
+				let query : any = (this as any).$refs.bill.$refs.source_0[0].getSearchValue();
+				query.pageNo = e.page.pageNum;
+				query.pageSize = e.page.pageSize;
+				this.getCitationList(query);
+			}else{
+				
+				let query : any = (this as any).$refs.bill.getSearchValue(e.type);
+				query.pageNo = e.page.pageNum;
+				query.pageSize = e.page.pageSize;
+				let loading = this.$loading({ target: '.main-container' });
+				if (e.type === 'recycleBin') {
+					api.selectDeleteList(query, 'supplyOutOrder').then((res : any) => {
+						loading.close();
+						if (res.code === 200) {
+							(this.$refs.bill as any).setTabTableValue('recycleBin', res.data.records);
+						} else this.$message.error(res.msg)
+					}).catch(() => loading.close());
+				} else {
+					api.pageList(query, 'supplyOutOrder').then((res : any) => {
+						loading.close();
+						if (res.code === 200) {
+							(this.$refs.bill as any).setTabTableValue(e.type, res.data.records);
+						} else this.$message.error(res.msg)
+					}).catch(() => loading.close());
+				}
 			}
+			
 		}
 		// 回收站数据
 		getSelectDeleteList(query : any) {
@@ -1236,7 +1246,7 @@
 			console.log('搜索 ==> ', parames);
 			let query = parames.value;
 			if (parames.type === 'source_0') {
-				this.getCitationList(query);
+				this.getCitationList(query); // 引单数据
 			} else {
 				if (parames.type === 'recycleBin') {
 					this.getSelectDeleteList(query); // 回收站分页数据
@@ -1253,7 +1263,7 @@
 			console.log('刷新/重置 ==> ', data);
 			if (data === 'source_0') {
 				(this as any).$refs.bill.$refs.source_0[0].clearSearch();
-				this.getCitationList({});
+				this.getCitationList({}); // 引单数据
 			} else {
 				(this as any).$refs.bill.$refs[data].clearSearch();
 				if (data === 'all') this.getPageList({}, 'all'); // 综合数据
@@ -1319,7 +1329,7 @@
 						break
 					}
 				};
-
+				console.log(this.tableData);
 				for (const v of this.tableData) {
 					j++;
 					if (v.materialSku == item.materialSku && item.isDeleted === 0) {

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

@@ -121,7 +121,7 @@
 					size: 'mini',
 					align: 'left',
 					checkbox: false,
-					height: 600,
+					calculateH: '100%',
 				},
 				columns: [{
 					width: 300,

+ 135 - 118
src/views/audit/productManagement/index.vue

@@ -39,7 +39,7 @@
 							<el-button v-show="ismakeup===0" @click="openMakeup">选择商品</el-button>
 						</template>
 						<template v-slot:makeupTable>
-							<div v-if="makeupList.length>0">
+							<div v-if="ismakeup===0">
 								<by-table :propConfig="makeupTable" ref="makeupTable"></by-table>
 							</div>
 						</template>
@@ -326,8 +326,7 @@
 		tableConfig : any = {
 			attr: {
 				size: 'mini',
-				height: 486,
-				align: 'center',
+				align: 'left',
 			},
 			columns: [
 				{
@@ -863,7 +862,7 @@
 					size: 'mini',
 					align: 'left',
 					checkbox: true,
-					height: 560,
+					calculateH: '100%',
 				},
 				columns: [{
 					width: 250,
@@ -925,7 +924,6 @@
 		}
 		// 确定商品新增
 		confirmProduct(e : any) {
-			this.makeupList = e;
 			this.$nextTick(() => {
 				let nowData = (this.$refs.makeupTable as any).getValue();
 				let names = '';
@@ -947,8 +945,9 @@
 							let obj : any = {};
 							obj.skuTitle = item.skuTitle
 							obj.skuSubtitle = item.skuSubtitle
-							// obj.materialId = item.materialId
 							obj.materialSkuId = item.id
+							obj.isDeleted = 0
+							this.makeupList.push(obj);
 							nowData.push(obj);
 						}
 					};
@@ -982,7 +981,7 @@
 		doFormData() {
 			(this as any).$refs.form.validate().then(() => {
 				let query = (this as any).$refs.form.getValue();
-				// console.log('物料信息 ==> ',query);
+				console.log('物料信息 ==> ', query);
 				query.materialSpec = this.materialSpec; // 商品规格
 				query.attributeList = JSON.stringify(this.attributeList) // 物料属性
 				query.attributeId = this.attributeId // 物料属性ID
@@ -1014,7 +1013,7 @@
 						if (!v.height) return this.$message.warning('物料高必填');
 						if (parseInt(v.height) <= 0) return this.$message.warning('物料高不能小于1');
 					};
-					data = { maindataMaterial: query, maindataMaterialSkus: this.tableList }
+					data = { maindataMaterialReceiveParam: query, maindataMaterialSkus: this.tableList }
 					let newArray : any = []
 					let materialSpecData : any = []
 					let attributeLength = this.attributeList.length
@@ -1035,8 +1034,8 @@
 						if (materialSpecData[i]) v.materialSpec = JSON.stringify(materialSpecData[i])
 					})
 				} else { // 单规格
-					data = { maindataMaterial: query, maindataMaterialSkus: (this.$refs.singeTable as any).getValue() }
-					console.log('单规格表格数据 ==> ', data.maindataMaterialSkus);
+					data = { maindataMaterialReceiveParam: query, maindataMaterialSkus: (this.$refs.singeTable as any).getValue() }
+					// console.log('单规格表格数据 ==> ', data.maindataMaterialSkus);
 					for (let v of data.maindataMaterialSkus) {
 						if (!v.price) return this.$message.warning('物料价格必填');
 						if (parseInt(v.price) <= 0) return this.$message.warning('物料价格不能小于1');
@@ -1055,44 +1054,41 @@
 						if (parseInt(v.height) <= 0) return this.$message.warning('物料高不能小于1');
 					};
 					data.maindataMaterialSkus[0].isDeleted = 0;
-					data.maindataMaterial.attributeList = ""
+					data.maindataMaterialReceiveParam.attributeList = ""
 				}
-				console.log('data ==> ', data);
 				if (this.ismakeup === 0) {
-					if (this.makeupList.length <= 0) return this.$message.warning('请选择组合商品');
-					let makeupData = (this as any).$refs.makeupTable.getValue();
-					for (let v of makeupData) {
-						if (parseInt(v.number) <= 0) return this.$message.warning('组合商品数量不能小于1');
-						v.materialId = data.maindataMaterial.id
-					};
-					console.log(makeupData);
-					api.saveList(makeupData, 'maindataMaterialLink').then((value : any) => {
-						console.log(value);
-					})
+					if (this.makeupList.length < 0) return this.$message.warning('请选择组合商品');
+					data.maindataMaterialLinks = this.makeupList;
+					// 表格删除
+					data.maindataMaterialLinks.map((v : any, i : any) => {
+						if (v.isDeleted === 1 && !v.id) {
+							data.maindataMaterialLinks.splice(i, 1)
+						}
+					});
+				}
+				console.log('data ==> ', data);
+				let loading = this.$loading({ target: '.main-container' });
+				if (this.isEdit) { // 编辑
+					api.updateList(data, 'maindataMaterial').then((res : any) => {
+						loading.close()
+						if (res.code === 200) {
+							this.isShow = 'home';
+							(this as any).$refs.sideTree.request();
+							this.getDataList();
+							this.$message.success('保存成功');
+						}
+					}).catch(() => loading.close());
+				} else {// 新增
+					api.saveList(data, 'maindataMaterial').then((res : any) => {
+						loading.close()
+						if (res.code === 200) {
+							this.isShow = 'home';
+							(this as any).$refs.sideTree.request();
+							this.getDataList();
+							this.$message.success('保存成功');
+						}
+					}).catch(() => loading.close());
 				}
-
-				// let loading = this.$loading({ target: '.main-container' });
-				// if (this.isEdit) { // 编辑
-				// 	other.updateSpuAndSku(data, 'maindataMaterial').then((res : any) => {
-				// 		loading.close()
-				// 		if (res.code === 200) {
-				// 			this.isShow = 'home';
-				// 			(this as any).$refs.sideTree.request();
-				// 			this.getDataList();
-				// 			this.$message.success('保存成功');
-				// 		}
-				// 	}).catch(() => loading.close());
-				// } else {// 新增
-				// 	other.saveSpuAndSku(data, 'maindataMaterial').then((res : any) => {
-				// 		loading.close()
-				// 		if (res.code === 200) {
-				// 			this.isShow = 'home';
-				// 			(this as any).$refs.sideTree.request();
-				// 			this.getDataList();
-				// 			this.$message.success('保存成功');
-				// 		}
-				// 	}).catch(() => loading.close());
-				// }
 
 			});
 		}
@@ -1125,84 +1121,98 @@
 			let loading = this.$loading({ target: '.my-container' });
 			api.single({ id: e.id }, 'maindataMaterial').then((v : any) => {
 				let data = v.data;
-				api.single({ id: data.vmCategoryId }, 'maindataMaterialVmcategory').then((res : any) => {
-					if (res.code === 200) {
-						if (res.data) data.vmCategoryName = res.data.name;
-					}
-				}).catch(() => loading.close());
-				api.single({ id: data.organizationCategoryId }, 'maindataMaterialOrganizationCategory').then((res : any) => {
-					if (res.code === 200) {
-						if (res.data) data.organizationCategoryName = res.data.name;
-					}
-				}).catch(() => loading.close());
-				api.single({ id: data.categoryId }, 'maindataMaterialCategory').then((res : any) => {
-					if (res.code === 200) data.categoryName = res.data.name;
-					if (data.attributeId) {
-						api.single({ id: data.attributeId }, 'maindataMaterialAttribute').then((p : any) => {
-							if (p.code === 200) {
-								if (p.data) this.selectValue = p.data.name
-							}
-						}).catch(() => loading.close());
-					}
-					this.intercept = data.attributeId // 拦截物料属性判断
-					this.isEdit = true;
-					this.editInfo = data;
-					this.isShow = 'add';
-					// 标签
-					if (data.tags) {
-						this.tagsData = data.tags.split(",")
-					} else this.tagsData = [];
-					this.materialSpec = data.materialSpec
-					this.isSingle = data.materialSpec === 0 ? true : false;
-					if (data.attributeList) this.attributeList = JSON.parse(data.attributeList);
-					other.selectByMaterialId({ id: data.id }, 'maindataMaterialSku').then((info : any) => {
-						if (info.code === 200) {
-							this.status = data.status
-							this.ismakeup = data.ismakeup
-							this.issued = data.issued
-							if (this.isSingle) {
-								this.selectValue = '' // 物料属性名称
-								this.towTable = '' // 表格数据
-								this.attributeList = []; // 属性规格
-								this.$nextTick(() => {
-									(this as any).$refs.singeTable.setValue(info.data);
-								});
-							} else {
-								this.forFun(this.attributeList[0], 0) // 生成sku
-								let tableConfig = (this as any).$lodash.cloneDeep(this.tableConfig);
-								let skuRuleList = (this as any).$lodash.cloneDeep(this.skuRuleList);
-								let newColumns = (this as any).$lodash.cloneDeep(this.attributeList).reverse();
-								info.data.map((v : any, i : any) => {
-									v = Object.assign(v, skuRuleList[i])
-									v.dataIndex = i
-								});
-								newColumns.map((v : any) => {
-									tableConfig.columns.unshift({
-										width: '80px',
-										title: v.title,
-										field: v.field,
+				if (data.vmCategoryId) {
+					api.single({ id: data.vmCategoryId }, 'maindataMaterialVmcategory').then((res : any) => {
+						if (res.code === 200) {
+							if (res.data) data.vmCategoryName = res.data.name;
+						}
+					}).catch(() => loading.close());
+				}
+				if (data.organizationCategoryId) {
+					api.single({ id: data.organizationCategoryId }, 'maindataMaterialOrganizationCategory').then((res : any) => {
+						if (res.code === 200) {
+							if (res.data) data.organizationCategoryName = res.data.name;
+						}
+					}).catch(() => loading.close());
+				}
+				if (data.categoryId) {
+					api.single({ id: data.categoryId }, 'maindataMaterialCategory').then((res : any) => {
+						if (res.code === 200) data.categoryName = res.data.name;
+						if (data.attributeId) {
+							api.single({ id: data.attributeId }, 'maindataMaterialAttribute').then((p : any) => {
+								if (p.code === 200) {
+									if (p.data) this.selectValue = p.data.name
+								}
+							}).catch(() => loading.close());
+						}
+						this.intercept = data.attributeId // 拦截物料属性判断
+						this.isEdit = true;
+						this.editInfo = data;
+						this.isShow = 'add';
+						// 标签
+						if (data.tags) {
+							this.tagsData = data.tags.split(",")
+						} else this.tagsData = [];
+						this.materialSpec = data.materialSpec
+						this.isSingle = data.materialSpec === 0 ? true : false;
+						if (data.attributeList) this.attributeList = JSON.parse(data.attributeList);
+						other.selectByMaterialId({ id: data.id }, 'maindataMaterialSku').then((info : any) => {
+							if (info.code === 200) {
+								this.status = data.status
+								console.log(data.ismakeup);
+								this.ismakeup = data.ismakeup
+								if (data.ismakeup === 0 && data.maindataMaterialLinks.length > 0) {
+									(this as any).makeupList = data.maindataMaterialLinks;
+									setTimeout(() => {
+										(this as any).$refs.makeupTable.setValue(data.maindataMaterialLinks) // 设置组合表格数据
 									})
-								});
-								this.tableList = (this as any).$lodash.cloneDeep(info.data);
-								// console.log('表格配置 ==> ', tableConfig);
-								console.log('skuRuleList ==> ', skuRuleList);
-								console.log('表格数据 ==> ', this.tableList);
-								this.setTableConfig = tableConfig;
-								this.$nextTick(() => {
-									(this as any).$refs.table.setConfig(tableConfig); // 设置表格配置
-									(this as any).$refs.table.setValue(this.tableList) // 设置表格数据
-								});
+								}
+								this.issued = data.issued
+								if (this.isSingle) {
+									this.selectValue = '' // 物料属性名称
+									this.towTable = '' // 表格数据
+									this.attributeList = []; // 属性规格
+									this.$nextTick(() => {
+										(this as any).$refs.singeTable.setValue(info.data);
+									});
+								} else {
+									this.forFun(this.attributeList[0], 0) // 生成sku
+									let tableConfig = (this as any).$lodash.cloneDeep(this.tableConfig);
+									let skuRuleList = (this as any).$lodash.cloneDeep(this.skuRuleList);
+									let newColumns = (this as any).$lodash.cloneDeep(this.attributeList).reverse();
+									info.data.map((v : any, i : any) => {
+										v = Object.assign(v, skuRuleList[i])
+										v.dataIndex = i
+									});
+									newColumns.map((v : any) => {
+										tableConfig.columns.unshift({
+											width: '80px',
+											title: v.title,
+											field: v.field,
+										})
+									});
+									this.tableList = (this as any).$lodash.cloneDeep(info.data);
+									// console.log('表格配置 ==> ', tableConfig);
+									console.log('skuRuleList ==> ', skuRuleList);
+									console.log('表格数据 ==> ', this.tableList);
+									this.setTableConfig = tableConfig;
+									this.$nextTick(() => {
+										(this as any).$refs.table.setConfig(tableConfig); // 设置表格配置
+										(this as any).$refs.table.setValue(this.tableList) // 设置表格数据
+									});
+								}
 							}
-						}
-						(this as any).$refs.form.setValue(data)
-						loading.close()
+							(this as any).$refs.form.setValue(data)
+							loading.close()
+						}).catch(() => loading.close());
 					}).catch(() => loading.close());
-				}).catch(() => loading.close());
+				}
+
 			}).catch(() => loading.close());
 		}
 		// 同步到财务系统
-		syncSystem(){
-			
+		syncSystem() {
+
 		}
 		// 立即生成
 		generateNow() {
@@ -1538,14 +1548,21 @@
 				center: true
 			}).then(() => {
 				let data = (this.$refs.makeupTable as any).getValue();// 获取表格数据
-				console.log(data);
 				let i = -1;
+				let j = -1;
 				for (const v of data) {
 					i++;
 					if (v.id == item.id) {
 						break
 					}
 				};
+				for (const v of this.makeupList) {
+					j++;
+					if (v.id == item.id && item.isDeleted === 0) {
+						break
+					}
+				};
+				this.makeupList[j].isDeleted = 1;
 				data.splice(i, 1);
 				(this.$refs.makeupTable as any).setValue(data);// 设置表格数据
 				this.$message.success('删除成功');

+ 0 - 8
src/views/audit/returnGoods/index.vue

@@ -1,8 +0,0 @@
-<template>
-</template>
-
-<script>
-</script>
-
-<style>
-</style>

+ 24 - 17
src/views/audit/saleOrder/index.vue

@@ -169,7 +169,7 @@
 					},
 					table: {
 						attr: {
-							height: 600,
+							calculateH: '100%',
 							size: 'mini',
 							seq: true,
 							align: 'left',
@@ -346,7 +346,7 @@
 						table: {
 							attr: {
 								size: 'mini',
-								height: 500,
+								calculateH: '100%',
 								align: 'center',
 								readonly: true
 							},
@@ -448,7 +448,7 @@
 				},
 				table: {
 					attr: {
-						height: 600,
+						calculateH: '100%',
 						size: 'mini',
 						seq: true,
 						align: 'left',
@@ -573,7 +573,7 @@
 				},
 				table: {
 					attr: {
-						height: 620,
+						calculateH: '100%',
 						size: 'mini',
 						seq: true,
 						align: 'left',
@@ -970,23 +970,30 @@
 		// 分页
 		pagination(e : any) {
 			console.log('分页 ==> ', e);
-			let query : any = (this as any).$refs.bill.getSearchValue(e.type);
-			query.pageNo = e.page.pageNum;
-			query.pageSize = e.page.pageSize;
-			if (e.type === 'returnOrder') query.status = 2; // 终止订单数据
-			let loading = this.$loading({ target: '.main-container' });
-			api.pageList(query, 'supplyPurchaseOrder').then((res : any) => {
-				loading.close();
-				if (res.code === 200) {
-					(this.$refs.bill as any).setTabTableValue(e.type, res.data.records);
-				} else this.$message.error(res.msg);
-			}).catch(() => loading.close());
+			if(e.type==='source_0'){
+				let query : any = (this as any).$refs.bill.$refs.source_0[0].getSearchValue();
+				query.pageNo = e.page.pageNum;
+				query.pageSize = e.page.pageSize;
+				this.getCitationList(query);
+			}else{
+				let query : any = (this as any).$refs.bill.getSearchValue(e.type);
+				query.pageNo = e.page.pageNum;
+				query.pageSize = e.page.pageSize;
+				if (e.type === 'returnOrder') query.status = 2; // 终止订单数据
+				let loading = this.$loading({ target: '.main-container' });
+				api.pageList(query, 'supplyPurchaseOrder').then((res : any) => {
+					loading.close();
+					if (res.code === 200) {
+						(this.$refs.bill as any).setTabTableValue(e.type, res.data.records);
+					} else this.$message.error(res.msg);
+				}).catch(() => loading.close());
+			}
 		}
 		// 搜索
 		search(parames : any) {
 			let query = parames.value
 			if (parames.type === 'source_0') {
-				this.getCitationList(query);
+				this.getCitationList(query); // 引单数据
 			} else {
 				if (query.type === 'returnOrder') query.status = 2; // 终止订单数据
 				this.getPageList(query, parames.type) // 获取综合分页数据
@@ -998,7 +1005,7 @@
 			console.log('刷新/重置 ==> ', data);
 			if (data === 'source_0') {
 				(this as any).$refs.bill.$refs.source_0[0].clearSearch();
-				this.getCitationList({});
+				this.getCitationList({}); // 引单数据
 			} else {
 				(this as any).$refs.bill.$refs[data].clearSearch();
 				if (data === 'all') this.getPageList({}, 'all'); // 综合数据

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

@@ -129,7 +129,7 @@
 				attr: {
 					size: 'mini',
 					align: 'left',
-					height: 600
+					calculateH: '100%',
 				},
 				columns: [{
 					title: '名称',

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

@@ -121,7 +121,7 @@
 					size: 'mini',
 					align: 'left',
 					checkbox: false,
-					height: 600
+					calculateH: '100%',
 				},
 				columns: [{
 					width: 300,

+ 19 - 6
src/views/audit/warehousing/index.vue

@@ -134,7 +134,7 @@
 						table: {
 							attr: {
 								size: 'mini',
-								height: 500,
+								calculateH: '100%',
 								align: 'center',
 								readonly: true
 							},
@@ -266,7 +266,7 @@
 				},
 				table: {
 					attr: {
-						height: 620,
+						calculateH: '100%',
 						size: 'mini',
 						seq: true,
 						align: 'left',
@@ -384,7 +384,7 @@
 				},
 				table: {
 					attr: {
-						height: 620,
+						calculateH: '100%',
 						size: 'mini',
 						seq: true,
 						align: 'left',
@@ -499,11 +499,20 @@
 						delete: true,
 						search: true,
 						refresh: true
-					}
+					},
+					customTools: [
+						{
+							name: '同步入库单', icon: 'el-icon-top', audit: [''], event: {
+								click: () => {
+									(this as any).syncEntry()
+								}
+							}
+						},
+					]
 				},
 				table: {
 					attr: {
-						height: 620,
+						calculateH: '100%',
 						size: 'mini',
 						seq: true,
 						align: 'left',
@@ -620,7 +629,7 @@
 				},
 				table: {
 					attr: {
-						height: 620,
+						calculateH: '100%',
 						size: 'mini',
 						seq: true,
 						align: 'left',
@@ -682,6 +691,10 @@
 			this.timer = setInterval(() => {
 				this.getDataList()
 			}, 500)
+		}
+		// 同步入库单
+		syncEntry() {
+		
 		}
 		// 获取机构数据
 		getSupplierModal(e : any) {