From afbcfc40f58568a616c9f898d70edd0060fcd75c Mon Sep 17 00:00:00 2001
From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com>
Date: Thu, 18 Apr 2024 09:38:52 +0800
Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=94=B6=E8=8E=B7=E7=94=B3?=
=?UTF-8?q?=E8=AF=B7=20=E7=94=9F=E6=88=90=E6=A0=87=E7=AD=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../wms/purchasereceiptRequestMain/index.ts | 4 +-
.../purchasereceiptRequestMain/index.vue | 39 ++++++++++++++++---
2 files changed, 36 insertions(+), 7 deletions(-)
diff --git a/src/api/wms/purchasereceiptRequestMain/index.ts b/src/api/wms/purchasereceiptRequestMain/index.ts
index 148b8e98a..ba9f8a8a0 100644
--- a/src/api/wms/purchasereceiptRequestMain/index.ts
+++ b/src/api/wms/purchasereceiptRequestMain/index.ts
@@ -124,6 +124,6 @@ export const handlePurchasereceiptRequestMain = async (id) => {
}
// 生成标签
-export const genLabel = async (id) => {
- return await request.post({ url: `/wms/purchasereceipt-request-main/genLabel?id=` + id })
+export const genLabel = async (data) => {
+ return await request.post({ url: `/wms/purchasereceipt-request-main/genLabel`, data })
}
diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
index 54d00f9ab..b42f4b222 100644
--- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
+++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
@@ -33,8 +33,8 @@
{{ row.number }}
-
-
+
+
@@ -100,9 +100,12 @@
:tableData="detatableData.tableList"
:isBusiness="true"
:isShowButton="false"
+ :isShowReduceButton="false"
@submitForm="submitFormLabel"
- />
+ @searchTableSuccess="searchTableSuccessLabel"
+ />
+
{
tableColumns.value = val
}
+// 查询页面返回
+const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row) => {
+ nextTick(() => {
+ if (type == 'tableForm') {
+ // 明细查询页赋值
+ row[formField] = val[0][searchField]
+ if (formField == 'packUnit' || formField == 'packQty') {
+ row['packUnit'] = val[0]['packUnit']
+ row['packQty'] = val[0]['packQty']
+ }
+ if (formField == 'secondPackUnit') {
+ row['secondPackUnit'] = val[0]['packUnit']
+ row['secondPackQty'] = val[0]['packQty']
+ }
+ }
+ })
+}
+
// 查询页面返回
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
//console.log("formRef",formRef)
@@ -290,7 +311,11 @@ const isASNShowMainButton = (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.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:purchasereceipt-request-main:reAdd'}), //重新添加
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:submit'}), // 提交审批
@@ -355,8 +380,12 @@ const { getList:getDetailList } = detatableMethods
// 生成标签按钮操作
const submitFormLabel = async (formType, data) => {
try {
+ console.log("formType==",formType)
+ console.log("data==",data)
+ data.subList = detatableData.tableList
+ console.log("detatableData",detatableData)
await message.confirm('是否为此数据生成标签?')
- await PurchasereceiptRequestMainApi.genLabel(genLabelId.value)
+ await PurchasereceiptRequestMainApi.genLabel(data) //genLabelId.value
isCreateLabel.value = true
message.success('创建标签成功')
} finally {