liuchen864 11 months ago
parent
commit
fbf1f44336
  1. 12
      src/api/wms/containerMain/index.ts
  2. 10
      src/views/wms/inventoryManage/container/containerMain.data.ts
  3. 4
      src/views/wms/inventoryManage/containerinit/containerRepair/containerRepairRecordMain.data.ts
  4. 10
      src/views/wms/inventoryManage/containerinit/containerinitadd/containerMain.data.ts
  5. 46
      src/views/wms/inventoryManage/containerinit/containerinitadd/index.vue
  6. 10
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts

12
src/api/wms/containerMain/index.ts

@ -48,4 +48,14 @@ export const exportContainerMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/container-main/get-import-template' })
}
}
// 器具维修
export const repairSubmitContainerRequestMain = async (id) => {
return await request.put({ url: `/wms/container-main/repair?id=` + id })
}
// 器具报废
export const scrapSubmitContainerRequestMain = async (id) => {
return await request.put({ url: `/wms/container-main/scrap?id=` + id })
}

10
src/views/wms/inventoryManage/container/containerMain.data.ts

@ -30,8 +30,12 @@ export const ContainerMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
},
{
label: '状态',
field: 'status',
label: '器具状态',
field: 'containerStatus',
dictType: DICT_TYPE.CONTAINER_STATUS,
dictClass: 'string',
isTable: true,
isForm: true,
sort: 'custom',
isSearch: true,
},
@ -140,4 +144,4 @@ export const ContainerDetailRules = reactive({
containerContentType: [
{ required: true, message: '请选择内容物类型', trigger: 'change' }
],
})
})

4
src/views/wms/inventoryManage/containerinit/containerRepair/containerRepairRecordMain.data.ts

@ -65,7 +65,9 @@ export const ContainerRepairRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 150
}
},
{
label: '器具号',

10
src/views/wms/inventoryManage/containerinit/containerinitadd/containerMain.data.ts

@ -133,6 +133,16 @@ export const ContainerMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 300,
fixed: 'right'
},
}
]))

46
src/views/wms/inventoryManage/containerinit/containerinitadd/index.vue

@ -144,8 +144,26 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:containerMain:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:containerMain:delete'}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:container-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:container-main:delete'}), //
{
label: '维修',
name: 'repair',
hide: false,
type: 'primary',
color: '',
link: true, //
hasPermi: ''
},
{
label: '报废',
name: 'scrap',
hide: false,
type: 'danger',
color: '',
link: true, //
hasPermi: ''
}
]
// -
@ -154,9 +172,33 @@ const buttonTableClick = async (val, row) => {
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if(val == 'repair'){ //
repairSubmit(row.id)
} else if(val == 'scrap'){ //
scrapSubmit(row.id)
}
}
/** 维修按钮操作 */
const repairSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
await ContainerMainApi.repairSubmitContainerRequestMain(id)
message.success(t('common.submitSuccess'))
await getList()
} catch {}
}
/** 报废按钮操作 */
const scrapSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
await ContainerMainApi.scrapSubmitContainerRequestMain(id)
message.success(t('common.submitSuccess'))
await getList()
} catch {}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {

10
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts

@ -735,8 +735,8 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
// dictType: DICT_TYPE.INVENTORY_STATUS,
// dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
@ -749,7 +749,7 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
},
tableForm: {
disabled: true,
type: 'Select'
// type: 'Select'
}
},
{
@ -1229,8 +1229,8 @@ export const BomDismantle = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
// dictType: DICT_TYPE.INVENTORY_STATUS,
// dictClass: 'string',
isTable: true,
sort: 'custom',
table: {

Loading…
Cancel
Save