|
|
@ -1,41 +1,45 @@ |
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
|
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' |
|
|
|
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' |
|
|
|
const { t } = useI18n() // 国际化
|
|
|
|
import * as getRequestsettingApi from '@/api/wms/requestsetting/index' |
|
|
|
import { PurchasereceiptRecordDetail,PurchasereceiptRecordMain } from '../../purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data' |
|
|
|
import { |
|
|
|
PurchasereceiptRecordDetail, |
|
|
|
PurchasereceiptRecordMain |
|
|
|
} from '../../purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data' |
|
|
|
import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail' |
|
|
|
import { Supplier } from "@/views/wms/basicDataManage/supplierManage/supplier/supplier.data"; |
|
|
|
import * as SupplierApi from "@/api/wms/supplier"; |
|
|
|
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' |
|
|
|
import * as SupplierApi from '@/api/wms/supplier' |
|
|
|
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' |
|
|
|
import * as ItemPackageApi from '@/api/wms/itempackage/index' |
|
|
|
import * as LocationApi from "@/api/wms/location"; |
|
|
|
import {Location} from "@/views/wms/basicDataManage/factoryModeling/location/location.data"; |
|
|
|
import * as LocationApi from '@/api/wms/location' |
|
|
|
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' |
|
|
|
import * as BalanceApi from '@/api/wms/balance' |
|
|
|
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' |
|
|
|
|
|
|
|
|
|
|
|
import * as InspectionQ2Api from '@/api/qms/inspectionQ2' |
|
|
|
import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data' |
|
|
|
|
|
|
|
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
|
|
|
|
const queryParams = { |
|
|
|
pageSize:10, |
|
|
|
pageNo:1, |
|
|
|
code:'PurchaseReturnRequest' |
|
|
|
pageSize: 10, |
|
|
|
pageNo: 1, |
|
|
|
code: 'PurchaseReturnRequest' |
|
|
|
} |
|
|
|
const data = await getRequestsettingApi.getRequestsettingPage(queryParams) |
|
|
|
const requestsettingData =data?.list[0]||{} |
|
|
|
|
|
|
|
// 获取当前操作人的部门
|
|
|
|
import { useUserStore } from '@/store/modules/user' |
|
|
|
import { TableColumn } from '@/types/table' |
|
|
|
const userStore = useUserStore() |
|
|
|
const userDept = userStore.userSelfInfo.dept |
|
|
|
// id 转str 否则form回显匹配不到
|
|
|
|
userDept.id = userDept.id.toString() |
|
|
|
const userDeptArray:any = [userDept] |
|
|
|
const data = await getRequestsettingApi.getRequestsettingPage(queryParams) |
|
|
|
const requestsettingData = data?.list[0] || {} |
|
|
|
|
|
|
|
// 获取当前操作人的部门
|
|
|
|
import { useUserStore } from '@/store/modules/user' |
|
|
|
import { TableColumn } from '@/types/table' |
|
|
|
const userStore = useUserStore() |
|
|
|
const userDept = userStore.userSelfInfo.dept |
|
|
|
// id 转str 否则form回显匹配不到
|
|
|
|
userDept.id = userDept.id.toString() |
|
|
|
const userDeptArray: any = [userDept] |
|
|
|
|
|
|
|
// 采购收货记录展示列
|
|
|
|
export const PurchasereceiptRecordMain1 = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
export const PurchasereceiptRecordMain1 = useCrudSchemas( |
|
|
|
reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '物料代码', |
|
|
|
field: 'itemCode', |
|
|
@ -80,7 +84,7 @@ export const PurchasereceiptRecordMain1 = useCrudSchemas(reactive<CrudSchema[]>( |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
@ -89,17 +93,17 @@ export const PurchasereceiptRecordMain1 = useCrudSchemas(reactive<CrudSchema[]>( |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '批次', // 实际是子表的从批次,为了不影响页面,单独放上面
|
|
|
|
field: 'fromBatch', |
|
|
|
sort: 'custom', |
|
|
|
isForm:false, |
|
|
|
isTableForm:false, |
|
|
|
isForm: false, |
|
|
|
isTableForm: false, |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '计量单位', |
|
|
@ -110,7 +114,7 @@ export const PurchasereceiptRecordMain1 = useCrudSchemas(reactive<CrudSchema[]>( |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
// {
|
|
|
|
// label: '包装规格',
|
|
|
@ -137,16 +141,16 @@ export const PurchasereceiptRecordMain1 = useCrudSchemas(reactive<CrudSchema[]>( |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
])) |
|
|
|
} |
|
|
|
} |
|
|
|
]) |
|
|
|
) |
|
|
|
|
|
|
|
/** |
|
|
|
* @returns {Array} 采购退货申请主表 |
|
|
|
*/ |
|
|
|
export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
export const PurchasereturnRequestMain = useCrudSchemas( |
|
|
|
reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '单据号', |
|
|
|
field: 'number', |
|
|
@ -156,7 +160,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
fixed: 'left' |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
isSearch: true, |
|
|
|
isSearch: true |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '状态', |
|
|
@ -165,12 +169,12 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
dictClass: 'string', |
|
|
|
isSearch: true, |
|
|
|
isTable: true, |
|
|
|
isForm:false, |
|
|
|
isForm: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
sortTableDefault:1, |
|
|
|
sortTableDefault: 1, |
|
|
|
form: { |
|
|
|
value: '1', |
|
|
|
componentProps: { |
|
|
@ -185,10 +189,10 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
sortTableDefault:1, |
|
|
|
sortTableDefault: 1, |
|
|
|
isSearch: true, |
|
|
|
form:{ |
|
|
|
componentProps:{ |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
enterSearch: true, |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
|
|
|
@ -196,14 +200,16 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
searchTitle: '供应商信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
|
|
|
|
verificationParams: [{ |
|
|
|
verificationParams: [ |
|
|
|
{ |
|
|
|
key: 'code', |
|
|
|
action: '==', |
|
|
|
value: '', |
|
|
|
isMainValue: false, |
|
|
|
isSearch: true, |
|
|
|
isFormModel: true, |
|
|
|
}], // 失去焦点校验参数
|
|
|
|
isFormModel: true |
|
|
|
} |
|
|
|
] // 失去焦点校验参数
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -218,7 +224,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
// labelMessage: '信息提示说明!!!',
|
|
|
|
componentProps: { |
|
|
|
enterSearch: true, |
|
|
|
disabled:true, |
|
|
|
disabled: true, |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择采购收货记录单号', // 输入框占位文本
|
|
|
|
searchField: 'number', // 查询弹窗赋值字段
|
|
|
@ -230,15 +236,18 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
key: 'supplierCode', |
|
|
|
value: 'supplierCode', |
|
|
|
isMainValue: true |
|
|
|
}], |
|
|
|
verificationParams: [{ |
|
|
|
} |
|
|
|
], |
|
|
|
verificationParams: [ |
|
|
|
{ |
|
|
|
key: 'number', |
|
|
|
action: '==', |
|
|
|
value: '', |
|
|
|
isMainValue: false, |
|
|
|
isSearch: true, |
|
|
|
isFormModel: true, |
|
|
|
}], // 失去焦点校验参数
|
|
|
|
isFormModel: true |
|
|
|
} |
|
|
|
] // 失去焦点校验参数
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -250,7 +259,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
width: 180 |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
sortTableDefault:2 |
|
|
|
sortTableDefault: 2 |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '要货计划单号', |
|
|
@ -260,7 +269,57 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
width: 180 |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
isTable: false, |
|
|
|
isTable: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'Q2通知单号', |
|
|
|
field: 'q2Number', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
isDetail: true, |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
// labelMessage: '信息提示说明!!!',
|
|
|
|
componentProps: { |
|
|
|
enterSearch: true, |
|
|
|
// multiple: true,
|
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择Q2通知单号', // 输入框占位文本
|
|
|
|
searchField: 'number', // 查询弹窗赋值字段
|
|
|
|
searchTitle: 'Q2通知单号', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Q2.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: InspectionQ2Api.getQ2Page, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [ |
|
|
|
{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: 'status', |
|
|
|
value: '0', |
|
|
|
isMainValue: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: 'supplierCode', |
|
|
|
value: 'supplierCode', |
|
|
|
isMainValue: true |
|
|
|
} |
|
|
|
], |
|
|
|
verificationParams: [ |
|
|
|
{ |
|
|
|
key: 'number', |
|
|
|
action: '==', |
|
|
|
value: '', |
|
|
|
isMainValue: false, |
|
|
|
isSearch: true, |
|
|
|
isFormModel: true |
|
|
|
} |
|
|
|
] // 失去焦点校验参数
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '承运商', |
|
|
@ -269,7 +328,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isTable: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '运输方式', |
|
|
@ -280,7 +339,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isTable: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '车牌号', |
|
|
@ -289,7 +348,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isTable: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '从仓库代码', |
|
|
@ -299,7 +358,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
isTable: false, |
|
|
|
isTable: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '到仓库代码', |
|
|
@ -308,9 +367,9 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTableForm:false, |
|
|
|
isTableForm: false, |
|
|
|
isForm: false, |
|
|
|
isTable: false, |
|
|
|
isTable: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '从库区类型范围', |
|
|
@ -322,7 +381,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
isForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '到库区类型范围', |
|
|
@ -334,8 +393,8 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTableForm:false, |
|
|
|
isForm: false, |
|
|
|
isTableForm: false, |
|
|
|
isForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '从库区代码范围', |
|
|
@ -345,7 +404,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
isTable: false, |
|
|
|
isTable: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '到库区代码范围', |
|
|
@ -356,7 +415,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
isTable: false, |
|
|
|
isTableForm:false, |
|
|
|
isTableForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '从月台代码', |
|
|
@ -366,8 +425,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
isTable: false, |
|
|
|
|
|
|
|
isTable: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '业务类型', |
|
|
@ -383,7 +441,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
} |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
isTable: false, |
|
|
|
isTable: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '申请时间', |
|
|
@ -399,14 +457,14 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width:'100%'}, |
|
|
|
style: { width: '100%' }, |
|
|
|
type: 'datetime', |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x', |
|
|
|
valueFormat: 'x' |
|
|
|
} |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
isTable: false, |
|
|
|
isTable: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '截止时间', |
|
|
@ -423,18 +481,18 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width:'100%'}, |
|
|
|
style: { width: '100%' }, |
|
|
|
type: 'datetime', |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x', |
|
|
|
valueFormat: 'x' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '部门', |
|
|
|
field: 'departmentCode', |
|
|
|
sort: 'custom', |
|
|
|
isForm:false, |
|
|
|
isForm: false, |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
@ -463,7 +521,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isTable: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '创建时间', |
|
|
@ -474,15 +532,15 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
}, |
|
|
|
formatter: dateFormatter, |
|
|
|
detail: { |
|
|
|
dateFormat : 'YYYY-MM-DD HH:mm:ss' |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width:'100%'}, |
|
|
|
style: { width: '100%' }, |
|
|
|
type: 'datetime', |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x', |
|
|
|
valueFormat: 'x' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -512,10 +570,10 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width:'100%'}, |
|
|
|
style: { width: '100%' }, |
|
|
|
type: 'datetime', |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x', |
|
|
|
valueFormat: 'x' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -535,7 +593,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', |
|
|
|
isTable: false, |
|
|
|
isForm:false, |
|
|
|
isForm: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
@ -556,7 +614,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', |
|
|
|
isTable: false, |
|
|
|
isForm:false, |
|
|
|
isForm: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
@ -577,7 +635,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', |
|
|
|
isTable: false, |
|
|
|
isForm:false, |
|
|
|
isForm: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
@ -621,9 +679,10 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
table: { |
|
|
|
width: 300, |
|
|
|
fixed: 'right' |
|
|
|
}, |
|
|
|
} |
|
|
|
])) |
|
|
|
} |
|
|
|
]) |
|
|
|
) |
|
|
|
|
|
|
|
//表单校验
|
|
|
|
export const PurchasereturnRequestMainRules = reactive({ |
|
|
|