소스 검색

Merge branch 'master' of ssh://gogs.zfire.top:2222/zfire-front/zfire-newmall-admin

linwenxin 1 년 전
부모
커밋
3c8c5ca690

+ 19 - 2
src/views/auxiliaryFittings/salesManagement/components/attachmentNewReturnDetail.vue

@@ -366,7 +366,22 @@
 					})
 				});
 			},
-			submit(){
+			async checkForm(){
+				this.dataList.forEach(item=>{
+					if(!item.newRefundQty || item.newRefundQty < 1){
+						this.$message.warning('请输入配件数量并且数量大于0!')
+						return false
+					}else if(!item.refundAmount || item.refundAmount <= 0){
+						this.$message.warning('请输入配件退货金额并且大于0!')
+						return false
+					}else{
+						return true
+					}
+				})
+			},
+			async submit(){
+				let is_save = await this.checkForm()
+				if(!is_save){return false}
 				this.$confirm(`请确定是否提交, 是否继续?`, '提示', {
 					confirmButtonText: '确定',
 					cancelButtonText: '取消',
@@ -395,7 +410,9 @@
 					})
 				});
 			},
-			save(){
+			async save(){
+				let is_save = await this.checkForm()
+				if(!is_save){return false}
 				this.$refs.formData.validate((valid, invalidFields, errLabels) => {
 					if (valid) {
 						if(this.formType == 0){

+ 19 - 2
src/views/auxiliaryFittings/salesManagement/components/attachmentOldReturnDetail.vue

@@ -357,6 +357,19 @@
 					goodsType: 'P'
 				})
 			},
+			async checkForm(){
+				this.dataList.forEach(item=>{
+					if(!item.newRefundQty || item.newRefundQty < 1){
+						this.$message.warning('请输入配件数量并且数量大于0!')
+						return false
+					}else if(!item.refundAmount || item.refundAmount <= 0){
+						this.$message.warning('请输入配件退货金额并且大于0!')
+						return false
+					}else{
+						return true
+					}
+				})
+			},
 			confirm(){
 				this.$confirm(`请确定是否确认提货, 是否继续?`, '提示', {
 					confirmButtonText: '确定',
@@ -374,7 +387,9 @@
 					})
 				});
 			},
-			submit(){
+			async submit(){
+				let is_save = await this.checkForm()
+				if(!is_save){return false}
 				this.$confirm(`请确定是否提交, 是否继续?`, '提示', {
 					confirmButtonText: '确定',
 					cancelButtonText: '取消',
@@ -404,7 +419,9 @@
 					})
 				});
 			},
-			save(){
+			async save(){
+				let is_save = await this.checkForm()
+				if(!is_save){return false}
 				this.$refs.formData.validate((valid, invalidFields, errLabels) => {
 					if (valid) {
 						if(this.formType == 0){

+ 16 - 6
src/views/auxiliaryFittings/salesManagement/transaction/index.vue

@@ -5,8 +5,11 @@
 		  :operation="operation" :exportList="exportList">
 		</template-page>
 		<div class="detail" v-if="formDialog">
-			<auxiliarySalesOrderDetail v-if="goodsType == 'M'" :id="id" @back="backList" :formType="2" title="辅材销售订单详情"></auxiliarySalesOrderDetail>
-			<attachmentSalesOrderDetail v-if="goodsType == 'P'" :id="id" @back="backList" :formType="2" title="配件销售订单详情"></attachmentSalesOrderDetail>
+			<auxiliarySalesOrderDetail v-if="orderSource == 'M_SALES'" :id="id" @back="backList" :formType="2" title="辅材销售订单详情"></auxiliarySalesOrderDetail>
+			<attachmentSalesOrderDetail v-if="orderSource == 'P_SALES'" :id="id" @back="backList" :formType="2" title="配件销售订单详情"></attachmentSalesOrderDetail>
+			<auxiliarySalesReturnOrderDetail v-if="orderSource == 'SALES_RET'" :id="id" @back="backList" :formType="2" title="辅材销售退货单详情"></auxiliarySalesReturnOrderDetail>
+			<attachmentNewReturnDetail v-if="orderSource == 'NEW_PARTS_RET'" :id="id" @back="backList" :formType="2" title="配件新件返还详情"></attachmentNewReturnDetail>
+			<attachmentOldReturnDetail v-if="orderSource == 'OLD_PARTS_RET'" :id="id" @back="backList" :formType="2" title="配件旧件返还详情"></attachmentOldReturnDetail>
 		</div>
 	</div>
 </template>
@@ -16,10 +19,13 @@ import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import auxiliarySalesOrderDetail from '../components/auxiliarySalesOrderDetail.vue'
 import attachmentSalesOrderDetail from '../components/attachmentSalesOrderDetail.vue'
+import auxiliarySalesReturnOrderDetail from '../components/auxiliarySalesReturnOrderDetail.vue'
+import attachmentNewReturnDetail from '../components/attachmentNewReturnDetail.vue'
+import attachmentOldReturnDetail from '../components/attachmentOldReturnDetail.vue'
 import { downloadFiles } from '@/utils/util'
 import { listPageV2,pageExport } from "@/api/auxiliaryFittings/transaction";
 export default {
-  components: { TemplatePage, auxiliarySalesOrderDetail, attachmentSalesOrderDetail},
+  components: { TemplatePage, auxiliarySalesOrderDetail, attachmentSalesOrderDetail, auxiliarySalesReturnOrderDetail, attachmentNewReturnDetail, attachmentOldReturnDetail},
   mixins: [import_mixin],
   data() {
     return {
@@ -38,7 +44,7 @@ export default {
       recordSelected: [],
       /** 表单变量 */
 	  id: '',
-	  goodsType: 'P',
+	  orderSource: '',
 	  formDialog: false
     }
   },
@@ -67,8 +73,12 @@ export default {
         <div class='operation-btns'>
 		  <el-button type="text" onClick={() => {
 			this.id = row.orderId
-			this.goodsType = row.goodsType
-			this.formDialog = true
+			this.orderSource = row.orderSource
+			if(row.orderSource){
+				this.formDialog = true
+			}else{
+				this.$message.warning('订单来源为空!')
+			}
 		  }}>查看</el-button>
         </div>
       )