陈薪名 12 months ago
parent
commit
445051dc7c
  1. 30
      src/api/wms/inventorychangeRequestMain/index.ts
  2. 5
      src/api/wms/labeltype/index.ts
  3. 23
      src/views/wms/basicDataManage/labelManage/labeltype/index.vue
  4. 4
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
  5. 50
      src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/index.vue
  6. 123
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue
  7. 35
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts

30
src/api/wms/inventorychangeRequestMain/index.ts

@ -58,4 +58,34 @@ export const exportInventorychangeRequestMain = async (params) => {
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/inventorychange-request-main/get-import-template' }) 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 })
} }

5
src/api/wms/labeltype/index.ts

@ -56,8 +56,3 @@ export const deleteLabeltype = async (id: number) => {
export const exportLabeltype = async (params) => { export const exportLabeltype = async (params) => {
return await request.download({ url: `/wms/labeltype/export-excel`, params }) return await request.download({ url: `/wms/labeltype/export-excel`, params })
} }
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/labeltype/get-import-template' })
}

23
src/views/wms/basicDataManage/labelManage/labeltype/index.vue

@ -54,9 +54,7 @@
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Labeltype.allSchemas" /> <Detail ref="detailRef" :isBasic="true" :allSchemas="Labeltype.allSchemas" />
<!-- 导入 --> </template>
<ImportForm ref="importFormRef" url="/wms/labeltype/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
@ -64,7 +62,6 @@ import { Labeltype,LabeltypeRules } from './labeltype.data'
import * as LabeltypeApi from '@/api/wms/labeltype' import * as LabeltypeApi from '@/api/wms/labeltype'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'Labeltype' }) defineOptions({ name: 'Labeltype' })
@ -121,8 +118,6 @@ const HeadButttondata = [
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') { //
openForm('create') openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { // } else if (val == 'export') { //
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') { //
@ -211,21 +206,6 @@ const handleExport = async () => {
} }
} }
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '标签定义导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {
@ -238,7 +218,6 @@ const searchFormClick = (searchData) => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await LabeltypeApi.importTemplate()
}) })
</script> </script>

4
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue

@ -215,8 +215,8 @@ const isShowMainButton = (row,val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:deliver-request-main:close'}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:deliver-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:deliver-request-main:reAdd'}), // 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.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:deliver-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:deliver-request-main:refused'}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:deliver-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:deliver-request-main:agree'}), // defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:deliver-request-main:agree'}), //

50
src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/index.vue

@ -78,6 +78,10 @@ const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(InventorychangeRecordMain.allSchemas.tableColumns) const tableColumns = ref(InventorychangeRecordMain.allSchemas.tableColumns)
console.log(99 , routeName.value)
const fromInventoryStatus = ref()
const toInventoryStatus = ref()
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
@ -87,13 +91,55 @@ const { tableObject, tableMethods } = useTable({
getListApi: InventorychangeRecordMainApi.getInventorychangeRecordMainPage // 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 { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi:'wms:inventorychange-record-main:export'}), // defaultButtons.defaultExportBtn({hasPermi:'wms:inventorychange-record-main:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn({hasPermi:'wms:inventorychange-record-main:page'}), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
// { // {
@ -141,7 +187,7 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const data = await InventorychangeRecordMainApi.exportInventorychangeRecordMain(setSearchParams) const data = await InventorychangeRecordMainApi.exportInventorychangeRecordMain(tableObject.params)
download.excel(data, '库存修改记录主.xlsx') download.excel(data, '库存修改记录主.xlsx')
} catch { } catch {
} finally { } finally {

123
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' 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 message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
@ -107,16 +119,39 @@ const { tableObject, tableMethods } = useTable({
*/ */
if ( routeName.value == 'OktoholdRequestMain') { if ( routeName.value == 'OktoholdRequestMain') {
tableObject.params = { tableObject.params = {
fromInventoryStatus: 'OK' fromInventoryStatus: 'OK',
toInventoryStatus:'HOLD'
} }
fromInventoryStatus.value = 'OK' fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "HODxxx" toInventoryStatus.value = "HOLD"
} else if ( routeName.value == 'xxxx') { } else if ( routeName.value == 'HoldtookRequestMain') {
tableObject.params = { tableObject.params = {
fromInventoryStatus: 'xxx' fromInventoryStatus: 'HOLD',
toInventoryStatus:'OK'
} }
fromInventoryStatus.value = 'xxx' fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "xxx" 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) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:inventorychange-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:inventorychange-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventorychange-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorychange-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorychange-request-main:agree'}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:inventorychange-request-main:update'}), // defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:inventorychange-request-main:handle'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:inventorychange-request-main:delete'}), // 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) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // 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') { // } 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') { // } 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') { // } 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') { // } 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') { // } else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
@ -270,7 +344,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await InventorychangeRequestMainApi.exportInventorychangeRequestMain(tableObject.params) const data = await InventorychangeRequestMainApi.exportInventorychangeRequestMain(tableObject.params)
download.excel(data, '库存修改申请.xlsx') download.excel(data, '库存修改申请.xlsx')
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -298,10 +372,13 @@ const handleDeleteTable = (item, index) => {
// //
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
data.subList = tableData.value // data.subList = tableData.value //
data.fromInventoryStatus = fromInventoryStatus.value data.subList.forEach(item => {
data.toInventoryStatus = toInventoryStatus.value item.fromInventoryStatus = fromInventoryStatus.value
item.toInventoryStatus = toInventoryStatus.value
})
try { try {
if (formType === 'create') { if (formType === 'create') {
console.log(data)
await InventorychangeRequestMainApi.createInventorychangeRequestMain(data) await InventorychangeRequestMainApi.createInventorychangeRequestMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {
@ -325,7 +402,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '库存修改申请导入模版.xlsx' templateTitle: '库存修改申请导入模版.xlsx'
}) })
// //

35
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 * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' 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() // 国际化 const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -345,8 +348,34 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
table: { table: {
width: 150 width: 150
}, },
tableForm: { tableForm:{
disabled: true isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物品代码',
searchField: 'code',
searchTitle: '物品基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择物品代码',
searchField: 'code',
searchTitle: '物品基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
} }
}, },
{ {
@ -536,7 +565,6 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
tableForm: { tableForm: {
type: 'Select' type: 'Select'
}, },
isTableForm: false,
isForm: false, isForm: false,
}, },
{ {
@ -580,6 +608,7 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
tableForm: { tableForm: {
type: 'Select' type: 'Select'
}, },
isTableForm: false,
}, },
{ {
label: '库位组代码', label: '库位组代码',

Loading…
Cancel
Save