陈薪名 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

@ -59,3 +59,33 @@ 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 })
}

5
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' })
}

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

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

4
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'}), //

50
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 {

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'
//
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'
})
//

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 { 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<CrudSchema[]
table: {
width: 150
},
tableForm: {
disabled: true
tableForm:{
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: {
type: 'Select'
},
isTableForm: false,
isForm: false,
},
{
@ -580,6 +608,7 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
tableForm: {
type: 'Select'
},
isTableForm: false,
},
{
label: '库位组代码',

Loading…
Cancel
Save