diff --git a/src/api/wms/inventorychangeRequestMain/index.ts b/src/api/wms/inventorychangeRequestMain/index.ts
index 436ba1c52..a04620173 100644
--- a/src/api/wms/inventorychangeRequestMain/index.ts
+++ b/src/api/wms/inventorychangeRequestMain/index.ts
@@ -58,4 +58,34 @@ export const exportInventorychangeRequestMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/inventorychange-request-main/get-import-template' })
+}
+
+// 关闭
+export const close = (id) => {
+ return request.put({ url: '/wms/inventorychange-request-main/close?id=' + id })
+}
+
+// 重新添加
+export const reAdd = (id) => {
+ return request.put({ url: '/wms/inventorychange-request-main/reAdd?id=' + id })
+}
+
+// 提交审批
+export const submit = (id) => {
+ return request.put({ url: '/wms/inventorychange-request-main/submit?id=' + id })
+}
+
+// 驳回
+export const refused = (id) => {
+ return request.put({ url: '/wms/inventorychange-request-main/refused?id=' + id })
+}
+
+// 审批通过
+export const agree = (id) => {
+ return request.put({ url: '/wms/inventorychange-request-main/agree?id=' + id })
+}
+
+// 处理
+export const handle = (id) => {
+ return request.put({ url: '/wms/inventorychange-request-main/handle?id=' + id })
}
\ No newline at end of file
diff --git a/src/api/wms/labeltype/index.ts b/src/api/wms/labeltype/index.ts
index 5a08bf37b..148a1b95b 100644
--- a/src/api/wms/labeltype/index.ts
+++ b/src/api/wms/labeltype/index.ts
@@ -56,8 +56,3 @@ export const deleteLabeltype = async (id: number) => {
export const exportLabeltype = async (params) => {
return await request.download({ url: `/wms/labeltype/export-excel`, params })
}
-
-// 下载用户导入模板
-export const importTemplate = () => {
- return request.download({ url: '/wms/labeltype/get-import-template' })
-}
\ No newline at end of file
diff --git a/src/views/wms/basicDataManage/labelManage/labeltype/index.vue b/src/views/wms/basicDataManage/labelManage/labeltype/index.vue
index 0920c5eea..14fdac2c1 100644
--- a/src/views/wms/basicDataManage/labelManage/labeltype/index.vue
+++ b/src/views/wms/basicDataManage/labelManage/labeltype/index.vue
@@ -54,9 +54,7 @@
-
-
-
+
diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
index 5c6848479..10edf47ce 100644
--- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
+++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
@@ -215,8 +215,8 @@ const isShowMainButton = (row,val) => {
// 列表-操作按钮
const butttondata = (row) => {
return [
- defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:deliver-request-main:close'}), // 关闭
- defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:deliver-request-main:reAdd'}), //重新添加
+ defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:deliver-request-main:close'}), // 关闭
+ defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:deliver-request-main:reAdd'}), //重新添加
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:deliver-request-main:submit'}), // 提交审批
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:deliver-request-main:refused'}), // 驳回
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:deliver-request-main:agree'}), // 审批通过
diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/index.vue b/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/index.vue
index 8b5fb620c..b9d7286d0 100644
--- a/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/index.vue
+++ b/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/index.vue
@@ -78,6 +78,10 @@ const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InventorychangeRecordMain.allSchemas.tableColumns)
+console.log(99 , routeName.value)
+const fromInventoryStatus = ref()
+const toInventoryStatus = ref()
+
// 字段设置 更新主列表字段
const updataTableColumns = (val) => {
tableColumns.value = val
@@ -87,13 +91,55 @@ const { tableObject, tableMethods } = useTable({
getListApi: InventorychangeRecordMainApi.getInventorychangeRecordMainPage // 分页接口
})
+
+// 判断 路由名称 进行条件过滤
+/**
+ * OktoholdRecordMain 合格转隔离
+ */
+ if ( routeName.value == 'OktoholdReqordMain') {
+ tableObject.params = {
+ fromInventoryStatus: 'OK',
+ toInventoryStatus:'HOLD'
+ }
+ fromInventoryStatus.value = 'OK'
+ toInventoryStatus.value = "HOLD"
+} else if ( routeName.value == 'HoldtookRecordMain') {
+ tableObject.params = {
+ fromInventoryStatus: 'HOLD',
+ toInventoryStatus:'OK'
+ }
+ fromInventoryStatus.value = 'HOLD'
+ toInventoryStatus.value = "OK"
+} else if ( routeName.value == 'HoldtoscrapRecordMain') {
+ tableObject.params = {
+ fromInventoryStatus: 'HOLD',
+ toInventoryStatus:'SCRAP'
+ }
+ fromInventoryStatus.value = 'HOLD'
+ toInventoryStatus.value = "SCRAP"
+} else if ( routeName.value == 'OktoscrapRecordMain') {
+ tableObject.params = {
+ fromInventoryStatus: 'OK',
+ toInventoryStatus:'SCRAP'
+ }
+ fromInventoryStatus.value = 'OK'
+ toInventoryStatus.value = "SCRAP"
+} else if ( routeName.value == 'ScraptoholdRecordMain') {
+ tableObject.params = {
+ fromInventoryStatus: 'SCRAP',
+ toInventoryStatus:'HOLD'
+ }
+ fromInventoryStatus.value = 'SCRAP'
+ toInventoryStatus.value = "HOLD"
+}
+
// 获得表格的各种操作
const { getList, setSearchParams } = tableMethods
// 列表头部按钮
const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi:'wms:inventorychange-record-main:export'}), // 导出
- defaultButtons.defaultFreshBtn(null), // 刷新
+ defaultButtons.defaultFreshBtn({hasPermi:'wms:inventorychange-record-main:page'}), // 刷新
defaultButtons.defaultFilterBtn(null), // 筛选
defaultButtons.defaultSetBtn(null), // 设置
// {
@@ -141,7 +187,7 @@ const handleExport = async () => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
- const data = await InventorychangeRecordMainApi.exportInventorychangeRecordMain(setSearchParams)
+ const data = await InventorychangeRecordMainApi.exportInventorychangeRecordMain(tableObject.params)
download.excel(data, '库存修改记录主.xlsx')
} catch {
} finally {
diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue
index 02f7dacd5..5639b52c3 100644
--- a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue
+++ b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue
@@ -83,7 +83,19 @@ import * as InventorychangeRequestDetailApi from '@/api/wms/inventorychangeReque
import * as defaultButtons from '@/utils/disposition/defaultButtons'
// 库存修改申请 合格转隔离
-defineOptions({ name: 'InventorychangeRequestMain' })
+defineOptions({ name: 'OktoholdRequestMain' })
+
+// 库存修改申请 隔离转合格
+// defineOptions({ name: 'HoldtookRequestMain' })
+
+// // 库存修改申请 隔离转报废
+// defineOptions({ name: 'HoldtoscrapRequestMain' })
+
+// // 库存修改申请 合格转报废
+// defineOptions({ name: 'OktoscrapRequestMain' })
+
+// // 库存修改申请 报废转隔离
+// defineOptions({ name: 'ScraptoholdRequestMain' })
const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化
@@ -107,16 +119,39 @@ const { tableObject, tableMethods } = useTable({
*/
if ( routeName.value == 'OktoholdRequestMain') {
tableObject.params = {
- fromInventoryStatus: 'OK'
+ fromInventoryStatus: 'OK',
+ toInventoryStatus:'HOLD'
}
fromInventoryStatus.value = 'OK'
- toInventoryStatus.value = "HODxxx"
-} else if ( routeName.value == 'xxxx') {
+ toInventoryStatus.value = "HOLD"
+} else if ( routeName.value == 'HoldtookRequestMain') {
tableObject.params = {
- fromInventoryStatus: 'xxx'
+ fromInventoryStatus: 'HOLD',
+ toInventoryStatus:'OK'
}
- fromInventoryStatus.value = 'xxx'
- toInventoryStatus.value = "xxx"
+ fromInventoryStatus.value = 'HOLD'
+ toInventoryStatus.value = "OK"
+} else if ( routeName.value == 'HoldtoscrapRequestMain') {
+ tableObject.params = {
+ fromInventoryStatus: 'HOLD',
+ toInventoryStatus:'SCRAP'
+ }
+ fromInventoryStatus.value = 'HOLD'
+ toInventoryStatus.value = "SCRAP"
+} else if ( routeName.value == 'OktoscrapRequestMain') {
+ tableObject.params = {
+ fromInventoryStatus: 'OK',
+ toInventoryStatus:'SCRAP'
+ }
+ fromInventoryStatus.value = 'OK'
+ toInventoryStatus.value = "SCRAP"
+} else if ( routeName.value == 'ScraptoholdRequestMain') {
+ tableObject.params = {
+ fromInventoryStatus: 'SCRAP',
+ toInventoryStatus:'HOLD'
+ }
+ fromInventoryStatus.value = 'SCRAP'
+ toInventoryStatus.value = "HOLD"
}
// 字段设置 更新主列表字段
@@ -204,13 +239,14 @@ const isShowMainButton = (row,val) => {
// 列表-操作按钮
const butttondata = (row) => {
return [
- defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // 关闭
- defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // 重新添加
- defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // 提交审批
- defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // 驳回
- defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // 审批通过
- defaultButtons.mainListEditBtn({hasPermi:'wms:inventorychange-request-main:update'}), // 编辑
- defaultButtons.mainListDeleteBtn({hasPermi:'wms:inventorychange-request-main:delete'}), // 删除
+ defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:inventorychange-request-main:close'}), // 关闭
+ defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:inventorychange-request-main:reAdd'}), //重新添加
+ defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventorychange-request-main:submit'}), // 提交审批
+ defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorychange-request-main:refused'}), // 驳回
+ defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorychange-request-main:agree'}), // 审批通过
+ defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:inventorychange-request-main:handle'}), // 处理
+ defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventorychange-request-main:update'}), // 编辑
+ // defaultButtons.mainListDeleteBtn({hasPermi:'wms:inventorychange-request-main:delete'}), // 删除
]
}
@@ -219,15 +255,53 @@ const butttondata = (row) => {
// 列表-操作按钮事件
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // 关闭
- console.log('列表-操作按钮事件-关闭')
+ await message.confirm('确认要关闭吗?')
+ InventorychangeRequestMainApi.close(row.id).then(() => {
+ message.success(t('common.updateSuccess'))
+ getList()
+ }).catch(err => {
+ console.log(err)
+ })
} else if (val == 'mainReAdd') { // 重新添加
- console.log('列表-操作按钮事件-重新添加')
+ await message.confirm('确认要重新添加吗?')
+ InventorychangeRequestMainApi.reAdd(row.id).then(() => {
+ message.success(t('common.updateSuccess'))
+ getList()
+ }).catch(err => {
+ console.log(err)
+ })
} else if (val == 'mainSubmit') { // 提交审批
- console.log('列表-操作按钮事件-提交审批')
+ await message.confirm('确认要提交审批吗?')
+ InventorychangeRequestMainApi.submit(row.id).then(() => {
+ message.success(t('common.updateSuccess'))
+ getList()
+ }).catch(err => {
+ console.log(err)
+ })
} else if (val == 'mainTurnDown') { // 驳回
- console.log('列表-操作按钮事件-驳回')
+ await message.confirm('确认要驳回吗?')
+ InventorychangeRequestMainApi.refused(row.id).then(() => {
+ message.success(t('common.updateSuccess'))
+ getList()
+ }).catch(err => {
+ console.log(err)
+ })
} else if (val == 'mainApprove') { // 审批通过
- console.log('列表-操作按钮事件-审批通过')
+ await message.confirm('确认要审批通过吗?')
+ InventorychangeRequestMainApi.agree(row.id).then(() => {
+ message.success(t('common.updateSuccess'))
+ getList()
+ }).catch(err => {
+ console.log(err)
+ })
+ } else if (val == 'mainHandle') { // 处理
+ await message.confirm('确认要处理吗?')
+ InventorychangeRequestMainApi.handle(row.id).then(() => {
+ message.success(t('common.updateSuccess'))
+ getList()
+ }).catch(err => {
+ console.log(err)
+ })
} else if (val == 'edit') { // 编辑
openForm('update', row)
} else if (val == 'delete') { // 删除
@@ -270,7 +344,7 @@ const handleExport = async () => {
// 发起导出
exportLoading.value = true
const data = await InventorychangeRequestMainApi.exportInventorychangeRequestMain(tableObject.params)
- download.excel(data, '库存修改申请主.xlsx')
+ download.excel(data, '库存修改申请.xlsx')
} catch {
} finally {
exportLoading.value = false
@@ -298,10 +372,13 @@ const handleDeleteTable = (item, index) => {
// 主子数据 提交
const submitForm = async (formType, data) => {
data.subList = tableData.value // 拼接子表数据参数
- data.fromInventoryStatus = fromInventoryStatus.value
- data.toInventoryStatus = toInventoryStatus.value
+ data.subList.forEach(item => {
+ item.fromInventoryStatus = fromInventoryStatus.value
+ item.toInventoryStatus = toInventoryStatus.value
+ })
try {
if (formType === 'create') {
+ console.log(data)
await InventorychangeRequestMainApi.createInventorychangeRequestMain(data)
message.success(t('common.createSuccess'))
} else {
@@ -325,7 +402,7 @@ const handleImport = () => {
// 导入附件弹窗所需的参数
const importTemplateData = reactive({
templateUrl: '',
- templateTitle: '库存修改申请主导入模版.xlsx'
+ templateTitle: '库存修改申请导入模版.xlsx'
})
// 导入成功之后
diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts
index f03e461ce..2cd85c9ad 100644
--- a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts
+++ b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts
@@ -5,6 +5,9 @@ import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
+import * as ItembasicApi from '@/api/wms/itembasic'
+import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
+
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@@ -345,8 +348,34 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive