AlanWong 1 éve
szülő
commit
4ddd80793e

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

@@ -200,7 +200,7 @@
 								defaultExpandAll: true
 							},
 							request: {
-								url: '/maindata/maindataMaterialOrganizationCategory/treeList'
+								url: '/maindata/maindataMaterialOrganizationCategory/treeUseList'
 							}
 						}
 					},

+ 23 - 87
src/views/audit/depots/index.vue

@@ -27,10 +27,6 @@
 								<el-button slot="append" icon="el-icon-more" @click="handleSupplier"></el-button>
 							</el-input>
 						</template>
-						<!-- <template v-slot:stock="{value}">
-							<vxe-input v-if="isAdd" v-model="value.stock" style="width: 100%;" size="small" type="text"></vxe-input>
-							<span v-else>{{ value.stock }}</span>
-						</template> -->
 					</by-form>
 					<div slot="footer" class="dialog-footer">
 						<el-button @click="closeStoringLocation">取 消</el-button>
@@ -205,57 +201,7 @@
 								}
 							}
 						},
-						// {
-						// 	span: 6,
-						// 	label: '库存',
-						// 	prop: 'stock',
-						// 	component: 'by-input',
-						// 	compConfig: {
-						// 		attr: {
-						// 			placeholder: '请输入库存',
-						// 			clearable: true
-						// 		},
-						// 	},
-						// },
-						{
-							span: 6,
-							label: '库存体积',
-							prop: 'stockVolume',
-							component: 'by-input',
-							compConfig: {
-								attr: {
-									placeholder: '请输入库存体积',
-									clearable: true
-								},
-							},
-						},
 					],
-					// [
-					// 	{
-					// 		span: 6,
-					// 		label: '库存上限数量',
-					// 		prop: 'maxStockNumber',
-					// 		component: 'by-input',
-					// 		compConfig: {
-					// 			attr: {
-					// 				placeholder: '请输入库存上限数量',
-					// 				clearable: true
-					// 			}
-					// 		}
-					// 	},
-					// 	{
-					// 		span: 6,
-					// 		label: '库存体积上限',
-					// 		prop: 'maxStockVolume',
-					// 		component: 'by-input',
-					// 		compConfig: {
-					// 			attr: {
-					// 				placeholder: '请输入库存体积上限',
-					// 				clearable: true
-					// 			}
-					// 		}
-					// 	},
-					// ]
 				]
 			},
 			tool: {
@@ -304,11 +250,6 @@
 					title: '所属机构名称',
 					field: 'organizationName',
 				},
-				// {
-				// 	width: 150,
-				// 	title: '库存',
-				// 	field: 'stock'
-				// },
 				{
 					width: 150,
 					title: '库存体积',
@@ -402,19 +343,19 @@
 				size: 'small',
 				rules: {
 					name: [{
-						required: true, message: '请输入名称', trigger: 'blur'
+						required: true, message: '请输入名称', trigger: 'change'
 					}],
 					organizationName: [{
-						required: true, message: '请输入所属机构名称', trigger: 'blur'
+						required: true, message: '请输入所属机构名称', trigger: 'change'
 					}],
 					stockVolume: [{
-						required: true, message: '请输入库存体积', trigger: 'blur'
+						required: true, message: '请输入库存体积', trigger: 'change'
 					}],
 					maxStockNumber: [{
-						required: true, message: '请输入库存数量上限', trigger: 'blur'
+						required: true, message: '请输入库存数量上限', trigger: 'change'
 					}],
 					maxStockVolume: [{
-						required: true, message: '请输入库存体积上限', trigger: 'blur'
+						required: true, message: '请输入库存体积上限', trigger: 'change'
 					}]
 
 				}
@@ -435,13 +376,6 @@
 						prop: 'organizationName',
 						slot: true,
 					},
