From 5389229c5ef7ad6b3c390d60914e00e71494e830 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周四, 25 4月 2024 11:59:46 +0800
Subject: [PATCH] 界面checkbox如果是 界面必填的话,不主动选则,会报错,提示要选择
---
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/WmsSubstituteGood/addFormWmsSubstituteGood.vue | 199 +++++++++++++++++++++++++------------------------
1 files changed, 102 insertions(+), 97 deletions(-)
diff --git a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/WmsSubstituteGood/addFormWmsSubstituteGood.vue b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/WmsSubstituteGood/addFormWmsSubstituteGood.vue
index a7029c1..b751075 100644
--- a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/WmsSubstituteGood/addFormWmsSubstituteGood.vue
+++ b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/WmsSubstituteGood/addFormWmsSubstituteGood.vue
@@ -1,5 +1,5 @@
锘�<template>
- <!-- 鏇夸唬鍝佺鐞� -->
+ <!-- 鏇夸唬鍝佺鐞� -琛ㄦ牸鍐呭 -->
<div style="background-color: white">
<!-- <a-spin :spinning="loading"> -->
<div class="wms-task-management-detail-div">
@@ -7,6 +7,8 @@
<!-- <span style="font-weight:bold;cursor:default;">
<a style="cursor:default;">{{ row.no }}</a>鍗曟嵁璇︽儏
</span> -->
+ <!-- 鐗╂枡缂栧彿: {{ materialCode }}
+ 鐗╂枡鍚嶇О: {{ materialName }} -->
<div style="margin-top: 10px;">
<a-table :columns="columns" :data-source="list" row-key="id" :pagination="false" :scroll="{ x: true }">
<template slot="index" slot-scope="text, record, index">{{ index + 1 }}</template>
@@ -24,21 +26,15 @@
</a-table>
</div>
</div>
-
- <p @click="visible = true">鏂板琛�</p>
-
- <a-modal title="鏇夸唬鍝佸垪琛�" :width="900" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit"
- @cancel="handleCancel">
- <show-list ref="showList" @ok="handleOk" />
- <!-- <a-spin :spinning="confirmLoading"></a-spin> -->
- </a-modal>
+ <p @click="$refs.showList.add()">鏂板琛�</p>
+ <show-list ref="showList" @ok="handleSubmit" />
</div>
</div>
</template>
<script>
import { WmsOrderRukuDetail } from '@/api/modular/main/WmsOrderManage'
-import showList from './index.vue'
+import showList from './addForm.vue'
export default {
name: 'wmsOrderRukuManagementDetailDrawer',
@@ -72,66 +68,66 @@
scopedSlots: { customRender: 'index' },
align: 'center'
},
- {
- title: '鏇夸唬缂栧彿',
- align: 'center',
- customHeaderCell: () => {
- return {
- style: {
- 'min-width': '120px'//鏈�灏忓垪瀹借缃�
- }
- }
- },
- customCell: () => {
- return {
- style: {
- 'min-width': '120px'//鏈�灏忓垪瀹借缃�
- }
- }
- },
- sorter: true,
- dataIndex: 'substituteCode'
- },
- {
- title: '鐗╂枡缂栧彿',
- align: 'center',
- customHeaderCell: () => {
- return {
- style: {
- 'min-width': '120px'//鏈�灏忓垪瀹借缃�
- }
- }
- },
- customCell: () => {
- return {
- style: {
- 'min-width': '120px'//鏈�灏忓垪瀹借缃�
- }
- }
- },
- sorter: true,
- dataIndex: 'materialCode'
- },
- {
- title: '鐗╂枡鍚嶇О',
- align: 'center',
- customHeaderCell: () => {
- return {
- style: {
- 'min-width': '120px'//鏈�灏忓垪瀹借缃�
- }
- }
- },
- customCell: () => {
- return {
- style: {
- 'min-width': '120px'//鏈�灏忓垪瀹借缃�
- }
- }
- },
- sorter: true,
- dataIndex: 'materialName'
- },
+ // {
+ // title: '鏇夸唬缂栧彿',
+ // align: 'center',
+ // customHeaderCell: () => {
+ // return {
+ // style: {
+ // 'min-width': '120px'//鏈�灏忓垪瀹借缃�
+ // }
+ // }
+ // },
+ // customCell: () => {
+ // return {
+ // style: {
+ // 'min-width': '120px'//鏈�灏忓垪瀹借缃�
+ // }
+ // }
+ // },
+ // sorter: true,
+ // dataIndex: 'substituteCode'
+ // },
+ // {
+ // title: '鐗╂枡缂栧彿',
+ // align: 'center',
+ // customHeaderCell: () => {
+ // return {
+ // style: {
+ // 'min-width': '120px'//鏈�灏忓垪瀹借缃�
+ // }
+ // }
+ // },
+ // customCell: () => {
+ // return {
+ // style: {
+ // 'min-width': '120px'//鏈�灏忓垪瀹借缃�
+ // }
+ // }
+ // },
+ // sorter: true,
+ // dataIndex: 'materialCode'
+ // },
+ // {
+ // title: '鐗╂枡鍚嶇О',
+ // align: 'center',
+ // customHeaderCell: () => {
+ // return {
+ // style: {
+ // 'min-width': '120px'//鏈�灏忓垪瀹借缃�
+ // }
+ // }
+ // },
+ // customCell: () => {
+ // return {
+ // style: {
+ // 'min-width': '120px'//鏈�灏忓垪瀹借缃�
+ // }
+ // }
+ // },
+ // sorter: true,
+ // dataIndex: 'materialName'
+ // },
{
title: '鏇夸唬鍝佺墿鏂欑紪鍙�',
align: 'center',
@@ -152,26 +148,26 @@
sorter: true,
dataIndex: 'substituteMaterialCode'
},
- {
- title: '鏇夸唬鍝佺墿鏂欏悕绉�',
- align: 'center',
- customHeaderCell: () => {
- return {
- style: {
- 'min-width': '140px'//鏈�灏忓垪瀹借缃�
- }
- }
- },
- customCell: () => {
- return {
- style: {
- 'min-width': '140px'//鏈�灏忓垪瀹借缃�
- }
- }
- },
- sorter: true,
- dataIndex: 'substituteMaterialName'
- },
+ // {
+ // title: '鏇夸唬鍝佺墿鏂欏悕绉�',
+ // align: 'center',
+ // customHeaderCell: () => {
+ // return {
+ // style: {
+ // 'min-width': '140px'//鏈�灏忓垪瀹借缃�
+ // }
+ // }
+ // },
+ // customCell: () => {
+ // return {
+ // style: {
+ // 'min-width': '140px'//鏈�灏忓垪瀹借缃�
+ // }
+ // }
+ // },
+ // sorter: true,
+ // dataIndex: 'substituteMaterialName'
+ // },
{
title: '鏇夸唬娆″簭',
align: 'center',
@@ -234,11 +230,14 @@
this.afterClsoe()
}
},
- initShow() {
- this.loading = true
- this.getList(() => {
- this.loading = false
- })
+
+ initShowSubstituteGood() {
+ // this.materialCode = materialCode
+ // this.materialName = materialName
+ // this.loading = true
+ // this.getList(() => {
+ // this.loading = false
+ // })
},
getList(row) {
let params = { id: row.id }
@@ -258,9 +257,15 @@
this.list = []
},
handleOk(param) {
- this.list = param
+
},
- handleSubmit() {
+ handleSubmit(item) {
+ var arr1 = this.list.filter(key => key.substituteMaterialCode === item.substituteMaterialCode)
+ if(arr1.length>0){
+ this.$message.warning("宸插瓨鍦ㄧ浉鍚岀墿鏂�")
+ return
+ }
+ this.list.push(item)
this.visible = false
},
handleCancel() {
--
Gitblit v1.9.3