From 428a5cf537441e69467b4bb44a464a57c8ec0c9b Mon Sep 17 00:00:00 2001
From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com>
Date: Mon, 22 Apr 2024 16:08:49 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E5=93=81=E4=B8=8A=E6=9E=B6---?=
=?UTF-8?q?=E4=B8=BB=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
---
.../productputawayJobMain/index.vue | 21 +++++++++-----
.../productputawayRecordMain/index.vue | 15 ++++++----
.../productputawayRequestMain/index.vue | 29 +++++++++++--------
3 files changed, 40 insertions(+), 25 deletions(-)
diff --git a/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue
index 67cec571c..babddf90e 100644
--- a/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue
+++ b/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ProductputawayJobMain.allSchemas"
+ :detailAllSchemas="ProductputawayJobDetail.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(ProductputawayJobMain.allSchemas.tableColumns)
+const tableColumns = ref([...ProductputawayJobMain.allSchemas.tableColumns,...ProductputawayJobDetail.allSchemas.tableMainColumns])
// 字段设置 更新主列表字段
const updataTableColumns = (val) => {
@@ -149,7 +150,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'])}), // 关闭
@@ -231,11 +236,11 @@ const buttonTableClick = async (val, row) => {
}
ProductputawayJobMainApi.executeProductputawayMain(aaa)
} else if (val == 'mainJobAba') { // 放弃
- ProductputawayJobMainApi.abandonProductputawayMain(row.id)
+ ProductputawayJobMainApi.abandonProductputawayMain(row.masterId)
} else if (val == 'mainJobClo') { // 关闭
- ProductputawayJobMainApi.closeProductputawayMain(row.id)
+ ProductputawayJobMainApi.closeProductputawayMain(row.masterId)
} else if (val == 'mainJobAcc') { // 承接
- ProductputawayJobMainApi.acceptProductputawayMain(row.id)
+ ProductputawayJobMainApi.acceptProductputawayMain(row.masterId)
}
}
// 获取部门 用于详情 部门回显
diff --git a/src/views/wms/productionManage/productputaway/productputawayRecordMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayRecordMain/index.vue
index acad9cfc0..b92689111 100644
--- a/src/views/wms/productionManage/productputaway/productputawayRecordMain/index.vue
+++ b/src/views/wms/productionManage/productputaway/productputawayRecordMain/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ProductputawayRecordMain.allSchemas"
+ :detailAllSchemas="ProductputawayRecordDetail.allSchemas"
/>
@@ -32,8 +33,8 @@
{{ row.number }}
-
-
+
+
@@ -76,7 +77,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() // 路由信息
const routeName = ref()
routeName.value = route.name
-const tableColumns = ref(ProductputawayRecordMain.allSchemas.tableColumns)
+const tableColumns = ref([...ProductputawayRecordMain.allSchemas.tableColumns,...ProductputawayRecordDetail.allSchemas.tableMainColumns])
// 字段设置 更新主列表字段
const updataTableColumns = (val) => {
@@ -125,7 +126,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/productputaway/productputawayRequestMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue
index 3692c7cb0..37f2434b3 100644
--- a/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue
+++ b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ProductputawayRequestMain.allSchemas"
+ :detailAllSchemas="ProductputawayRequestDetail.allSchemas"
/>
@@ -32,8 +33,8 @@
{{ row.number }}
-
-
+
+
@@ -93,7 +94,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() // 路由信息
const routeName = ref()
routeName.value = route.name
-const tableColumns = ref(ProductputawayRequestMain.allSchemas.tableColumns)
+const tableColumns = ref([...ProductputawayRequestMain.allSchemas.tableColumns,...ProductputawayRequestDetail.allSchemas.tableMainColumns])
// 字段设置 更新主列表字段
const updataTableColumns = (val) => {
@@ -196,7 +197,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:productputaway-request-main:close'}), // 关闭
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productputaway-request-main:reAdd'}), // 重新添加
@@ -213,7 +218,7 @@ const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // 关闭
await message.confirm('确认要关闭吗?')
tableObject.loading = true
- ProductputawayRequestMainApi.close(row.id).then(() => {
+ ProductputawayRequestMainApi.close(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@@ -224,7 +229,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainReAdd') { // 重新添加
await message.confirm('确认要重新添加吗?')
tableObject.loading = true
- ProductputawayRequestMainApi.reAdd(row.id).then(() => {
+ ProductputawayRequestMainApi.reAdd(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@@ -235,7 +240,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainSubmit') { // 提交审批
await message.confirm('确认要提交审批吗?')
tableObject.loading = true
- ProductputawayRequestMainApi.submit(row.id).then(() => {
+ ProductputawayRequestMainApi.submit(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@@ -246,7 +251,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainTurnDown') { // 驳回
await message.confirm('确认要驳回吗?')
tableObject.loading = true
- ProductputawayRequestMainApi.refused(row.id).then(() => {
+ ProductputawayRequestMainApi.refused(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@@ -257,7 +262,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainApprove') { // 审批通过
await message.confirm('确认要审批通过吗?')
tableObject.loading = true
- ProductputawayRequestMainApi.agree(row.id).then(() => {
+ ProductputawayRequestMainApi.agree(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@@ -268,7 +273,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainHandle') { // 处理
await message.confirm('确认要处理吗?')
tableObject.loading = true
- ProductputawayRequestMainApi.handle(row.id).then(() => {
+ ProductputawayRequestMainApi.handle(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@@ -279,7 +284,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'edit') { // 编辑
openForm('update', row)
} else if (val == 'delete') { // 删除
- handleDelete(row.id)
+ handleDelete(row.masterId)
}
}