-					// {
-					// 	labelWidth: '110px',
-					// 	span: 23,
-					// 	label: '库存',
-					// 	prop: 'stock',
-					// 	slot: true
-					// },
 					{
 						labelWidth: '110px',
 						span: 23,
@@ -553,23 +487,25 @@
 		}
 		// 取消仓位注册
 		closeStoringLocation() {
-			let data = {
-				storehouseId: this.tableData.id,
-				idDelete: 0,
-				maxStockNumber: "100000",
-				maxStockVolume: "100000",
-				name: "默认仓位",
-				organizationId: 1,
-				organizationName: "供应商A",
-				stockVolume: "100000",
-			};
 			this.dialogFormVisible2 = false;
-			api.saveList(data, 'maindataStoringLocation').then((res : any) => {
-				if (res.code === 200) {
-					this.getOneself(this.tableData.id);
-					this.$alert('此仓库将新增一个默认仓位');
-				} else this.$message.error(res.msg)
-			});
+			if (this.tableData.subList.length <= 0) {
+				let data = {
+					storehouseId: this.tableData.id,
+					idDelete: 0,
+					maxStockNumber: "100000",
+					maxStockVolume: "100000",
+					name: "默认仓位",
+					organizationId: 1,
+					organizationName: "供应商A",
+					stockVolume: "100000",
+				};
+				api.saveList(data, 'maindataStoringLocation').then((res : any) => {
+					if (res.code === 200) {
+						this.getOneself(this.tableData.id);
+						this.$alert('此仓库将新增一个默认仓位');
+					} else this.$message.error(res.msg)
+				});
+			}
 		}
 		// 通过id拿到当条数据
 		getOneself(e : any) {

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

@@ -331,7 +331,7 @@
 		onChangeTree(e : any) {
 			this.categoryIds = e.id;
 			let loading = this.$loading({ target: '.main-container' });
-			api.byCategoryPage({ categoryId: e.id }, 'maindataOrganizationCategory').then((res : any) => {
+			api.byCategoryPage({ categoryId: e.id,type:2 }, 'maindataOrganizationCategory').then((res : any) => {
 				if (res.code === 200) {
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
 					let page = {

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

@@ -331,7 +331,7 @@
 		onChangeTree(e : any) {
 			this.categoryIds = e.id;
 			let loading = this.$loading({ target: '.main-container' });
-			api.byCategoryPage({ categoryId: e.id }, 'maindataOrganizationCategory').then((res : any) => {
+			api.byCategoryPage({ categoryId: e.id,type:3 }, 'maindataOrganizationCategory').then((res : any) => {
 				if (res.code === 200) {
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
 					let page = {

+ 6 - 3
src/views/audit/organClassify/index.vue

@@ -301,8 +301,11 @@
 		onAdd() {
 			this.popTitle = '新增'
 			this.dialogFormVisible = true;
-			this.radio = 0
-			this.$nextTick(() => (this as any).$refs.addFormId.setValue());
+			this.radio = 0;
+			setTimeout(() => {
+				(this as any).$refs.addFormId.setValue();
+				(this as any).$refs.addFormId.$refs['parentName--comp'][0].request();
+			}, 0)
 		}
 		// 打开编辑
 		openEdit(e : any) {
@@ -331,7 +334,7 @@
 				type: 'warning',
 				center: true
 			}).then(() => {
-				api.deleteList({ ids: item.id }, 'maindataOrganizationCategory').then((res : any) => {
+				api.delCategoryId({ id: item.id }, 'maindataOrganizationCategory').then((res : any) => {
 					if (res.code === 200) {
 						(this as any).$refs.sideTree.request();
 						this.getDataList();

+ 14 - 15
src/views/audit/outbound/index.vue

@@ -320,11 +320,11 @@
 										},
 									}
 								},
-								{
-									width: 80,
-									title: '优惠金额',
-									field: 'prePrice',
-								},
+								// {
+								// 	width: 80,
+								// 	title: '优惠金额',
+								// 	field: 'prePrice',
+								// },
 								{
 									width: 90,
 									title: '合计金额',
@@ -831,7 +831,7 @@
 						obj.number = item.number;
 						obj.deliveryNumber = item.deliveryNumber;
 						obj.outNumber = item.outNumber;
-						obj.prePrice = item.prePrice;
+						// obj.prePrice = item.prePrice;
 						obj.unitPrice = item.unitPrice;
 						obj.totalPrice = item.totalPrice;
 						data.suborderList.push(obj);
@@ -899,9 +899,10 @@
 		onChangeRow(e : any) {
 			this.isChange = true;
 			this.isSubmit = false;
-			e.prePrice = e.prePrice ? e.prePrice : 0;
+			// e.prePrice = e.prePrice ? e.prePrice : 0;
 			e.realityPrice = parseFloat((e.number * e.unitPrice).toFixed(2));
-			e.totalPrice = e.realityPrice - e.prePrice;
+			e.totalPrice = e.realityPrice;
+			// e.totalPrice = e.realityPrice - e.prePrice;
 
 		}
 		// 同步出库单到财务系统
@@ -952,7 +953,7 @@
 						query.suborderList.splice(i, 1)
 					}
 				});
-				query.financeOrderId = ""
+				query.financeOrderId = "";
 				console.log('出库参数query ==> ', query);
 
 				let loading = this.$loading({ target: '.main-container' });
@@ -1044,9 +1045,7 @@
 							if (val.code === 200) {
 								parentData.suborderList.map((v : any, i : any) => {
 									v.outNumber = val.data.suborderList[i].outNumber;
-									v.prePrice = val.data.suborderList[i].prePrice;
-									// v.realityPrice = val.data.suborderList[i].realityPrice-v.prePrice;
-									console.log(v);
+									// v.prePrice = val.data.suborderList[i].prePrice;
 								});
 								let data : any = parentData.suborderList;
 								let array : any = [];
@@ -1098,9 +1097,9 @@
 			readonly.tableConfig[0].table.columns = readonly.tableConfig[0].table.columns.filter((v : any) => v.title != '操作');
 			api.single({ id: e.purchaseOrderId }, 'supplyPurchaseOrder').then((val : any) => {
 				if (val.code === 200) {
-					parentData.suborderList.map((v : any, i : any) => {
-						v.prePrice = val.data.suborderList[i].prePrice;
-					});
+					// parentData.suborderList.map((v : any, i : any) => {
+					// 	v.prePrice = val.data.suborderList[i].prePrice;
+					// });
 					let data = parentData.suborderList;
 					let array : any = [];
 					data.map((v : any) => {

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

@@ -197,7 +197,7 @@
 								defaultExpandAll: true
 							},
 							request: {
-								url: '/maindata/maindataMaterialCategory/treeList',
+								url: '/maindata/maindataMaterialCategory/treeUseList',
 								method: 'GET'
 							}
 						}

+ 9 - 2
src/views/audit/supplier/index.vue

@@ -61,7 +61,7 @@
 			},
 			request: {
 				url: '/maindata/maindataOrganizationCategory/treeUseList',
-				method: 'GET'
+				method: 'GET',
 			}
 		}
 		config : any = {
@@ -331,7 +331,7 @@
 		onChangeTree(e : any) {
 			this.categoryIds = e.id;
 			let loading = this.$loading({ target: '.main-container' });
-			api.byCategoryPage({ categoryId: e.id }, 'maindataOrganizationCategory').then((res : any) => {
+			api.byCategoryPage({ categoryId: e.id, type: 1 }, 'maindataOrganizationCategory').then((res : any) => {
 				if (res.code === 200) {
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
 					let page = {
@@ -486,23 +486,27 @@
 		display: flex;
 		padding: 16px;
 		height: 100%;
+
 		.bill-left {
 			position: relative;
 			border-right: solid #EEE 1px;
 			padding-right: 16px;
 			flex-shrink: 0;
+
 			.bill-tab {
 				width: 150px;
 				height: 100%;
 				transition: all .5s;
 				overflow: hidden;
 			}
+
 			.tab-title {
 				font-size: 16px;
 				padding-bottom: 16px;
 				width: 200px;
 			}
 		}
+
 		.bill-main {
 			width: calc(100% - 16px);
 			box-sizing: border-box;
@@ -511,8 +515,10 @@
 			height: 100%;
 			overflow-y: hidden;
 		}
+
 		.detil {
 			width: 100%;
+
 			.box-shadow {
 				box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
 				padding: 20px;
@@ -526,6 +532,7 @@
 				margin-top: 20px;
 			}
 		}
+
 		@media screen and (min-width: 1700px) {
 			.bill-main {
 				min-width: 1450px;

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

@@ -197,7 +197,7 @@
 								defaultExpandAll: true
 							},
 							request: {
-								url: '/maindata/maindataMaterialVmcategory/treeList'
+								url: '/maindata/maindataMaterialVmcategory/treeUseList'
 							}
 						}
 					},