diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/index.vue
new file mode 100644
index 000000000..51d50f124
--- /dev/null
+++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/index.vue
@@ -0,0 +1,1148 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.number }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMOrderTypeMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMOrderTypeMain.data.ts
new file mode 100644
index 000000000..517345987
--- /dev/null
+++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMOrderTypeMain.data.ts
@@ -0,0 +1,1689 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
+import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
+import * as SupplierApi from '@/api/wms/supplier'
+import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
+import * as PurchaseMainApi from '@/api/wms/purchaseMain'
+import * as PurchaseDetailApi from '@/api/wms/purchaseDetail'
+import * as LocationApi from '@/api/wms/location'
+import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
+import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
+import * as ItemPackageApi from '@/api/wms/itempackage/index'
+import { PurchaseDetail, PurchaseMain } from '../../supplierdeliver/purchaseMain/purchaseMain.data'
+import { useUserStore } from '@/store/modules/user'
+
+
+const { t } = useI18n() // 国际化
+// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
+const queryParams = {
+ pageSize:10,
+ pageNo:1,
+ code:'PurchaseReceiptRequest'
+}
+const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
+const requestsettingData =data?.list[0]||{}
+
+
+// 获取当前操作人的部门
+const userStore = useUserStore()
+const userDept = userStore.userSelfInfo.dept
+// id 转str 否则form回显匹配不到
+userDept.id = userDept.id.toString()
+const userDeptArray:any = [userDept]
+
+/**
+ * @returns {Array} 采购收货申请主表
+ */
+export const PurchasereceiptRequestMain = useCrudSchemas(reactive([
+ {
+ label: '采购订单号',
+ field: 'poNumber',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isSearch:true,
+ sortTableDefault:4,
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ enterSearch: true,
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择采购订单', // 输入框占位文本
+ searchField: 'number', // 查询弹窗赋值字段
+ searchTitle: '采购订单信息', // 查询弹窗标题
+ isConcatDetailSchemas:true,//是否是主子表合并 默认false
+ searchDetailSchemas:PurchaseDetail.allSchemas,
+ searchAllSchemas: PurchaseMain.allSchemas, // 查询弹窗所需类
+ searchPage: PurchaseDetailApi.getPurchaseDetailPageWMS, // 查询弹窗所需分页方法
+ isEnter:true,
+ searchCondition: [{
+ key:'status',
+ value:'2',
+ message: '已发布状态',
+ isMainValue: false
+ },
+ {
+ key: 'status', // 查询列表中字段
+ value: '2', // 指查询具体值
+ action: '==', // 查询拼接条件
+ isSearch: true, // 使用自定义拼接条件
+ isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
+ }],
+ verificationParams: [{
+ key: 'number',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ }
+ },
+ isForm: true,
+ },
+]))
+
+//表单校验
+export const PurchasereceiptRequestMainRules = reactive({
+ poNumber: [
+ { required: true, message: '请选择采购订单号', trigger: 'blur' }
+ ]
+})
+
+/**
+ * @returns {Array} 采购收货申请子表
+ */
+export const PurchasereceiptRequestDetail = useCrudSchemas(reactive([
+
+ {
+ label: '订单号',
+ field: 'poNumber',
+ hiddenInMain:true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:5,
+ tableForm:{
+ isInpuFocusShow: true,
+ searchListPlaceholder: '请选择订单号',
+ searchField: 'number',
+ searchTitle: '采购订单信息',
+ isConcatDetailSchemas:true,//是否是主子表合并 默认false
+ searchDetailSchemas:PurchaseDetail.allSchemas,
+ searchAllSchemas: PurchaseMain.allSchemas,
+ searchPage: PurchaseDetailApi.getPurchaseDetailPageWMS,
+ searchCondition: [
+ {
+ key:'number',
+ value:'poNumber',
+ action: '==', // 查询拼接条件
+ isSearch: true, // 使用自定义拼接条件
+ isFormModel:true,
+ required:true,
+ message:'请选择采购订单号',
+ isMainValue: false
+ },
+ {
+ key: 'status', // 查询列表中字段
+ value: '2', // 指查询具体值
+ action: '==', // 查询拼接条件
+ isSearch: true, // 使用自定义拼接条件
+ isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
+ }]
+ },
+ form: {
+ labelMessage: '该订单号会影响订单行的选择',
+ componentProps: {
+ isSearchList: true,
+ searchListPlaceholder: '请选择订单号',
+ searchField: 'number',
+ searchTitle: '采购订单信息',
+ searchDetailSchemas:PurchaseDetail.allSchemas,
+ searchAllSchemas: PurchaseMain.allSchemas,
+ searchPage: PurchaseDetailApi.getPurchaseDetailPageWMS,
+ searchCondition: [{
+ key:'supplierCode',
+ value:'supplierCode',
+ message: '请选择供应商!',
+ isMainValue: true
+ }]
+ }
+ }
+ },
+ {
+ label: '订单类型',
+ field: 'type',
+ dictType: DICT_TYPE.WORK_ORDER_TYPE,
+ dictClass: 'string',
+ isSearch: false,
+ isTable: false,
+ isTableForm: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ isForm: false,
+ },
+ {
+ label: '订单行',
+ field: 'poLine',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:5,
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择订单行', // 输入框占位文本
+ searchField: 'lineNumber', // 查询弹窗赋值字段
+ searchTitle: '订单信息', // 查询弹窗标题
+ searchAllSchemas: PurchaseDetail.allSchemas, // 查询弹窗所需类
+ searchPage: PurchaseDetailApi.getPurchaseDetailPage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key:'number',
+ value:'poNumber',
+ message: '请填写订单号!',
+ isMainValue: true
+ }]
+ }
+ },
+ tableForm:{
+ multiple:true,
+ isInpuFocusShow: true,
+ searchListPlaceholder: '请选择订单行', // 输入框占位文本
+ searchField: 'lineNumber', // 查询弹窗赋值字段
+ searchTitle: '订单信息', // 查询弹窗标题
+ searchAllSchemas: PurchaseDetail.allSchemas, // 查询弹窗所需类
+ searchPage: PurchaseDetailApi.getPurchaseDetailPage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key:'number',
+ value:'poNumber',
+ message: '请填写订单号!',
+ isMainValue: true
+ }]
+ }
+ },
+ {
+ label: '行类型',
+ field: 'poLineType',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ sortTableDefault:5,
+ hiddenInMain:true,
+ isForm: false,
+ tableForm:{
+ disabled: true
+ }
+ },
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch:true,
+ sortTableDefault:6,
+ tableForm:{
+ disabled: true
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+
+ {
+ label: '订单数量',
+ field: 'orderQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 1,
+ precision: 6
+ },
+ },
+ hiddenInMain: true,
+ sortTableDefault:9,
+ tableForm: {
+ disabled:true,
+ type: 'InputNumber',
+ min: 1,
+ precision: 6
+ }
+ },
+ {
+ label: '收货数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:9,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 1,
+ precision: 6
+ },
+ },
+ tableForm: {
+ disabled: true,
+ type: 'InputNumber',
+ min: 1,
+ precision: 6
+ }
+ },
+ {
+ label: '退货数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:9,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 1,
+ precision: 6
+ },
+ },
+ tableForm: {
+ type: 'InputNumber',
+ min: 1,
+ precision: 6
+ }
+ },
+ {
+ label: '计量单位',
+ field: 'uom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:10,
+ tableForm: {
+ type: 'Select',
+ disabled: true
+ }
+ },
+ {
+ label: '到库位代码',
+ field: 'defaultToLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:13,
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ enterSearch: true,
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择库位代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '库位信息', // 查询弹窗标题
+ searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
+ searchPage: LocationApi.selectBusinessTypeToLocation, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ },{
+ key: 'businessType',
+ value: 'PurchaseReceipt',
+ isMainValue: false
+ },{
+ key: 'isIn',
+ value: 'in',
+ isMainValue: false
+ }],
+ verificationParams: [{
+ key: 'code',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ }
+ },
+ tableForm: {
+ enterSearch: true,
+ isInpuFocusShow: true,
+ searchListPlaceholder: '请选择库位代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '库位信息', // 查询弹窗标题
+ searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
+ searchPage: LocationApi.selectBusinessTypeToLocation, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ },{
+ key: 'businessType',
+ value: 'PurchaseReceipt',
+ isMainValue: false
+ },{
+ key: 'isIn',
+ value: 'in',
+ isMainValue: false
+ }],
+ isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据
+ verificationParams: [{
+ key: 'code',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ },
+ isTableForm: true,
+ isForm: false
+ },
+ {
+ label: '到货日期',
+ field: 'arriveDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ sortTableDefault:11,
+ hiddenInMain:true,
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ tableForm:{
+ type:'FormDate',
+ placeholder: '请选择到货日期',
+ valueFormat: 'x',
+ },
+ },
+ {
+ label: '生产日期',
+ field: 'produceDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ hiddenInMain:true,
+ sortTableDefault:11,
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ tableForm:{
+ type:'FormDate',
+ placeholder: '请选择生产日期',
+ valueFormat: 'x',
+ },
+ },
+ {
+ label: '批次',
+ field: 'batch',
+ sort: 'custom',
+ sortTableDefault:8,
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled: true
+ }
+ },
+ {
+ label: '过期日期',
+ field: 'expireDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ sortTableDefault:11,
+ table: {
+ width: 180
+ },
+ isTable:true,
+ hiddenInMain:true,
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ // tableForm:{
+ // type:'FormDate',
+ // placeholder: '请选择过期日期',
+ // valueFormat: 'x',
+ // },
+ tableForm:{
+ type: 'slot',
+ disabled: true
+ }
+ },
+ {
+ label: '备注',
+ field: 'remark',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ hiddenInMain:true,
+ },
+]))
+
+//表单校验
+export const PurchasereceiptRequestDetailRules = reactive({
+ batch: [
+ { required: true, message: '请输入批次', trigger: 'blur' }
+ ],
+ produceDate: [
+ { required: true, message: '请输入生产日期', trigger: 'change' }
+ ],
+ arriveDate: [
+ { required: true, message: '请输入到货日期', trigger: 'change' }
+ ],
+ expireDate: [
+ { required: true, message: '请输入过期日期', trigger: 'change' }
+ ],
+ packQty: [
+ { required: true, message: '请输入包装数量', trigger: 'change' }
+ ],
+ poNumber: [
+ { required: true, message: '请输入订单号', trigger: 'change' }
+ ],
+ poLine: [
+ { required: true, message: '请输入订单行', trigger: 'change' }
+ ],
+ packUnit: [
+ { required: true, message: '请选择包装规格', trigger: 'change' }
+ ],
+ convertRate: [
+ { required: true, message: '请输入转换率', trigger: 'blur' }
+ ],
+ inventoryStatus: [
+ { required: true, message: '请选择库存状态', trigger: 'change' }
+ ],
+ itemCode: [
+ { required: true, message: '请输入物料代码', trigger: 'change' }
+ ],
+})
+
+/**
+ * @returns {Array} 采购收货申请子表--子包装号
+ */
+export const PurchasereceiptRequestDetailPackingNumber = useCrudSchemas(reactive([
+ {
+ label: '包装号',
+ field: 'packingNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false,
+ form: {
+ componentProps: {
+ disabled:true
+ }
+ },
+ tableForm: {
+ disabled: true,
+ }
+ },
+ {
+ label: '订单号',
+ field: 'poNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true,
+ isInpuFocusShow: false,
+ searchListPlaceholder: '请选择订单号',
+ searchField: 'number',
+ searchTitle: '采购订单信息',
+ searchAllSchemas: PurchaseMain.allSchemas,
+ searchPage: PurchaseMainApi.getPurchaseMainPage,
+ searchCondition: [{
+ key:'supplierCode',
+ value:'supplierCode',
+ message: '请选择供应商!',
+ isMainValue: true
+ }]
+ },
+ form: {
+ labelMessage: '该订单号会影响订单行的选择',
+ componentProps: {
+ disabled:true,
+ isSearchList: false,
+ searchListPlaceholder: '请选择订单号',
+ searchField: 'number',
+ searchTitle: '采购订单信息',
+ searchAllSchemas: PurchaseMain.allSchemas,
+ searchPage: PurchaseMainApi.getPurchaseMainPage,
+ searchCondition: [{
+ key:'supplierCode',
+ value:'supplierCode',
+ message: '请选择供应商!',
+ isMainValue: true
+ }]
+ }
+ }
+ },
+ {
+ label: '订单行',
+ field: 'poLine',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ disabled:true,
+ isSearchList: false, // 开启查询弹窗
+ searchListPlaceholder: '请选择订单行', // 输入框占位文本
+ searchField: 'lineNumber', // 查询弹窗赋值字段
+ searchTitle: '订单信息', // 查询弹窗标题
+ searchAllSchemas: PurchaseDetail.allSchemas, // 查询弹窗所需类
+ searchPage: PurchaseDetailApi.getPurchaseDetailPage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key:'number',
+ value:'poNumber',
+ message: '请填写订单号!',
+ isMainValue: true
+ }]
+ }
+ },
+ tableForm:{
+ disabled:true,
+ isInpuFocusShow: false,
+ searchListPlaceholder: '请选择订单行', // 输入框占位文本
+ searchField: 'lineNumber', // 查询弹窗赋值字段
+ searchTitle: '订单信息', // 查询弹窗标题
+ searchAllSchemas: PurchaseDetail.allSchemas, // 查询弹窗所需类
+ searchPage: PurchaseDetailApi.getPurchaseDetailPage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key:'number',
+ value:'poNumber',
+ message: '请填写订单号!',
+ isMainValue: true
+ }]
+ }
+ },
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled: true
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '物料名称',
+ field: 'itemName',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '物料描述1',
+ field: 'itemDesc1',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '物料描述2',
+ field: 'itemDesc2',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ // {
+ // label: '器具号',
+ // field: 'containerNumber',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isTableForm: false,
+ // isForm: false
+ // },
+ {
+ label: '数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 1,
+ precision: 6
+ },
+ },
+ tableForm: {
+ disabled: true,
+ type: 'InputNumber',
+ min: 1,
+ precision: 6
+ }
+ },
+ {
+ label: '计量单位',
+ field: 'uom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ type: 'Select',
+ disabled: true
+ }
+ },
+ {
+ label: '从库位代码',
+ field: 'fromLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false,
+ form: {
+ componentProps: {
+ disabled:true
+ }
+ },
+ tableForm: {
+ disabled: true,
+ }
+ },
+ {
+ label: '默认到库位代码',
+ field: 'defaultToLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择库位代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '库位信息', // 查询弹窗标题
+ searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
+ searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }]
+ }
+ },
+ tableForm:{
+ disabled: true,
+ isInpuFocusShow: false,
+ searchListPlaceholder: '请选择库位代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '库位信息', // 查询弹窗标题
+ searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
+ searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }]
+ },
+ isTableForm: true,
+ isForm: false
+ },
+ {
+ label: '生产日期',
+ field: 'produceDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ disabled:true,
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ tableForm:{
+ disabled: true,
+ type:'FormDate',
+ placeholder: '请选择生产日期',
+ valueFormat: 'x',
+ },
+ },
+ {
+ label: '批次',
+ field: 'batch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled: true
+ }
+ },
+ // {
+ // label: '替代批次',
+ // field: 'altBatch',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isTableForm: false,
+ // isForm: false
+ // },
+ {
+ label: '到货日期',
+ field: 'arriveDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ disabled:true,
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ tableForm:{
+ disabled: true,
+ type:'FormDate',
+ placeholder: '请选择到货日期',
+ valueFormat: 'x',
+ },
+ },
+ {
+ label: '过期日期',
+ field: 'expireDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ disabled:true,
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ tableForm:{
+ disabled: true,
+ type:'FormDate',
+ placeholder: '请选择过期日期',
+ valueFormat: 'x',
+ },
+ },
+ {
+ label: '库存状态',
+ field: 'inventoryStatus',
+ dictType: DICT_TYPE.INVENTORY_STATUS,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false,
+ tableForm: {
+ type: 'Select',
+ disabled: true,
+ }
+ },
+ {
+ label: '包装数量',
+ field: 'packQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ componentProps: {
+ isSearchList: true,
+ searchListPlaceholder: '请选择包装',
+ searchField: 'packQty',
+ searchTitle: '物品包装信息',
+ searchAllSchemas: Itempackaging.allSchemas,
+ searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
+ searchCondition: [
+ {
+ key: 'itemCode',
+ value: 'itemCode',
+ message: '请选择订单行',
+ isMainValue: true
+ },
+ {
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }
+
+ ]
+ }
+ },
+ tableForm: {
+ disabled: true,
+ isInpuFocusShow: false,
+ searchListPlaceholder: '请选择包装',
+ searchField: 'packQty',
+ searchTitle: '物品包装信息',
+ searchAllSchemas: Itempackaging.allSchemas,
+ searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
+ searchCondition: [
+ {
+ key: 'itemCode',
+ value: 'itemCode',
+ message: '请选择订单行',
+ isMainValue: true
+ },
+ {
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }]
+ },
+ isTableForm: true,
+ isForm: true
+ },
+ {
+ label: '包装规格',
+ field: 'packUnit',
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150,
+ componentProps: {
+ disabled: true
+ }
+ },
+ tableForm:{
+ disabled:true
+ },
+ isTableForm: true,
+ isForm: true
+ },
+ {
+ label: '供应商计量数量',
+ field: 'supplierPackQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 1,
+ precision: 6
+ },
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '供应商计量单位',
+ field: 'supplierPackUnit',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false,
+ tableForm: {
+ type: 'Select'
+ }
+ },
+ {
+ label: '转换率',
+ field: 'convertRate',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 0
+ },
+ },
+ tableForm: {
+ disabled: true,
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isTableForm: false,
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '项目代码',
+ field: 'projectCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '从货主代码',
+ field: 'fromOwnerCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '到货主代码',
+ field: 'toOwnerCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '备注',
+ field: 'remark',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ componentProps: {
+ disabled:true
+ }
+ },
+ tableForm: {
+ disabled: true,
+ }
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ isTableForm: false,
+ isForm: false
+ }
+]))
+
+
+export const PurchasereceiptRequestDetailLabel = useCrudSchemas(reactive([
+ {
+ label: '订单号',
+ field: 'poNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled: true,
+ isInpuFocusShow: false,
+ searchListPlaceholder: '请选择订单号',
+ searchField: 'number',
+ searchTitle: '采购订单信息',
+ searchAllSchemas: PurchaseMain.allSchemas,
+ searchPage: PurchaseMainApi.getPurchaseMainPage,
+ searchCondition: [{
+ key:'supplierCode',
+ value:'supplierCode',
+ message: '请选择供应商!',
+ isMainValue: true
+ }]
+ },
+ form: {
+ labelMessage: '该订单号会影响订单行的选择',
+ componentProps: {
+ isSearchList: true,
+ searchListPlaceholder: '请选择订单号',
+ searchField: 'number',
+ searchTitle: '采购订单信息',
+ searchAllSchemas: PurchaseMain.allSchemas,
+ searchPage: PurchaseMainApi.getPurchaseMainPage,
+ searchCondition: [{
+ key:'supplierCode',
+ value:'supplierCode',
+ message: '请选择供应商!',
+ isMainValue: true
+ }]
+ }
+ }
+ },
+ {
+ label: '订单行',
+ field: 'poLine',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ disabled:true,
+ isSearchList: false, // 开启查询弹窗
+ searchListPlaceholder: '请选择订单行', // 输入框占位文本
+ searchField: 'lineNumber', // 查询弹窗赋值字段
+ searchTitle: '订单信息', // 查询弹窗标题
+ searchAllSchemas: PurchaseDetail.allSchemas, // 查询弹窗所需类
+ searchPage: PurchaseDetailApi.getPurchaseDetailPage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key:'number',
+ value:'poNumber',
+ message: '请填写订单号!',
+ isMainValue: true
+ }]
+ }
+ },
+ tableForm:{
+ disabled:true,
+ isInpuFocusShow: false,
+ searchListPlaceholder: '请选择订单行', // 输入框占位文本
+ searchField: 'lineNumber', // 查询弹窗赋值字段
+ searchTitle: '订单信息', // 查询弹窗标题
+ searchAllSchemas: PurchaseDetail.allSchemas, // 查询弹窗所需类
+ searchPage: PurchaseDetailApi.getPurchaseDetailPage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key:'number',
+ value:'poNumber',
+ message: '请填写订单号!',
+ isMainValue: true
+ }]
+ }
+ },
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled: true
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '物料名称',
+ field: 'itemName',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ isTableForm: true,
+ },
+ {
+ label: '物料描述1',
+ field: 'itemDesc1',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ isTableForm: true,
+ },
+ {
+ label: '物料描述2',
+ field: 'itemDesc2',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '包装号',
+ field: 'packingNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ // {
+ // label: '器具号',
+ // field: 'containerNumber',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isTableForm: false,
+ // isForm: false
+ // },
+ {
+ label: '数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ disabled:true,
+ min: 1,
+ precision: 6
+ },
+ },
+ tableForm: {
+ disabled:true,
+ type: 'InputNumber',
+ min: 1,
+ precision: 6
+ }
+ },
+ {
+ label: '计量单位',
+ field: 'uom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ type: 'Select',
+ disabled: true
+ }
+ },
+ {
+ label: '从库位代码',
+ field: 'fromLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '默认到库位代码',
+ field: 'defaultToLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ disabled:true,
+ isSearchList: false, // 开启查询弹窗
+ searchListPlaceholder: '请选择库位代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '库位信息', // 查询弹窗标题
+ searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
+ searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }]
+ }
+ },
+ tableForm:{
+ disabled:true,
+ isInpuFocusShow: false,
+ searchListPlaceholder: '请选择库位代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '库位信息', // 查询弹窗标题
+ searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
+ searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }]
+ },
+ isTableForm: true,
+ isForm: false
+ },
+ {
+ label: '生产日期',
+ field: 'produceDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ disabled:true,
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ tableForm:{
+ disabled:true,
+ type:'FormDate',
+ placeholder: '请选择生产日期',
+ valueFormat: 'x',
+ },
+ },
+ {
+ label: '批次',
+ field: 'batch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled: true
+ }
+ },
+ // {
+ // label: '替代批次',
+ // field: 'altBatch',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isTableForm: false,
+ // isForm: false
+ // },
+ {
+ label: '到货日期',
+ field: 'arriveDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ disabled: true,
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ tableForm:{
+ disabled: true,
+ type:'FormDate',
+ placeholder: '请选择到货日期',
+ valueFormat: 'x',
+ },
+ },
+ {
+ label: '过期日期',
+ field: 'expireDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ disabled: true,
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ tableForm:{
+ disabled: true,
+ type:'FormDate',
+ placeholder: '请选择过期日期',
+ valueFormat: 'x',
+ },
+ },
+ {
+ label: '库存状态',
+ field: 'inventoryStatus',
+ dictType: DICT_TYPE.INVENTORY_STATUS,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false,
+ tableForm: {
+ type: 'Select'
+ }
+ },
+ {
+ label: '包装数量',
+ field: 'packQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ componentProps: {
+ disabled: true,
+ isSearchList: true,
+ searchListPlaceholder: '请选择包装',
+ searchField: 'packQty',
+ searchTitle: '物品包装信息',
+ searchAllSchemas: Itempackaging.allSchemas,
+ searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
+ searchCondition: [
+ {
+ key: 'itemCode',
+ value: 'itemCode',
+ message: '请选择订单行',
+ isTableRowValue: true, //查询当前searchTable表中行数据的值
+ isMainValue: false
+ },
+ {
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }
+
+ ]
+ }
+ },
+ tableForm: {
+ disabled: true,
+ isInpuFocusShow: true,
+ searchListPlaceholder: '请选择包装',
+ searchField: 'packQty',
+ searchTitle: '物品包装信息',
+ searchAllSchemas: Itempackaging.allSchemas,
+ searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
+ searchCondition: [
+ {
+ key: 'itemCode',
+ value: 'itemCode',
+ message: '请选择订单行',
+ isTableRowValue: true, //查询当前searchTable表中行数据的值
+ isMainValue: false
+ },
+ {
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }]
+ },
+ isTableForm: true,
+ isForm: true
+ },
+ {
+ label: '包装规格',
+ field: 'packUnit',
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150,
+ componentProps: {
+ disabled: true
+ }
+ },
+ tableForm:{
+ disabled:true
+ },
+ isTableForm: true,
+ isForm: true
+ },
+ {
+ label: '供应商计量数量',
+ field: 'supplierPackQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ disabled: true,
+ min: 1,
+ precision: 6
+ },
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '供应商计量单位',
+ field: 'supplierPackUnit',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false,
+ tableForm: {
+ type: 'Select'
+ }
+ },
+ {
+ label: '转换率',
+ field: 'convertRate',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ disabled: true,
+ min: 0
+ },
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isTableForm: false,
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '项目代码',
+ field: 'projectCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '从货主代码',
+ field: 'fromOwnerCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '到货主代码',
+ field: 'toOwnerCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '备注',
+ field: 'remark',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+]))
diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMain.data.ts
new file mode 100644
index 000000000..3f63b07f0
--- /dev/null
+++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMain.data.ts
@@ -0,0 +1,1886 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+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 * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail'
+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 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'
+}
+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([
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ fixed: 'left',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true
+ },
+ {
+ label: '采购收货记录单号',
+ field: 'number',
+ fixed: 'left',
+ sort: 'custom',
+ table: {
+ width: 200
+ },
+ isSearch: true
+ },
+ {
+ label: '发货单号',
+ field: 'asnNumber',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ sortTableDefault: 2,
+ isSearch: true
+ },
+ {
+ label: '采购订单号',
+ field: 'poNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true
+ },
+ {
+ label: '订单行',
+ field: 'poLine',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+
+ {
+ label: '物料名称',
+ field: 'itemName',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '批次', // 实际是子表的从批次,为了不影响页面,单独放上面
+ field: 'fromBatch',
+ sort: 'custom',
+ isForm: false,
+ isTableForm: false,
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '计量单位',
+ field: 'uom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ // {
+ // label: '包装规格',
+ // field: 'packUnit',
+ // dictClass: 'string',
+ // isTable: true,
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ // {
+ // label: '从库位代码',
+ // field: 'fromLocationCode',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ //
+ // },
+ {
+ label: '到库位代码',
+ field: 'toLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ }
+ ])
+)
+
+/**
+ * @returns {Array} 采购退货申请主表
+ */
+export const PurchasereturnRequestMain = useCrudSchemas(
+ reactive([
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180,
+ fixed: 'left'
+ },
+ isForm: false,
+ isSearch: true
+ },
+ {
+ label: '状态',
+ field: 'status',
+ dictType: DICT_TYPE.REQUEST_STATUS,
+ dictClass: 'string',
+ isSearch: true,
+ isTable: true,
+ isForm: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 1,
+ form: {
+ value: '1',
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '供应商代码',
+ field: 'supplierCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 1,
+ isSearch: true,
+ form: {
+ componentProps: {
+ enterSearch: true,
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '供应商信息', // 查询弹窗标题
+ searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
+ searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
+ verificationParams: [
+ {
+ key: 'code',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true
+ }
+ ] // 失去焦点校验参数
+ }
+ }
+ },
+
+ {
+ // label: '采购收货记录单号',
+ // field: 'purchaseReceiptRecordNumber',
+ label: '发货单号',
+ field: 'asnNumber',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ enterSearch: true,
+ disabled: true,
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择发货单号', // 输入框占位文本
+ searchField: 'number', // 查询弹窗赋值字段
+ searchTitle: '采购收货记录', // 查询弹窗标题
+ searchAllSchemas: PurchasereceiptRecordMain1.allSchemas, // 查询弹窗所需类
+ searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageReturn, // 查询弹窗所需分页方法
+ searchCondition: [
+ {
+ key: 'supplierCode',
+ value: 'supplierCode',
+ isMainValue: true
+ }
+ ],
+ verificationParams: [
+ {
+ key: 'number',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true
+ }
+ ] // 失去焦点校验参数
+ }
+ }
+ },
+ // {
+ // label: '发货单号',
+ // field: 'asnNumber',
+ // sort: 'custom',
+ // table: {
+ // width: 180
+ // },
+ // isForm: false,
+ // sortTableDefault: 2
+ // },
+ {
+ label: '要货计划单号',
+ field: 'ppNumber',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isForm: 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: '承运商',
+ field: 'carrierCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable: false
+ },
+ {
+ label: '运输方式',
+ field: 'transferMode',
+ sort: 'custom',
+ dictType: DICT_TYPE.TRANSFER_MODE,
+ dictClass: 'string',
+ table: {
+ width: 150
+ },
+ isTable: false
+ },
+ {
+ label: '车牌号',
+ field: 'vehiclePlateNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable: false
+ },
+ {
+ label: '从仓库代码',
+ field: 'fromWarehouseCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm: false,
+ isTable: false
+ },
+ {
+ label: '到仓库代码',
+ field: 'toWarehouseCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false,
+ isTable: false
+ },
+ {
+ label: '从库区类型范围',
+ field: 'fromAreaTypes',
+ dictType: DICT_TYPE.AREA_TYPE,
+ dictClass: 'string',
+ isTable: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm: false
+ },
+ {
+ label: '到库区类型范围',
+ field: 'toAreaTypes',
+ dictType: DICT_TYPE.AREA_TYPE,
+ dictClass: 'string',
+ isTable: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '从库区代码范围',
+ field: 'fromAreaCodes',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm: false,
+ isTable: false
+ },
+ {
+ label: '到库区代码范围',
+ field: 'toAreaCodes',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm: false,
+ isTable: false,
+ isTableForm: false
+ },
+ {
+ label: '从月台代码',
+ field: 'fromDockCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm: false,
+ isTable: false
+ },
+ {
+ label: '业务类型',
+ field: 'businessType',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ value: 'PurchaseReturn',
+ componentProps: {
+ disabled: true
+ }
+ },
+ isForm: false,
+ isTable: false
+ },
+ {
+ label: '申请时间',
+ field: 'requestTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: { width: '100%' },
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x'
+ }
+ },
+ isForm: false,
+ isTable: false
+ },
+ {
+ label: '截止时间',
+ field: 'dueTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isTable: false,
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: { width: '100%' },
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x'
+ }
+ }
+ },
+ {
+ label: '部门',
+ field: 'departmentCode',
+ sort: 'custom',
+ isForm: false,
+ table: {
+ width: 150
+ },
+ isTable: false,
+ formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
+ return userDeptArray.find((account) => account.id == cellValue)?.name
+ },
+ form: {
+ value: userDept.id,
+ component: 'Select',
+ api: () => userDeptArray,
+ componentProps: {
+ disabled: true,
+ optionsAlias: {
+ labelField: 'name',
+ valueField: 'id'
+ }
+ }
+ }
+ },
+
+ {
+ label: '原因',
+ field: 'remark',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable: false
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ isForm: false,
+ table: {
+ width: 180
+ },
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: { width: '100%' },
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x'
+ }
+ },
+ isSearch: true,
+ search: {
+ component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ type: 'daterange',
+ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
+ },
+ }
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ table: {
+ width: 130
+ },
+ isForm: false,
+ isTable: true
+ },
+ {
+ label: '最后更新时间',
+ field: 'updateTime',
+ sort: 'custom',
+ isDetail: true,
+ isForm: false,
+ isTable: false,
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: { width: '100%' },
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x'
+ }
+ }
+ },
+ {
+ label: '最后更新者',
+ field: 'updater',
+ isDetail: true,
+ isForm: false,
+ isTable: false,
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '自动提交',
+ field: 'autoCommit',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: false,
+ isForm: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'Switch',
+ value: requestsettingData.autoCommit,
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE',
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '自动通过',
+ field: 'autoAgree',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: false,
+ isForm: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'Switch',
+ value: requestsettingData.autoAgree,
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE',
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '自动执行',
+ field: 'autoExecute',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: false,
+ isForm: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'Switch',
+ value: requestsettingData.autoExecute,
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE',
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '直接生成记录',
+ field: 'directCreateRecord',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isForm: false,
+ isTable: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'Switch',
+ value: requestsettingData.directCreateRecord,
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE',
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isDetail: false,
+ isForm: false,
+ table: {
+ width: 300,
+ fixed: 'right'
+ }
+ }
+ ])
+)
+
+//表单校验
+export const PurchasereturnRequestMainRules = reactive({
+ supplierCode: [
+ { required: true, message: '请输入供应商代码', trigger: 'blur' }
+ ],
+ dueTime: [
+ { required: true, message: '请选择截止时间', trigger: 'blur' }
+ ],
+ purchaseReceiptRecordNumber: [
+ { required: true, message: '请输入采购收货记录单号', trigger: 'blur' }
+ ],
+ carrierCode: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' },
+ ],
+ vehiclePlateNumber: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' },
+ ],
+ remark: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' }
+ ],
+ fromWarehouseCode: [
+ { required: true, message: '请输入从仓库代码', trigger: 'blur' }
+ ],
+ fromAreaTypes: [
+ { required: true, message: '请选择从库区类型范围', trigger: 'change' }
+ ],
+ departmentCode: [
+ { required: true, message: '请输入部门', trigger: 'blur' }
+ ],
+ autoCommit: [
+ { required: true, message: '请选择是否自动提交', trigger: 'change' }
+ ],
+ autoAgree: [
+ { required: true, message: '请选择是否自动通过', trigger: 'change' }
+ ],
+ autoExecute: [
+ { required: true, message: '请选择是否自动执行', trigger: 'change' }
+ ],
+ directCreateRecord: [
+ { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
+ ],
+ businessType: [
+ { required: true, message: '请输入业务类型', trigger: 'blur' }
+ ],
+})
+
+/**
+ * @returns {Array} 采购退货申请子表
+ */
+export const PurchasereturnRequestDetail = useCrudSchemas(reactive([
+ {
+ label: '订单号',
+ field: 'poNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '订单行',
+ field: 'poLine',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ isInpuFocusShow: false, // 开启查询弹窗
+ searchListPlaceholder: '请选择订单行',
+ searchField: 'poLine',
+ searchTitle: '采购收货记录信息',
+ searchAllSchemas: PurchasereceiptRecordDetail.allSchemas,
+ searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage,
+ searchCondition: [{
+ key: 'number',
+ value: 'purchaseReceiptRecordNumber',
+ message: '请填写采购收货记录号!',
+ isMainValue: true
+ }]
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ isSearchList: false,
+ searchListPlaceholder: '请选择订单行',
+ searchField: 'poLine',
+ searchTitle: '采购收货记录信息',
+ searchAllSchemas: PurchasereceiptRecordDetail.allSchemas,
+ searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage,
+ searchCondition: [{
+ key: 'number',
+ value: 'purchaseReceiptRecordNumber',
+ message: '请填写采购收货记录号!',
+ isMainValue: true
+ }]
+ }
+ },
+ },
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ // labelMessage: '信息提示说明!!!',
+ isInpuFocusShow: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择订单行',
+ searchField: 'poLine',
+ searchTitle: '采购收货记录信息',
+ searchAllSchemas: PurchasereceiptRecordDetail.allSchemas,
+ searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageBySupplierCode,
+ searchCondition: [{
+ key: 'supplierCode',
+ value: 'supplierCode',
+ message: '请填写采购收货记录号!',
+ isMainValue: true
+ }]
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ disabled:true,
+ isSearchList: true,
+ searchListPlaceholder: '请选择订单行',
+ searchField: 'poLine',
+ searchTitle: '采购收货记录信息',
+ searchAllSchemas: PurchasereceiptRecordDetail.allSchemas,
+ searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageBySupplierCode,
+ searchCondition: [{
+ key: 'supplierCode',
+ value: 'supplierCode',
+ message: '请填写采购收货记录号!',
+ isMainValue: true
+ }]
+ }
+ }
+ },
+ {
+ label: '物料名称',
+ field: 'itemName',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '物料描述1',
+ field: 'itemDesc1',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm:false,
+ isTable:false,
+ hiddenInMain: true,
+ isForm: false,
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '物料描述2',
+ field: 'itemDesc2',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm:false,
+ isTable:false,
+ hiddenInMain: true,
+ isForm: false,
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '批次',
+ field: 'batch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ // {
+ // label: '替代批次',
+ // field: 'altBatch',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // hiddenInMain: true,
+ // isTableForm: false,
+ // isTable: false,
+ // isForm: false,
+ // tableForm:{
+ // disabled:true
+ // },
+ // form: {
+ // componentProps:{
+ // disabled:true
+ // }
+ // }
+ // },
+ // {
+ // label: '器具号',
+ // field: 'containerNumber',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // hiddenInMain: true,
+ // tableForm:{
+ // disabled:true
+ // },
+ // isTableForm: false,
+ // isTable: false,
+ // isForm: false,
+ // form: {
+ // componentProps:{
+ // disabled:true
+ // }
+ // }
+ // },
+ {
+ label: '计量单位',
+ field: 'uom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ // isSearch: true,
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true,
+ type: 'Select',
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '退货数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 0,
+ precision: 6,
+ disabled:false
+ }
+ },
+ isTable:false,
+ isTableForm:false,
+ tableForm:{
+ disabled:true,
+ type:'InputNumber',
+ min:0,
+ precision: 6
+ }
+ },
+ // { //与国强联调的时候发现退货数量用的是qty
+ // label: '退货数量',
+ // field: 'returnedQty',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // form: {
+ // component: 'InputNumber',
+ // componentProps: {
+ // min: 0,
+ // precision: 6,
+ // disabled:false
+ // }
+ // },
+ // isTable: false,
+ // isTableForm: false,
+ // isForm:false,
+ // tableForm:{
+ // type:'InputNumber',
+ // min:0,
+ // precision: 6,
+ // disabled:false
+ // }
+ // },
+ {
+ label: '从库位代码',
+ field: 'fromLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ // tableForm: {
+ // enterSearch: true,
+ // // labelMessage: '信息提示说明!!!',
+ // isInpuFocusShow: true, // 开启查询弹窗
+ // searchListPlaceholder: '请选择从库位代码',
+ // searchField: 'code',
+ // searchTitle: '库位代码信息',
+ // searchAllSchemas: Location.allSchemas,
+ // searchPage: LocationApi.getLocationListByAreaAndBusinesstype,
+ // searchCondition: [{
+ // key: 'businessType',
+ // value: 'PurchaseReturn',
+ // message: '请填写业务类型',
+ // isMainValue: false
+ // },{
+ // key: 'isIn',
+ // value: 'out',
+ // message: '',
+ // isMainValue: false
+ // }],
+ // verificationParams: [{
+ // key: 'code',
+ // action: '==',
+ // value: '',
+ // isMainValue: false,
+ // isSearch: true,
+ // isFormModel: true,
+ // }], // 失去焦点校验参数
+ // },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ },
+ // form:{
+ // // labelMessage: '信息提示说明!!!',
+ // componentProps: {
+ // enterSearch: true,
+ // isSearchList: true,
+ // searchListPlaceholder: '请选择从库位代码',
+ // searchField: 'code',
+ // searchTitle: '库位代码信息',
+ // searchAllSchemas: Location.allSchemas,
+ // searchPage: LocationApi.getLocationListByAreaAndBusinesstype,
+ // searchCondition: [{
+ // key: 'businessType',
+ // value: 'PurchaseReturn',
+ // message: '请填写业务类型',
+ // isMainValue: false
+ // },{
+ // key: 'isIn',
+ // value: 'out',
+ // message: '',
+ // isMainValue: false
+ // }],
+ // verificationParams: [{
+ // key: 'code',
+ // action: '==',
+ // value: '',
+ // isMainValue: false,
+ // isSearch: true,
+ // isFormModel: true,
+ // }], // 失去焦点校验参数
+ // }
+ // },
+ hiddenInMain: true,
+ isTable: false,
+ },
+ {
+ label: '包装号',
+ field: 'packingNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ hiddenInMain: true,
+ isTable: false,
+ // form: {
+ // componentProps:{
+ // disabled: true,
+ // }
+ // },
+ form: {
+ componentProps: {
+ enterSearch: true,
+ isSearchList: true,
+ searchListPlaceholder: '请选择包装号',
+ searchField: 'packingNumber',
+ searchTitle: '库存余额信息', // 查询弹窗标题
+ searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
+ searchPage: BalanceApi.getBalancePageReturn,
+ searchCondition: [{
+ key: 'itemCode',
+ value: 'itemCode',
+ message: '请填写物料代码',
+ isTableRowValue: true, //查询当前searchTable表中行数据的值
+ required:true,
+ isMainValue:true
+ },
+ // {
+ // key: 'batch',
+ // value: 'batch',
+ // message: '请填写批次',
+ // isTableRowValue: true, //查询当前searchTable表中行数据的值
+ // // required:true,
+ // isMainValue:true
+ // }
+ ],
+ verificationParams: [{
+ key: 'packingNumber',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ }
+ },
+ tableForm: {
+ enterSearch: true,
+ multiple: true,
+ // labelMessage: '信息提示说明!!!',
+ isInpuFocusShow: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择物料代码、批次、从库位代码',
+ searchField: 'packingNumber',
+ searchTitle: '库存余额信息', // 查询弹窗标题
+ searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
+ searchPage: BalanceApi.getBalancePageReturn,
+ searchCondition: [{
+ key: 'itemCode',
+ value: 'itemCode',
+ message: '请填写物料代码',
+ isTableRowValue: true, //查询当前searchTable表中行数据的值
+ required:true,
+ isMainValue:false
+ },
+ // {
+ // key: 'batch',
+ // value: 'batch',
+ // message: '请填写批次',
+ // isTableRowValue: true, //查询当前searchTable表中行数据的值
+ // required:true,
+ // isMainValue:false
+ // }
+ ],
+ verificationParams: [{
+ key: 'packingNumber',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ },
+ },
+ {
+ label: '库存余额',
+ field: 'inventoryBalance',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ disabled: true,
+ min: 0,
+ precision: 6
+ }
+ },
+ tableForm:{
+ hidden:false,//控制列是否展示
+ type:'InputNumber',
+ min:0,
+ precision: 6
+ },
+ hiddenInMain: true,
+ isTable: false,
+ isDetail: false,
+ },
+ {
+ label: '退货数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 0,
+ precision: 6
+ }
+ },
+ isForm:false,
+ tableForm:{
+ type:'InputNumber',
+ min:0,
+ precision: 6
+ }
+ },
+ {
+ label: '退货原因',
+ field: 'reasonType',
+ dictType: DICT_TYPE.RETURN_REASON_TYPE,
+ dictClass: 'string',
+ // isSearch: true,
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ type: 'Select',
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '退货原因描述',
+ field: 'reason',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '库存状态',
+ field: 'inventoryStatus',
+ dictType: DICT_TYPE.INVENTORY_STATUS,
+ dictClass: 'string',
+ isSearch: true,
+ hiddenInMain: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true,
+ type: 'Select',
+ },
+ isTableForm: false,
+ isTable: false,
+ isForm: false,
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '到库位代码',
+ field: 'toLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ hiddenInMain: true,
+ isTableForm: false,
+ isTable: false,
+ isForm: false,
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '从货主代码',
+ field: 'fromOwnerCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ hiddenInMain: true,
+ isTableForm: false,
+ isTable: false,
+ isForm: false,
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '到货主代码',
+ field: 'toOwnerCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ hiddenInMain: true,
+ isTableForm: false,
+ isTable: false,
+ isForm: false,
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ // {
+ // label: '到货日期',
+ // field: 'arriveDate',
+ // formatter: dateFormatter2,
+ // detail: {
+ // dateFormat: 'YYYY-MM-DD'
+ // },
+ // sort: 'custom',
+ // table: {
+ // width: 180
+ // },
+ // hiddenInMain: true,
+ // form: {
+ // component: 'DatePicker',
+ // componentProps: {
+ // style: {width: '100%'},
+ // type: 'date',
+ // dateFormat: 'YYYY-MM-DD',
+ // valueFormat: 'x',
+ // }
+ // },
+ // tableForm:{
+ // disabled:true,
+ // type: 'FormDate',
+ // dateFormat: 'YYYY-MM-DD',
+ // valueFormat: 'x',
+ // },
+ // isTableForm: false
+ // },
+ // {
+ // label: '生产日期',
+ // field: 'produceDate',
+ // formatter: dateFormatter2,
+ // detail: {
+ // dateFormat: 'YYYY-MM-DD'
+ // },
+ // hiddenInMain: true,
+ // sort: 'custom',
+ // table: {
+ // width: 180
+ // },
+ // form: {
+ // component: 'DatePicker',
+ // componentProps: {
+ // disabled: true,
+ // style: {width: '100%'},
+ // type: 'date',
+ // dateFormat: 'YYYY-MM-DD',
+ // valueFormat: 'x',
+ // }
+ // },
+ // tableForm:{
+ // disabled:true,
+ // type: 'FormDate',
+ // format: 'YYYY-MM-DD',
+ // valueFormat: 'x',
+ // },
+ // isTableForm: false
+ // },
+ // {
+ // label: '过期日期',
+ // field: 'expireDate',
+ // formatter: dateFormatter2,
+ // detail: {
+ // dateFormat: 'YYYY-MM-DD'
+ // },
+ // sort: 'custom',
+ // table: {
+ // width: 180
+ // },
+ // hiddenInMain: true,
+ // form: {
+ // component: 'DatePicker',
+ // componentProps: {
+ // disabled: true,
+ // style: {width: '100%'},
+ // type: 'date',
+ // dateFormat: 'YYYY-MM-DD',
+ // valueFormat: 'x',
+ // }
+ // },
+ // isTableForm: false,
+ // isTable: false,
+ // tableForm:{
+ // disabled:true,
+ // type: 'FormDate',
+ // format: 'YYYY-MM-DD',
+ // valueFormat: 'x',
+ // }
+ // },
+ // {
+ // label: '任务明细ID',
+ // field: 'jobDetailId',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // tableForm:{
+ // disabled:true
+ // },
+ // isTableForm:false,
+ // hiddenInMain: true,
+ // isForm:false,
+ // form: {
+ // componentProps:{
+ // disabled:true
+ // }
+ // },
+ // },
+ {
+ label: '项目代码',
+ field: 'projectCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ isForm: false,
+ isTableForm: false,
+ isTable: false,
+ hiddenInMain: true,
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ },
+ },
+
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ hiddenInMain: true,
+ tableForm:{
+ disabled:true
+ },
+ isForm: false,
+ isTableForm:false,
+ },
+ // {
+ // label: '接口类型',
+ // field: 'interfaceType',
+ // dictType: DICT_TYPE.INTERFACE_TYPE,
+ // dictClass: 'string',
+ // isSearch: true,
+ // isTable: true,
+ // hiddenInMain: true,
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // tableForm:{
+ // disabled:true
+ // },
+ // isForm:false,
+ // isTableForm:false,
+ // form: {
+ // componentProps:{
+ // disabled:true
+ // }
+ // },
+ // },
+ {
+ label: '备注',
+ field: 'remark',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ isTableForm: false,
+ isTable: false,
+ hiddenInMain: true,
+ isForm: false,
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ },
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ hiddenInMain: true,
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ tableForm:{
+ disabled:true
+ },
+ isTableForm:false,
+ isForm:false
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ hiddenInMain: true,
+ isTableForm:false,
+ isForm:false
+ },
+ {
+ label: '原因',
+ field: 'remark',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable: false,
+ },
+ // {
+ // label: '操作',
+ // hiddenInMain:true,
+ // field: 'action',
+ // isDetail: false,
+ // isForm: false ,
+ // table: {
+ // width: 150,
+ // fixed: 'right'
+ // },
+ // isTableForm:false,
+ // }
+]))
+
+//表单校验
+export const PurchasereturnRequestDetailRules = reactive({
+ // packingNumber: [
+ // { required: true, message: '请输入包装号', trigger: 'blur' }
+ // ],
+ // batch: [
+ // { required: true, message: '请输入批次', trigger: 'blur' }
+ // ],
+ // inventoryStatus: [
+ // { required: true, message: '请选择库存状态', trigger: 'change' }
+ // ],
+ // poNumber: [
+ // { required: true, message: '请输入订单号', trigger: 'blur' }
+ // ],
+ // poLine: [
+ // { required: true, message: '请输入订单行', trigger: 'blur' }
+ // ],
+ // reason: [
+ // { required: true, message: '请选择原因', trigger: 'change' }
+ // ],
+ itemCode: [
+ { required: true, message: '请输入物料代码', trigger: 'blur' }
+ ],
+ remark: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' }
+ ],
+})
+
+export const PurchasereReturnRequestDetailLabel = useCrudSchemas(reactive([
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled: true
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '物料名称',
+ field: 'itemName',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ isTableForm: true,
+ },
+ {
+ label: '物料描述1',
+ field: 'itemDesc1',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ isTableForm: true,
+ },
+ {
+ label: '物料描述2',
+ field: 'itemDesc2',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '包装号',
+ field: 'packingNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable:false,
+ isTableForm: false,
+ isForm: false
+ },
+ // {
+ // label: '器具号',
+ // field: 'containerNumber',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isTableForm: false,
+ // isForm: false
+ // },
+ {
+ label: '数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ disabled:true,
+ min: 1,
+ precision: 6
+ },
+ },
+ tableForm: {
+ disabled:true,
+ type: 'InputNumber',
+ min: 1,
+ precision: 6
+ }
+ },
+ {
+ label: '计量单位',
+ field: 'uom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ type: 'Select',
+ disabled: true
+ }
+ },
+ {
+ label: '从库位代码1',
+ field: 'fromLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '生产日期',
+ field: 'produceDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ disabled:true,
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ tableForm:{
+ disabled:true,
+ type:'FormDate',
+ placeholder: '请选择生产日期',
+ valueFormat: 'x',
+ },
+ },
+
+ // {
+ // label: '替代批次',
+ // field: 'altBatch',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isTableForm: false,
+ // isForm: false
+ // },
+ {
+ label: '库存状态',
+ field: 'inventoryStatus',
+ dictType: DICT_TYPE.INVENTORY_STATUS,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false,
+ tableForm: {
+ type: 'Select'
+ }
+ },
+ {
+ label: '批次',
+ field: 'batch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '包装数量',
+ field: 'packQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ componentProps: {
+ disabled: true,
+ isSearchList: true,
+ searchListPlaceholder: '请选择包装',
+ searchField: 'packQty',
+ searchTitle: '物品包装信息',
+ searchAllSchemas: Itempackaging.allSchemas,
+ searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
+ searchCondition: [
+ {
+ key: 'itemCode',
+ value: 'itemCode',
+ message: '请选择订单行',
+ isMainValue: true
+ },
+ {
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }
+
+ ]
+ }
+ },
+ tableForm: {
+ disabled: true,
+ isInpuFocusShow: true,
+ searchListPlaceholder: '请选择包装',
+ searchField: 'packQty',
+ searchTitle: '物品包装信息',
+ searchAllSchemas: Itempackaging.allSchemas,
+ searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
+ searchCondition: [
+ {
+ key: 'itemCode',
+ value: 'itemCode',
+ message: '请选择订单行',
+ isMainValue: true
+ },
+ {
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }]
+ },
+ isTableForm: true,
+ isForm: true
+ },
+ {
+ label: '包装规格',
+ field: 'packUnit',
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150,
+ componentProps: {
+ disabled: true
+ }
+ },
+ tableForm:{
+ disabled:true
+ },
+ isTableForm: true,
+ isForm: true
+ },
+]))
+
diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMainNew.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMainNew.data.ts
new file mode 100644
index 000000000..13c162522
--- /dev/null
+++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMainNew.data.ts
@@ -0,0 +1,597 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+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 * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail'
+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 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'
+
+import * as ItembasicApi from '@/api/wms/itembasic'
+import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
+
+let locationList = await LocationApi.selectBusinessTypeOutLocationAll({
+ businessType:'PurchaseReturn',
+ isIn:'out'
+})
+locationList = locationList.list.map(item=>({
+ label :item.code,
+ value :item.code
+}))
+
+console.log('locationList',locationList)
+
+
+// 获取当前操作人的部门
+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]
+
+/**
+ * @returns {Array} 采购退货申请主表
+ */
+export const PurchasereturnRequestMainNew = useCrudSchemas(
+ reactive([
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ isSearch: true,
+ table:{
+ width: 150
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ enterSearch:true,
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择物料代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '物料基础信息', // 查询弹窗标题
+ searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
+ searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ action: '==',
+ isSearch: true,
+ isMainValue: false
+ }],
+ verificationParams: [{
+ key: 'code',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: 'true',
+ isFormModel: true
+ }], // 失去焦点校验参数
+ }
+ }
+ },
+ {
+ label: '物料名称',
+ field: 'itemName',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '供应商',
+ field: 'supplierCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'Select',
+ componentProps: {
+ options: [],
+ optionsAlias: {
+ labelField: 'supplierCode',
+ valueField: 'supplierCode'
+ },
+ filterable: true,
+ }
+ }
+ },
+ {
+ label: '供应商名称',
+ field: 'supplierName',
+ sort: 'custom',
+ table: {
+ width: 180,
+ },
+ isForm: true,
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: ' ',
+ field: 'hahaha',
+ table: {
+ width: 180
+ },
+ isTable:false,
+ isDetail:false,
+ form: {
+ componentProps: {
+ type: 'slot',
+ }
+ },
+ },
+ {
+ label: ' ',
+ field: 'hehehe',
+ table: {
+ width: 180
+ },
+ isTable:false,
+ isDetail:false,
+ form: {
+ componentProps: {
+ type: 'slot',
+ }
+ },
+ },
+ {
+ label: '采购订单号',
+ field: 'poNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '采购订单行',
+ field: 'poLine',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '收货单号',
+ field: 'receiptNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '发货单号',
+ field: 'asnNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '状态',
+ field: 'status',
+ dictType: DICT_TYPE.INVENTORY_STATUS,
+ dictClass: 'string',
+ isSearch: true,
+ isTable: true,
+ isForm: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 1,
+ form: {
+ value: '1',
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '退货库位',
+ field: 'locationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'Select',
+ value:locationList[0]['value'],
+ componentProps: {
+ options: locationList
+ }
+ }
+ },
+ {
+ 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: '操作',
+ field: 'action',
+ isDetail: false,
+ isForm: false,
+ table: {
+ width: 300,
+ fixed: 'right'
+ }
+ }
+ ])
+)
+//表单校验
+export const PurchasereturnRequestMainRulesNew = reactive({
+ itemCode: [
+ { required: true, message: '请输入供应商代码', trigger: 'blur' }
+ ],
+ supplierCode: [
+ { required: true, message: '请输入供应商代码', trigger: 'blur' }
+ ],
+ poNumber: [
+ { required: true, message: '请选择采购订单号', trigger: 'blur' }
+ ],
+ poLine: [
+ { required: true, message: '请选择订单行', trigger: 'blur' }
+ ],
+ locationCode: [
+ { required: true, message: '请选择收货单明细', trigger: 'blur' }
+ ]
+})
+
+export const PurchasereturnPurchasereceiptRecordNew = useCrudSchemas(
+ reactive([
+ {
+ label: '收货日期',
+ field: 'currentDeliveryDate',
+ isTable: true,
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ }
+ },
+ {
+ label: '收货单号',
+ field: 'receiptNumber',
+ sort: 'custom',
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '发货单号',
+ field: 'asnNumber',
+ sort: 'custom',
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '订单号',
+ field: 'poNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '订单行',
+ field: 'poLine',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '批次',
+ field: 'batch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ }
+ ])
+)
+
+
+
+/**
+ * @returns {Array} 采购退货申请子表
+ */
+export const PurchasereturnRequestDetailNew = useCrudSchemas(reactive([
+ {
+ label: '批次',
+ field: 'batch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '状态',
+ field: 'inventoryStatus',
+ dictType: DICT_TYPE.INVENTORY_STATUS,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ type: 'Select',
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '隔离库存数量',
+ field: 'inventoryBalance',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ disabled: true,
+ min: 0,
+ precision: 6
+ }
+ },
+ tableForm:{
+ disabled:true,
+ hidden:false,//控制列是否展示
+ type:'InputNumber',
+ min:0,
+ precision: 6
+ },
+ hiddenInMain: true,
+ isTable: false,
+ isDetail: false,
+ },
+ {
+ label: '退货数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 0,
+ precision: 6,
+ disabled:false
+ }
+ },
+ isTable:false,
+ isTableForm:true,
+ tableForm:{
+ type:'InputNumber',
+ min:0,
+ precision: 6
+ }
+ },
+ {
+ label: '退货原因',
+ field: 'reasonType',
+ dictType: DICT_TYPE.RETURN_REASON_TYPE,
+ dictClass: 'string',
+ // isSearch: true,
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ type: 'Select',
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '退货原因描述',
+ field: 'reason',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable: false,
+ },
+ {
+ label: '操作',
+ hiddenInMain:true,
+ field: 'action',
+ isDetail: false,
+ isForm: false ,
+ table: {
+ width: 150,
+ fixed: 'right'
+ },
+ isTableForm:false,
+ }
+]))
+
+//表单校验
+export const PurchasereturnRequestDetailRulesNew = reactive({
+})
+
+