ljlong_2630 9 months ago
parent
commit
d6c87ef7e2
  1. 2
      src/utils/dict.ts
  2. 54
      src/utils/disposition/defaultButtons.ts
  3. 14
      src/views/eam/item/countadjustPlan/countadjustPlan.data.ts
  4. 41
      src/views/eam/item/countadjustWork/index.vue
  5. 157
      src/views/eam/item/itemApplyMain/itemApplyMain.data.ts
  6. 16
      src/views/eam/item/itemOrderMain/index.vue
  7. 40
      src/views/eam/item/itemOrderMain/itemOrderMain.data.ts

2
src/utils/dict.ts

@ -289,7 +289,7 @@ export enum DICT_TYPE {
EXECUTION_CYCLE = 'execution_cycle', //模具保养周期
MOLD_EXECUTION_CYCLE = 'mold_execution_cycle', //模具保养周期
GET_ORDER_STATUS = 'get_order_status', //模具保养周期
IS_OPEN = 'is_open', //是否打开
IS_COMPLETE = 'is_complete', //完成/未完成
ITEM_APPLY_STATUS = 'item_apply_status',//备件申领状态
JX_DETAILS_STATUS = 'jx_details_status', //检修明细状态
CLASSIFICATION = 'classification', //检修明细状态

54
src/utils/disposition/defaultButtons.ts

@ -355,6 +355,19 @@ export function mainListOrderCloBtn(option:any) {
})
}
// 完成按钮
export function mainListOrderCOMPLETEBtn(option:any) {
return __defaultBtnOption(option,{
label: '完成',
name: 'mainOrderCOMPLETE',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-订单流程-打开按钮
export function mainListOrderOpeBtn(option:any) {
return __defaultBtnOption(option,{
@ -663,6 +676,47 @@ export function mainListDocumentPrintBtn(option:any) {
hasPermi: ''
})
}
// 主列表-盘点导出
export function mainExport(option:any) {
return __defaultBtnOption(option,{
label: '导出',
name: 'mainExport',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-盘点调整
export function mainAdjust(option:any) {
return __defaultBtnOption(option,{
label: '盘点调整',
name: 'mainAdjust',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-盘点导入
export function mainAdjustImport(option:any) {
return __defaultBtnOption(option,{
label: '导入',
name: 'mainAdjustImport',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-生成到货检验申请
export function mainInspectRequestBtn(option:any) {
return __defaultBtnOption(option,{

14
src/views/eam/item/countadjustPlan/countadjustPlan.data.ts

@ -20,21 +20,15 @@ export const CountadjustPlan = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
},
// {
// label: '盘点类型',
// field: 'classification',
// sort: 'custom',
// isSearch: false,
// },
{
label: '盘点类型',
field: 'type',
sort: 'classification',
field: 'classification',
sort: 'custom',
dictType: DICT_TYPE.CLASSIFICATION,
dictClass: 'string',
isSearch: true,
isSearch: false,
isTable: true,
isForm: true,
table: {
width: 150
},

41
src/views/eam/item/countadjustWork/index.vue

@ -41,13 +41,17 @@
@searchTableSuccessDetail="searchTableSuccessDetail" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/purchase-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :isShowOut="true" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
<ImportForm
ref="importFormRef"
url="/eam/countJobDetail/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { CountJobMain, CountJobMainRules, CountJobDetail, CountJobDetailRules } from './countJobMain.data'
import { CountJobMain, CountJobMainRules, CountJobDetail, CountJobDetailRules } from './countadjustWork.data'
import * as CountJobMainApi from '@/api/eam/item/countJobMain'
import * as CountJobDetailApi from '@/api/eam/item/countJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -156,16 +160,25 @@
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn(null), //
defaultButtons.mainExport(null),//
defaultButtons.mainAdjustImport(null),//
// defaultButtons.mainListEditBtn(null), //
// defaultButtons.mainListDeleteBtn(null), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
}
else if (val == 'mainExport') { //
handleMainExport(row.id)
}
else if (val == 'mainAdjustImport') { //
handleImport()
}
else if (val == 'mainOrderClo') { //
handleClose(row.id)
}
@ -200,6 +213,23 @@
} catch { }
}
/** 列表导出按钮操作 */
const exportLoading = ref(false) //
const handleMainExport = async (id : number) => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await CountJobMainApi.handleMainExport(id)
download.excel(data, '盘点工单.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 关闭按钮操作 */
const handleClose = async (id : number) => {
try {
@ -214,7 +244,6 @@
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//

157
src/views/eam/item/itemApplyMain/itemApplyMain.data.ts

@ -21,13 +21,7 @@ export const ItemApplyMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'left'
},
},
{
label: '申领人',
field: 'applyId',
sort: 'custom',
isForm: false,
isSearch: false,
},
{
label: '审批人',
field: 'approveId',
@ -47,32 +41,17 @@ export const ItemApplyMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'name',
sort: 'custom',
},
{
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.ITEM_APPLY_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
width: 200,
fixed: 'right'
}
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 200,
fixed: 'right'
}
}
}
]))
//表单校验
@ -137,124 +116,6 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
]
},
},
{
label: '类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.DEVICE_MOLD_TYPE,
dictClass: 'string',
isSearch: true,
isTable: true,
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: false
}
},
{
label: '设备/模具编号',
field: 'deviceNumber',
sort: 'custom',
isSearch: true,
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择单号',
searchField: 'number',
searchTitle: '单号信息',
searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类
searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: "TRUE",
isMainValue: false
}, {
key: 'type',
value: "type",
isMainValue: true
}
]
},
},
{
label: '申领数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
label: '库存数量',
field: 'currentQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isTable: true,
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
}
},
{
label: '是否以旧换新',
field: 'isRadeIn',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isTable: true,
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
}
},
{
label: '备注',
field: 'remark',

16
src/views/eam/item/itemOrderMain/index.vue

@ -146,7 +146,7 @@
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.available) > -1) {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
@ -156,7 +156,7 @@
// -
const butttondata = (row) => {
return [
defaultButtons.mainListOrderCloBtn({ hide: isShowMainButton(row, ['OPEN']) }), //
defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), //
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn(null), //
]
@ -167,8 +167,8 @@
if (val == 'edit') { //
openForm('update', row)
}
else if (val == 'mainOrderClo') { //
handleClose(row.id)
else if (val == 'mainOrderCOMPLETE') { //
handleCOMPLETE(row.id)
}
else if (val == 'delete') { //
handleDelete(row.id)
@ -201,14 +201,14 @@
} catch { }
}
/** 关闭按钮操作 */
const handleClose = async (id : number) => {
/** 完成按钮操作 */
const handleCOMPLETE = async (id : number) => {
try {
//
await message.confirm('是否关闭所选中数据?')
await message.confirm('是否完成所选中数据?')
//
await ItemOrderMainApi.closeItemOrderMain(id)
message.success(t('关闭成功!'))
message.success(t('完成成功!'))
//
await getList()
} catch { }

40
src/views/eam/item/itemOrderMain/itemOrderMain.data.ts

@ -41,23 +41,11 @@ export const ItemOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false,
isSearch: false,
},
{
label: '接收备件状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.GET_ORDER_STATUS,
dictClass: 'string',
isTable: true,
isForm: false,
tableForm: {
type: 'Select'
}
},
{
label: '状态',
field: 'available',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.IS_OPEN,
dictType: DICT_TYPE.IS_COMPLETE,
dictClass: 'string',
isTable: true,
isForm: true,
@ -108,29 +96,9 @@ export const ItemOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
]
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
label: '库存数量',
field: 'currentQty',
field: 'qty',
sort: 'custom',
table: {
width: 150
@ -164,8 +132,6 @@ export const ItemOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true
}
},
{
label: '是否以旧换新',
field: 'isRadeIn',

Loading…
Cancel
Save