From d23535225430ae8f6123fecfa7c59d1b0d7d6392 Mon Sep 17 00:00:00 2001
From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com>
Date: Mon, 22 Apr 2024 16:02:44 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E5=93=81=E6=8A=A5=E5=BA=9F--=E4=B8=BB?=
=?UTF-8?q?=E5=AD=90=E8=A1=A8=E5=90=88=E5=B9=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../productscrapJobMain/index.vue | 15 ++++++---
.../productscrapRecordMain/index.vue | 17 ++++++----
.../productscrapRequestMain/index.vue | 33 +++++++++++--------
3 files changed, 40 insertions(+), 25 deletions(-)
diff --git a/src/views/wms/productionManage/productscrap/productscrapJobMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapJobMain/index.vue
index 7fd709816..42aeec5e5 100644
--- a/src/views/wms/productionManage/productscrap/productscrapJobMain/index.vue
+++ b/src/views/wms/productionManage/productscrap/productscrapJobMain/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ProductscrapJobMain.allSchemas"
+ :detailAllSchemas="ProductscrapJobDetail.allSchemas"
/>
@@ -32,8 +33,8 @@
{{ row.number }}
-
-
+
+
@@ -81,7 +82,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() // 路由信息
const routeName = ref()
routeName.value = route.name
-const tableColumns = ref(ProductscrapJobMain.allSchemas.tableColumns)
+const tableColumns = ref([...ProductscrapJobMain.allSchemas.tableColumns,...ProductscrapJobDetail.allSchemas.tableMainColumns])
// 字段设置 更新主列表字段
const updataTableColumns = (val) => {
@@ -178,7 +179,11 @@ const isShowMainButton = (row,val) => {
}
// 列表-操作按钮
-const butttondata = (row) => {
+const butttondata = (row,$index) => {
+ const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
+ if(findIndex>0&&findIndex<$index){
+ return []
+ }
return [
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // 关闭
diff --git a/src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue
index ad8217e50..b5d2fc3f2 100644
--- a/src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue
+++ b/src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ProductscrapRecordMain.allSchemas"
+ :detailAllSchemas="ProductscrapRecordDetail.allSchemas"
/>
@@ -32,8 +33,8 @@
{{ row.number }}
-
-
+
+
@@ -103,7 +104,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() // 路由信息
const routeName = ref()
routeName.value = route.name
-const tableColumns = ref(ProductscrapRecordMain.allSchemas.tableColumns)
+const tableColumns = ref([...ProductscrapRecordMain.allSchemas.tableColumns,...ProductscrapRecordDetail.allSchemas.tableMainColumns])
// 详情 table 操作扩展 按钮
const buttondataTable = ref([{
@@ -180,7 +181,7 @@ const tableFormButton = async (val , row) => {
bomModelVisible.value = true
DialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息'
detatableDataBom.params = {
- masterId: row.id
+ masterId: row.masterId
}
await getDetailListBom()
}
@@ -233,7 +234,11 @@ const buttonBaseClick = (val, item) => {
}
// 列表-操作按钮
-const butttondata = (row) => {
+const butttondata = (row,$index) => {
+ const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
+ if(findIndex>0&&findIndex<$index){
+ return []
+ }
return []
}
diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
index 8cf60969c..5c9fd22c8 100644
--- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
+++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ProductscrapRequestMain.allSchemas"
+ :detailAllSchemas="ProductscrapRequestDetail.allSchemas"
/>
@@ -32,8 +33,8 @@
{{ row.number }}
-
-
+
+
@@ -123,7 +124,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() // 路由信息
const routeName = ref()
routeName.value = route.name
-const tableColumns = ref(ProductscrapRequestMain.allSchemas.tableColumns)
+const tableColumns = ref([...ProductscrapRequestMain.allSchemas.tableColumns,...ProductscrapRequestDetail.allSchemas.tableMainColumns])
// 详情 table 操作扩展 按钮
const buttondataTable = ref([{
@@ -274,9 +275,9 @@ const tableFormButton = async (val , row) => {
detatableDataBom.params = {
itemCode: row.itemCode,
bomVersion: row.bomVersion,
- masterId: row.id
+ masterId: row.masterId
}
- rowId.value = row.id
+ rowId.value = row.masterId
detailQty.value = row.qty
await getDetailListBom()
detailBomRef.value.open('create', row, null,'viewDetail')//查看明细数据
@@ -411,7 +412,11 @@ const isShowMainButton = (row,val) => {
}
// 列表-操作按钮
-const butttondata = (row) => {
+const butttondata = (row,$index) => {
+ const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
+ if(findIndex>0&&findIndex<$index){
+ return []
+ }
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:productscrap-request-main:close'}), // 关闭
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:productscrap-request-main:reAdd'}), // 重新添加
@@ -428,26 +433,26 @@ const butttondata = (row) => {
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // 关闭
console.log('列表-操作按钮事件-关闭')
- handleClose(row.id)
+ handleClose(row.masterId)
} else if (val == 'mainReAdd') { // 重新添加
console.log('列表-操作按钮事件-重新添加')
- handleReAdd(row.id)
+ handleReAdd(row.masterId)
} else if (val == 'mainSubmit') { // 提交审批
console.log('列表-操作按钮事件-提交审批')
- handleSubmit(row.id)
+ handleSubmit(row.masterId)
} else if (val == 'mainTurnDown') { // 驳回
console.log('列表-操作按钮事件-驳回')
- handleRefused(row.id)
+ handleRefused(row.masterId)
} else if (val == 'mainApprove') { // 审批通过
console.log('列表-操作按钮事件-审批通过')
- handleAgree(row.id)
+ handleAgree(row.masterId)
} else if (val == 'mainHandle') { // 处理
console.log('列表-操作按钮事件-处理')
- handleHandle(row.id)
+ handleHandle(row.masterId)
} else if (val == 'edit') { // 编辑
openForm('update', row)
} else if (val == 'delete') { // 删除
- handleDelete(row.id)
+ handleDelete(row.masterId)
}
}