Browse Source

销售管理tab切换重置刷新

pengyh 1 year ago
parent
commit
30fdbd43a0

+ 11 - 2
src/views/auxiliaryFittings/salesManagement/attachmentNewReturn/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="page">
-		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
+		<template-page v-if="!formDialog && isShowTab" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
 			:table-events="tableEvents" :operationColumnWidth="110" :options-evens-group="optionsEvensGroup"
 			:moreParameters="moreParameters" :column-parsing="columnParsing" :operation="operation()" :exportList="exportList">
 			<div slot="moreSearch">
@@ -51,7 +51,8 @@ export default {
 			formDialogTitles: ["新增", "编辑", "详情"],
 			formDialog: false,
 			id: '',
-			flag: ''
+			flag: '',
+			isShowTab: true
 		}
 	},
 	computed: {
@@ -73,6 +74,14 @@ export default {
 		},
 		formItems() { }
 	},
+	watch: {
+		flag(){
+			this.isShowTab = false
+			this.$nextTick(()=>{
+				this.isShowTab = true
+			})
+		}
+	},
 	methods: {
 		// 切换状态
 		changeType(val) {

+ 11 - 2
src/views/auxiliaryFittings/salesManagement/attachmentOldReturn/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="page">
-		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
+		<template-page v-if="!formDialog && isShowTab" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
 			:table-events="tableEvents" :operationColumnWidth="110" :options-evens-group="optionsEvensGroup"
 			:moreParameters="moreParameters" :column-parsing="columnParsing" :operation="operation()" :exportList="exportList">
 			<div slot="moreSearch">
@@ -51,7 +51,8 @@ export default {
 			formDialogTitles: ["新增", "编辑", "详情"],
 			formDialog: false,
 			id: '',
-			flag: ''
+			flag: '',
+			isShowTab: true
 		}
 	},
 	computed: {
@@ -73,6 +74,14 @@ export default {
 		},
 		formItems() { }
 	},
+	watch: {
+		flag(){
+			this.isShowTab = false
+			this.$nextTick(()=>{
+				this.isShowTab = true
+			})
+		}
+	},
 	methods: {
 		// 切换状态
 		changeType(val) {

+ 11 - 2
src/views/auxiliaryFittings/salesManagement/attachmentSalesOrder/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="page">
-		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
+		<template-page v-if="!formDialog && isShowTab" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
 			:table-events="tableEvents" :operationColumnWidth="140" :options-evens-group="optionsEvensGroup"
 			:moreParameters="moreParameters" :column-parsing="columnParsing" :operation="operation()" :exportList="exportList">
 			<div slot="moreSearch">
@@ -58,7 +58,8 @@ export default {
 			formDialog: false,
 			id: '',
 			flag: '',
-			websitList: []
+			websitList: [],
+			isShowTab: true
 		}
 	},
 	computed: {
@@ -100,6 +101,14 @@ export default {
 			this.openForm()
 		}
 	},
+	watch: {
+		flag(){
+			this.isShowTab = false
+			this.$nextTick(()=>{
+				this.isShowTab = true
+			})
+		}
+	},
 	methods: {
 		// 切换状态
 		changeType(val) {

+ 11 - 2
src/views/auxiliaryFittings/salesManagement/auxiliaryAdjustPriceOrder/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="page">
-		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
+		<template-page v-if="!formDialog && isShowTab" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
 			:table-events="tableEvents" :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters"
 			:column-parsing="columnParsing" :operation="operation()" :exportList="exportList">
 			<div slot="moreSearch">
@@ -49,7 +49,8 @@ export default {
 			formDialogTitles: ["新增", "编辑", "详情"],
 			formDialog: false,
 			id: '',
-			flag: ''
+			flag: '',
+			isShowTab: true
 		}
 	},
 	computed: {
@@ -71,6 +72,14 @@ export default {
 		},
 		formItems() { }
 	},
+	watch: {
+		flag(){
+			this.isShowTab = false
+			this.$nextTick(()=>{
+				this.isShowTab = true
+			})
+		}
+	},
 	methods: {
 		// 切换状态
 		changeType(val) {

+ 11 - 2
src/views/auxiliaryFittings/salesManagement/auxiliarySalesOrder/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="page">
-		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
+		<template-page v-if="isShowTab && !formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
 			:table-events="tableEvents" :operationColumnWidth="140" :options-evens-group="optionsEvensGroup"
 			:moreParameters="moreParameters" :column-parsing="columnParsing" :operation="operation()" :exportList="exportList">
 			<div slot="moreSearch">
@@ -58,7 +58,8 @@ export default {
 			formDialog: false,
 			id: '',
 			flag: '',
-			websitList: []
+			websitList: [],
+			isShowTab: true
 		}
 	},
 	computed: {
@@ -100,6 +101,14 @@ export default {
 			this.openForm()
 		}
 	},
+	watch: {
+		flag(){
+			this.isShowTab = false
+			this.$nextTick(()=>{
+				this.isShowTab = true
+			})
+		}
+	},
 	methods: {
 		// 切换状态
 		changeType(val) {

+ 11 - 2
src/views/auxiliaryFittings/salesManagement/auxiliarySalesReturnOrder/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="page">
-		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
+		<template-page v-if="!formDialog && isShowTab" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
 			:table-events="tableEvents" :operationColumnWidth="110" :options-evens-group="optionsEvensGroup"
 			:moreParameters="moreParameters" :column-parsing="columnParsing" :operation="operation()" :exportList="exportList">
 			<div slot="moreSearch">
@@ -51,7 +51,8 @@ export default {
 			formDialogTitles: ["新增", "编辑", "详情"],
 			formDialog: false,
 			id: '',
-			retState: ''
+			retState: '',
+			isShowTab: true
 		}
 	},
 	computed: {
@@ -73,6 +74,14 @@ export default {
 		},
 		formItems() { }
 	},
+	watch: {
+		retState(){
+			this.isShowTab = false
+			this.$nextTick(()=>{
+				this.isShowTab = true
+			})
+		}
+	},
 	methods: {
 		// 切换状态
 		changeType(val) {

+ 6 - 4
src/views/auxiliaryFittings/salesManagement/components/auxiliarySalesReturnOrderDetail.vue

@@ -184,7 +184,7 @@
 					<el-table-column prop="goods.price" align="center" label="销售价格"></el-table-column>
 					<el-table-column prop="goods.saleAmount" align="center" label="销售金额" >
 						<template slot-scope="scope" v-if="scope.row.salesQty && scope.row.goods && scope.row.goods.price">
-							{{(scope.row.goods.price * 100) * scope.row.salesQty / 100}}
+							{{(scope.row.goods.price * 100) * (scope.row.salesQty*100) / 10000}}
 						</template>
 					</el-table-column>
 					<el-table-column label="操作" align="right" width="140">
@@ -438,6 +438,7 @@
 				})
 			},
 			confirm(){
+				const that = this
 				this.$confirm(`请确定是否确认提货, 是否继续?`, '提示', {
 					confirmButtonText: '确定',
 					cancelButtonText: '取消',
@@ -449,12 +450,13 @@
 					}).then(res => {
 						if(res.code == 200){
 							this.$message.success('确认提货成功!')
-							this.goBack()
+							that.goBack()
 						}
 					})
 				});
 			},
 			save(){
+				const that = this
 				this.$refs.formData.validate((valid, invalidFields, errLabels) => {
 					if (valid) {
 						if(this.formType == 0){
@@ -473,7 +475,7 @@
 							}).then(res => {
 								if(res.code == 200){
 									this.$message.success('提交成功!')
-									this.goBack()
+									that.goBack()
 								}
 							})
 						}else if(this.formType == 1){
@@ -494,7 +496,7 @@
 								if(res.code == 200){
 									this.dataList = []
 									this.$message.success('提交成功!')
-									this.goBack()
+									that.goBack()
 								}
 							})
 						}