diff --git a/src/api/wms/demandforecastingDetail/index.ts b/src/api/wms/demandforecastingDetail/index.ts
index f45e61a27..059cc4ce2 100644
--- a/src/api/wms/demandforecastingDetail/index.ts
+++ b/src/api/wms/demandforecastingDetail/index.ts
@@ -1,4 +1,6 @@
import request from '@/config/axios'
+import { isString } from '@/utils/is'
+import dayjs from 'dayjs'
export interface DemandforecastingDetailVO {
predictTimeType: string
@@ -15,6 +17,57 @@ export interface DemandforecastingDetailVO {
available: string
}
+// 要货预测-列表和头部请求参数
+const getPageParams = (params)=>{
+ // 到货日期
+ if(params.dueDate&¶ms.dueDate.length>0){
+ if(isString(params.dueDate[0])){
+ params.startDate = params.dueDate[0]
+ }else{
+ params.startDate = params.dueDate[0].format('YYYY-MM-DD')
+ }
+
+ }
+ if(params.dueDate&¶ms.dueDate.length>1){
+ if(isString(params.dueDate[1])){
+ params.endDate = params.dueDate[1]
+ }else{
+ params.endDate = params.dueDate[1].format('YYYY-MM-DD')
+ }
+ }
+ params.dueDate = ''
+
+ //计划员
+ if(params.planerId&¶ms.planerId.length>0){
+ params.planers = params.planerId.join(',')
+ }
+ params.planerId = ''
+ // 供应商代码
+ if(params.supplierCode&¶ms.supplierCode.length>0){
+ let keyValue = params.supplierCode.split(' ')
+ keyValue.forEach(item=>{item = item.trim()})
+ params.supplierCodes = keyValue.join(',')
+ }
+ params.supplierCode = ''
+
+ // 物料代码
+ if(params.itemCode&¶ms.itemCode.length>0){
+ let keyValue = params.itemCode.split(' ')
+ keyValue.forEach(item=>{item = item.trim()})
+ params.itemCodes = keyValue.join(',')
+ }
+ params.itemCode = ''
+
+ // 版本号
+ if(params.version&¶ms.version.length>0){
+ let keyValue = params.version.split(' ')
+ keyValue.forEach(item=>{item = item.trim()})
+ params.versions = keyValue.join(',')
+ }
+ params.version = ''
+ return params
+}
+
// 查询要货预测子列表
export const getDemandforecastingDetailPage = async (params) => {
if (params.isSearch) {
@@ -22,6 +75,8 @@ export const getDemandforecastingDetailPage = async (params) => {
const data = {...params}
return await request.post({ url: '/wms/demandforecasting-detail/senior', data })
} else {
+ params = getPageParams(params)
+ console.log('params',params)
return await request.get({ url: `/wms/demandforecasting-detail/page`, params })
}
}
@@ -50,3 +105,16 @@ export const deleteDemandforecastingDetail = async (id: number) => {
export const exportDemandforecastingDetail = async (params) => {
return await request.download({ url: `/wms/demandforecasting-detail/export-excel`, params })
}
+
+// 查询要货预测主列表
+export const getPageTableHead = async (params) => {
+ params = getPageParams(params)
+ console.log('params',params)
+ return await request.get({ url: `/wms/demandforecasting-detail/queryPageTableHead`, params })
+}
+
+
+// 查询版本号
+export const queryVersion = async (data) => {
+ return await request.post({ url: `/wms/demandforecasting-detail/queryVersion`, data })
+}
\ No newline at end of file
diff --git a/src/api/wms/demandforecastingMain/index.ts b/src/api/wms/demandforecastingMain/index.ts
index 68b471769..7d5596a8f 100644
--- a/src/api/wms/demandforecastingMain/index.ts
+++ b/src/api/wms/demandforecastingMain/index.ts
@@ -80,4 +80,24 @@ export const exportDemandforecastingMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/demandforecasting-main/get-import-template' })
-}
\ No newline at end of file
+}
+
+
+// 计划员
+export const queryUserPlanerList = async () => {
+ return await request.post({ url: `/wms/demandforecasting-main/queryUserPlanerList`,data:{} })
+
+}
+
+// 供应商代码
+export const querySupplierList = async (data) => {
+ return await request.post({ url: `/wms/demandforecasting-main/querySupplierList`,data })
+}
+
+
+// 是否已读接口
+export const updateIsRead = async (data) => {
+ return await request.post({ url: `/wms/demandforecasting-main/updateIsRead`,data })
+}
+
+
diff --git a/src/api/wms/itempackage/index.ts b/src/api/wms/itempackage/index.ts
index 555a174b0..0917dc431 100644
--- a/src/api/wms/itempackage/index.ts
+++ b/src/api/wms/itempackage/index.ts
@@ -29,7 +29,16 @@ export const getItempackagingPage = async (params) => {
return await request.get({ url: `/wms/itempackage/page`, params })
}
}
-
+// 查询物料包装信息树形列表
+export const getItempackagingPageTree = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/wms/itempackage/seniorTree', data })
+ } else {
+ return await request.get({ url: `/wms/itempackage/pageTree`, params })
+ }
+}
// 查询物料包装信息 列表--供应商发货申请
export const getItempackagingPageBySupplierdeliver = async (params) => {
if (params.isSearch) {
diff --git a/src/api/wms/packageunit/index.ts b/src/api/wms/packageunit/index.ts
index fa1718d35..94f053f3a 100644
--- a/src/api/wms/packageunit/index.ts
+++ b/src/api/wms/packageunit/index.ts
@@ -33,7 +33,26 @@ export const getPackageunitPage = async (params) => {
return await request.get({ url: `/wms/packageunit/page`, params })
}
}
-
+// 查询物品包装规格信息 列表树状图
+export const getPackageunitPageTree = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/wms/packageunit/seniorTree', data })
+ } else {
+ return await request.get({ url: `/wms/packageunit/pageTree`, params })
+ }
+}
+// 查询物品父级包装规格信息
+export const getPackageunitPageParent = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/wms/packageunit/seniorParent', data })
+ } else {
+ return await request.get({ url: `/wms/packageunit/pageParent`, params })
+ }
+}
// 查询物品包装规格信息 详情
export const getPackageunit = async (id: number) => {
return await request.get({ url: `/wms/packageunit/get?id=` + id })
diff --git a/src/api/wms/purchasePlanDetail/index.ts b/src/api/wms/purchasePlanDetail/index.ts
index 3da2f8973..a436ab74a 100644
--- a/src/api/wms/purchasePlanDetail/index.ts
+++ b/src/api/wms/purchasePlanDetail/index.ts
@@ -15,7 +15,17 @@ export interface PurchasePlanDetailVO {
updater: string
available: string
}
+// 要货预测-列表和头部请求参数
+const getPageParams = (params)=>{
+ console.log('params.status',params.status)
+ // 状态
+ if(params.status&¶ms.status.length>0){
+ params.statuss = params.status.join(',')
+ }
+ params.status = ''
+ return params
+}
// 查询要货计划子列表
export const getPurchasePlanDetailPage = async (params) => {
if (params.isSearch) {
@@ -23,6 +33,7 @@ export const getPurchasePlanDetailPage = async (params) => {
const data = {...params}
return await request.post({ url: '/wms/purchase-plan-detail/senior', data })
} else {
+ params = getPageParams(params)
return await request.get({ url: `/wms/purchase-plan-detail/page`, params })
}
}
diff --git a/src/api/wms/purchasePlanMain/index.ts b/src/api/wms/purchasePlanMain/index.ts
index 167e3ffd6..9d5e42230 100644
--- a/src/api/wms/purchasePlanMain/index.ts
+++ b/src/api/wms/purchasePlanMain/index.ts
@@ -85,7 +85,24 @@ export const exportPurchasePlanMain = async (params) => {
return await request.download({ url: `/wms/purchase-plan-main/export-excel`, params })
}
}
-
+// 导出明细要货计划主 Excel
+export const exportDetailsPurchasePlanMain = async (params) => {
+ if (params.isSearch) {
+ const data = {...params}
+ return await request.downloadPost({ url: `/wms/purchase-plan-main/export-excel-senior`, data })
+ } else {
+ return await request.download({ url: `/wms/purchase-plan-main/export-excel-detail`, params })
+ }
+}
+// 导出要货计划二维表 Excel
+export const exportTablePurchasePlanMain = async (params) => {
+ // if (params.isSearch) {
+ // const data = {...params}
+ // return await request.downloadPost({ url: `/wms/purchase-plan-main/export-excel-senior`, data })
+ // } else {
+ return await request.download({ url: `/wms/purchase-plan-main/export-excel`, params })
+ //}
+}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/purchase-plan-main/get-import-template' })
diff --git a/src/api/wms/supplierCycle/index.ts b/src/api/wms/supplierCycle/index.ts
new file mode 100644
index 000000000..ddaf2013e
--- /dev/null
+++ b/src/api/wms/supplierCycle/index.ts
@@ -0,0 +1,65 @@
+import request from '@/config/axios'
+
+export interface SupplierCycleVO {
+ id: number
+ supplierCode: string
+ monday: string
+ tuesday: string
+ wednesday: string
+ thursday: string
+ friday: string
+ saturday: string
+ sunday: string
+ version: string
+ remark: string
+ extraProperties: string
+ siteId: string
+ beginTime: Date
+ endTime: Date
+ available: string
+ status: string
+ concurrencyStamp: string
+ ruleUserId: number
+ departmentCode: string
+}
+
+// 查询要货预测周期列表
+export const getSupplierCyclePage = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/wms/supplier-cycle/senior', data })
+ } else {
+ return await request.get({ url: `/wms/supplier-cycle/page`, params })
+ }
+}
+
+// 查询要货预测周期详情
+export const getSupplierCycle = async (id: number) => {
+ return await request.get({ url: `/wms/supplier-cycle/get?id=` + id })
+}
+
+// 新增要货预测周期
+export const createSupplierCycle = async (data: SupplierCycleVO) => {
+ return await request.post({ url: `/wms/supplier-cycle/create`, data })
+}
+
+// 修改要货预测周期
+export const updateSupplierCycle = async (data: SupplierCycleVO) => {
+ return await request.put({ url: `/wms/supplier-cycle/update`, data })
+}
+
+// 删除要货预测周期
+export const deleteSupplierCycle = async (id: number) => {
+ return await request.delete({ url: `/wms/supplier-cycle/delete?id=` + id })
+}
+
+// 导出要货预测周期 Excel
+export const exportSupplierCycle = async (params) => {
+ return await request.download({ url: `/wms/supplier-cycle/export-excel`, params })
+}
+
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/wms/supplier-cycle/get-import-template' })
+}
\ No newline at end of file
diff --git a/src/api/wms/supplierdeliverRequestDetail/index.ts b/src/api/wms/supplierdeliverRequestDetail/index.ts
index 64580a04e..ab0609463 100644
--- a/src/api/wms/supplierdeliverRequestDetail/index.ts
+++ b/src/api/wms/supplierdeliverRequestDetail/index.ts
@@ -43,7 +43,14 @@ export const getSupplierdeliverRequestDetailPage = async (params) => {
return await request.get({ url: `/wms/supplierdeliver-request-detail/page`, params })
}
}
-
+// 查询供应商发货申请子列表
+export const getGenerateLabelList = async (params) => {
+ return await request.get({ url: `/wms/supplierdeliver-request-detail/generateLabelList`, params })
+}
+// 查询托规格列表
+export const getGenerateLabelParentList = async (params) => {
+ return await request.get({ url: `/wms/supplierdeliver-request-detail/generateLabelParentList`, params })
+}
// 查询供应商发货申请子详情
export const getSupplierdeliverRequestDetail = async (id: number) => {
return await request.get({ url: `/wms/supplierdeliver-request-detail/get?id=` + id })
diff --git a/src/api/wms/supplieritem/index.ts b/src/api/wms/supplieritem/index.ts
index 81cbf3d12..274469390 100644
--- a/src/api/wms/supplieritem/index.ts
+++ b/src/api/wms/supplieritem/index.ts
@@ -51,16 +51,27 @@ export const getSupplieritem = async (id: number) => {
export const createSupplieritem = async (data: SupplieritemVO) => {
return await request.post({ url: `/wms/supplieritem/create`, data })
}
+export const createSupplieritemSCP = async (data: SupplieritemVO) => {
+ return await request.post({ url: `/wms/supplieritem/createSCP`, data })
+}
// 修改供应商物料
export const updateSupplieritem = async (data: SupplieritemVO) => {
return await request.put({ url: `/wms/supplieritem/update`, data })
}
+// 修改供应商物料
+export const updateSupplieritemSCP = async (data: SupplieritemVO) => {
+ return await request.put({ url: `/wms/supplieritem/updateSCP`, data })
+}
// 删除供应商物料
export const deleteSupplieritem = async (id: number) => {
return await request.delete({ url: `/wms/supplieritem/delete?id=` + id })
}
+export const deleteSupplieritemSCP = async (id: number) => {
+ return await request.delete({ url: `/wms/supplieritem/deleteSCP?id=` + id })
+}
+
// 导出供应商物料 Excel
export const exportSupplieritem = async (params) => {
diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue
index 9b5e713cb..c9d62bbca 100644
--- a/src/components/BasicForm/src/BasicForm.vue
+++ b/src/components/BasicForm/src/BasicForm.vue
@@ -102,6 +102,7 @@
@clearInput='clearInput'
@batchAdd="batchAdd"
:routeName="routeName"
+ @visibleChange='visibleChange'
>
@@ -127,7 +128,11 @@
-
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts
new file mode 100644
index 000000000..b094557b3
--- /dev/null
+++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts
@@ -0,0 +1,399 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
+import * as SupplierApi from '@/api/wms/supplier'
+import { Supplier} from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
+import * as SupplieritemApi from '@/api/wms/supplieritem'
+import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data'
+import * as ItembasicApi from '@/api/wms/itembasic'
+import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data";
+import * as PurchaseMainApi from '@/api/wms/purchaseMain'
+import * as PurchaseDetailApi from '@/api/wms/purchaseDetail'
+import { PurchaseDetail, PurchaseMain } from '../purchaseMain/purchaseMain.data'
+import * as DemandforecastingMainApi from '@/api/wms/demandforecastingMain'
+import * as DemandforecastingDetailApi from '@/api/wms/demandforecastingDetail'
+import dayjs from 'dayjs'
+
+const { t } = useI18n() // 国际化
+
+/**
+ * @returns {Array} 要货预测主表
+ */
+Supplieritem.allSchemas.searchSchema = Supplieritem.allSchemas.searchSchema.filter(item=>item.field!="allowOverShipment")
+export const Version = useCrudSchemas(reactive([
+ {
+ label: '供应商代码',
+ field: 'supplerCodes',
+ sort: 'custom',
+ isSearch:true,
+ },
+ {
+ label: '订单号',
+ field: 'poNumber',
+ sort: 'custom',
+ isSearch:true,
+ },
+ {
+ label: '订单行',
+ field: 'poLine',
+ sort: 'custom',
+ },
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ isSearch:true,
+ sort: 'custom',
+ },
+ {
+ label: '子表版本',
+ field: 'detailVersion',
+ sort: 'custom',
+ }
+]))
+export const DemandforecastingMain = useCrudSchemas(reactive([
+ {
+ label: '是否已读',
+ field: 'isRead',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '订单号',
+ field: 'poNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '订单行',
+ field: 'poLine',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch:true,
+ isTable:true,
+ isForm: false,
+ search: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ multiple: true,
+ enterSearch: true,
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择物料代码', // 输入框占位文本
+ searchField: 'itemCode', // 查询弹窗赋值字段
+ searchTitle: '物料基础信息', // 查询弹窗标题
+ searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
+ searchPage: SupplieritemApi.getSupplieritemPageSCP, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'supplierCodes',
+ value: 'supplierCode',
+ message: '请填写供应商代码!',
+ isMainValue: true,
+ isCSV:true,//是否用逗号分隔参数
+ },{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }]
+ }
+ }
+ },
+ {
+ label: '版本号',
+ field: 'version',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch:true,
+ search: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ multiple: true,
+ enterSearch: true,
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择版本号', // 输入框占位文本
+ searchField: 'detailVersion', // 查询弹窗赋值字段
+ searchTitle: '版本号', // 查询弹窗标题
+ searchAllSchemas: Version.allSchemas, // 查询弹窗所需类
+ searchPage: DemandforecastingDetailApi.queryVersion, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'supplierCodes',
+ value: 'supplierCode',
+ message: '请填写供应商代码!',
+ isMainValue: true,
+ isCSV:true,//是否用逗号分隔参数
+ },{
+ key: 'itemCodes',
+ value: 'itemCode',
+ message: '请填写物料代码!',
+ isMainValue: true,
+ isCSV:true,//是否用逗号分隔参数
+ },{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }]
+ }
+ }
+ },
+ {
+ label: '到货日期',
+ field: 'dueDate',
+ formatter: dateFormatter,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch:true,
+ isTable:false,
+ isForm: false,
+ search: {
+ value: [dayjs(), dayjs().subtract(-3,'month')],
+ component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD',
+ type: 'daterange',
+ defaultTime: [new Date('1 '), new Date('1 ')]
+ }
+ },
+ }
+]))
+
+//表单校验
+export const DemandforecastingMainRules = reactive({
+ available: [
+ { required: true, message: '请选择是否可用', trigger: 'change' }
+ ],
+ supplierCode: [
+ { required: true, message: '请选择供应商代码', trigger: 'change' }
+ ],
+ version: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' }
+ ],
+ remark: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' }
+ ],
+})
+
+/**
+ * @returns {Array} 要货预测子表
+ */
+export const DemandforecastingDetail = useCrudSchemas(reactive([
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isTableForm: false,
+ hiddenInMain:true,
+ form: {
+ componentProps: {
+ disbaled: true
+ }
+ }
+ },
+ {
+ label: '预测时间类型',
+ field: 'predictTimeType',
+ dictType: DICT_TYPE.PREDICT_TIME_TYPE,
+ sort: 'custom',
+ dictClass: 'string',
+ isTable: false,
+ table: {
+ width: 150
+ },
+ tableForm: {
+ type: 'Select'
+ }
+ },
+ {
+ label: '预测日期',
+ field: 'predictTime',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isTable:false,
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ tableForm: {
+ type: 'FormDate',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+
+ {
+ label: '计量单位',
+ field: 'uom',
+ sort: 'custom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ table: {
+ width: 150
+ },
+ tableForm: {
+ type: 'Select',
+ disabled: true
+ }
+ },
+ {
+ label: '计划数量',
+ field: 'planQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 1,
+ precision: 6
+ }
+ },
+ tableForm: {
+ type: 'InputNumber',
+ min: 1,
+ precision: 6
+ }
+ },
+ {
+ label: '备注',
+ field: 'remark',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ 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,
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false,
+ },
+ {
+ label: '最后更新时间',
+ field: 'updateTime',
+ 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,
+ },
+ {
+ label: '最后更新者',
+ field: 'updater',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false,
+ },
+ {
+ label: '操作',
+ hiddenInMain:true,
+ field: 'action',
+ isDetail: false,
+ isForm: false,
+ table: {
+ width: 150,
+ fixed: 'right'
+ },
+ isTableForm: false,
+ }
+]))
+
+//表单校验
+export const DemandforecastingDetailRules = reactive({
+ predictTimeType: [
+ { required: true, message: '请选择预测时间类型', trigger: 'change' },
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' }
+ ],
+ predictTime: [
+ { required: true, message: '请输入预测时间', trigger: 'change' }
+ ],
+ planQty: [
+ { required: true, message: '请输入计划数量', trigger: 'blur' }
+ ],
+ uom: [
+ { required: true, message: '请选择计量单位', trigger: 'change' }
+ ],
+ number: [
+ { required: true, message: '请输入单据号', trigger: 'blur' }
+ ],
+ itemCode: [
+ { required: true, message: '请选择物料代码', trigger: 'change' }
+ ],
+ remark: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' }
+ ],
+ poLine: [{required:true, message: '请选择订单行', trigger: 'blur'}]
+})
diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue
new file mode 100644
index 000000000..9e3dea6c8
--- /dev/null
+++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue
@@ -0,0 +1,285 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.isRead==1?'已读':'未读' }}
+
+
+
+ {{ row[name] }}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
index 905708139..1e234687a 100644
--- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
+++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -22,9 +22,9 @@
v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
@getSelectionRows="getSelectionRows">
-
-
- {{ row.number }}
+
+
+ {{ row.supplierCode }}
@@ -45,13 +45,16 @@
:apiUpdate="PurchasePlanMainApi.updatePurchasePlanMain"
:apiCreate="PurchasePlanMainApi.createPurchasePlanMain"
:isBusiness="true"
+ :isShowReduceButtonSelection="false"
+ :isShowReduceButton="false"
+ :isShowButton="false"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
- :isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
- @onEnter="onEnter"/>
+ @onEnter="onEnter"
+ @onBlur="onEnter"/>
@@ -67,8 +70,13 @@
:apiDelete="PurchasePlanDetailApi.deletePurchasePlanDetail"
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailValidate="detailValidate"
- :detailButtonIsShowDelete="false"
- :detailButtonIsShowEdit="false"
+ :detailButtonIsShowAddStatusArray="['1','3','4','5','6']"
+ :detailButtonIsShowEdit="true"
+ :detailButtonIsShowDelete="true"
+ :detailButtonIsShowAdd="true"
+ :isOpenSearchTable="true"
+ fieldTableColumn="poLine"
+
/>
@@ -91,6 +99,7 @@
import supplierdeliverBasicForm from '../supplierdeliverRequestMain/supplierdeliverBasicForm.vue'
import * as PurchaseMainApi from '@/api/wms/purchaseMain'
import { PurchaseMain } from '../purchaseMain/purchaseMain.data'
+ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
// 要货计划
defineOptions({ name: 'PurchasePlanMain' })
@@ -106,6 +115,31 @@
const updataTableColumns = (val) => {
tableColumns.value = val
}
+ const seachRef = ref()
+ const onSearchChange = (field, value)=>{
+ if(field=='status'){
+ if(value.length>0){
+ if(value[value.length-1]==''){
+ //全选
+ seachRef.value.setFormValues({
+ status:['']
+ })
+ }else{
+ seachRef.value.setFormValues({
+ status:value.filter(item=>item!='')
+ })
+ }
+ }
+ }
+ }
+ const searchQueryTableSuccess = (formField, searchField, val, formRef, type, row ) => {
+ console.log('searchQueryTableSuccess',formField, searchField, val, formRef, type, row )
+ nextTick(() => {
+ const setV = {}
+ setV[formField] = val[0][searchField]
+ formRef.setValues(setV)
+ })
+ }
// 查询页面返回
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
@@ -149,14 +183,18 @@
if(formField == 'supplierCode'){
setV['supplierCode'] = val[0]['code']
await PurchasePlanMainApi.queryPurchasePlan(val[0]['code']).then(res => {
- let beginTime = res.beginTime
- var ms = beginTime.substring(0, 2)
- var me = beginTime.substring(3)
- setV['beginTime'] = new Date(2024, 1, 1, Number(ms), Number(me))
- let endTime = res.endTime
- var ms = endTime.substring(0, 2)
- var me = endTime.substring(3)
- setV['endTime'] = new Date(2024, 1, 1, Number(ms), Number(me))
+
+ // let beginTime = res.beginTime
+ // var ms = beginTime.substring(0, 2)
+ // var me = beginTime.substring(3)
+ // setV['beginTime'] = new Date(2024, 1, 1, Number(ms), Number(me))
+ // let endTime = res.endTime
+ // var ms = endTime.substring(0, 2)
+ // var me = endTime.substring(3)
+ // setV['endTime'] = new Date(2024, 1, 1, Number(ms), Number(me))
+ setV['timeWindow'] = res.timeWindow
+ setV['beginTime'] = res.beginTime
+ setV['endTime'] = res.endTime
setV['contacts'] = res.contacts
setV['phone'] = res.phone
})
@@ -169,6 +207,10 @@
setV['planQty'] = val[0]['orderQty']-val[0]['plannedQty']
setV['available'] = val[0]['available']
}
+ if(formField == 'poNumber') {
+ //订单类型
+ setV['type'] = val[0]['type']
+ }
formRef.setValues(setV)
console.log('formModel',formRef.formModel)
if(formField == 'poNumber') {
@@ -182,7 +224,7 @@
const getSearchTableData = async (number,formField,searchField)=>{
const {tableObject ,tableMethods} = useTable({
- defaultParams:{number},
+ defaultParams:{number,available:'TRUE'},
getListApi: PurchaseDetailApi.getPurchaseDetailPagePoNumber // 分页接口
})
tableObject.pageSize = 500
@@ -250,7 +292,9 @@ const getSearchTableData = async (number,formField,searchField)=>{
const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: 'wms:purchase-plan-main:create' }), // 新增
defaultButtons.defaultImportBtn({ hasPermi: 'wms:purchase-plan-main:import' }), // 导入
- defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchase-plan-main:export' }), // 导出
+ // defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchase-plan-main:export' }), // 导出
+ defaultButtons.defaultExportDetailsBtn({ hasPermi: 'wms:purchase-plan-main:export' }), // 导出明细
+ defaultButtons.defaultExportTableBtn({ hasPermi: 'wms:purchase-plan-main:export' }), // 导出二维表
// defaultButtons.mainListSelectionOrderPubBtn(null), // 批量发布
defaultButtons.defaultFreshBtn(null), // 刷新
defaultButtons.defaultFilterBtn(null), // 筛选
@@ -274,6 +318,10 @@ const getSearchTableData = async (number,formField,searchField)=>{
handleImport()
} else if (val == 'export') { // 导出
handleExport()
+ } else if (val == 'export-details') { // 导出明细
+ handleExportDetails()
+ } else if (val == 'export-table') { // 导出二维表
+ handleExportTable()
} else if (val == 'refresh') { // 刷新
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
@@ -306,14 +354,14 @@ const getSearchTableData = async (number,formField,searchField)=>{
return []
}
return [
- defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['2']) }), // 打开
- defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1']) }), // 关闭
+ // defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['2']) }), // 打开
+ defaultButtons.mainListPurchasePlanCloBtn({ hide: !(row.status!=6&&row.status!=2&&row.type=='SCHEDULE') }), // 关闭
defaultButtons.mainListPurchasePlanPubBtn({ hide: isShowMainButton(row, ['1']) }), // 发布
defaultButtons.mainListPurchasePlanAccBtn({ hide: isShowMainButton(row, ['3']) }), // 接受
defaultButtons.mainListPurchasePlanRejBtn({ hide: isShowMainButton(row, ['3']) }), // 不接受
defaultButtons.mainListPurchasePlanWitBtn({ hide: isShowMainButton(row, ['3']) }), // 下架
defaultButtons.mainListPurchasePlanModBtn({ hide: isShowMainButton(row, ['5']) }), // 修改
- // defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchase-plan-main:update' }), // 编辑
+ defaultButtons.mainListEditBtn({ hide: !isShowMainButton(row, ['2']), hasPermi: 'wms:purchase-plan-main:update' }), // 编辑
// defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchase-plan-main:delete'}), // 删除
{
label: t('ts.创建供应商发货申请'),
@@ -352,12 +400,14 @@ const getSearchTableData = async (number,formField,searchField)=>{
} else if (val == 'supplierdeliver') { // 创建供应商发货申请
supplierdeliverFormRef.value.openFormByCreate({
number:row.number, //要货单号
+ poNumber:row.poNumber, //采购订单号
supplierCode:row.supplierCode, //供应商代码
endTime:row.endTime, //结束时间
deliveryDate:row.deliveryDate // 送达日期
})
}
}
+
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type : string, row ?: number) => {
@@ -365,7 +415,22 @@ const getSearchTableData = async (number,formField,searchField)=>{
formRef.value.open(type, row)
if('create'==type){
nextTick(async () => {
- formRef.value.formRef.setValues({deliveryDate:dayjs().format('YYYY-MM-DD')})
+ formRef.value.formRef.setValues({deliveryDate:dayjs().valueOf()})
+ })
+ PurchasePlanMain.allSchemas.formSchema.forEach((item) => {
+ // 供应商代码
+ if(item.field == 'supplierCode'){
+ item.componentProps.disabled = false
+ item.componentProps.isSearchList = true
+ }
+ })
+ }else{
+ PurchasePlanMain.allSchemas.formSchema.forEach((item) => {
+ // 供应商代码
+ if(item.field == 'supplierCode'){
+ item.componentProps.disabled = true
+ item.componentProps.isSearchList = false
+ }
})
}
}
@@ -569,6 +634,33 @@ const handleSelectionPublish = async ()=>{
}
}
+ const handleExportDetails = async () => {
+ try {
+ // 导出的二次确认
+ await message.exportConfirm()
+ // 发起导出
+ exportLoading.value = true
+ const data = await PurchasePlanMainApi.exportDetailsPurchasePlanMain(tableObject.params)
+ download.excel(data, `${t('ts.要货计划明细')}.xlsx`)
+ } catch {
+ } finally {
+ exportLoading.value = false
+ }
+ }
+
+ const handleExportTable = async () => {
+ try {
+ // 导出的二次确认
+ await message.exportConfirm()
+ // 发起导出
+ exportLoading.value = true
+ const data = await PurchasePlanMainApi.exportTablePurchasePlanMain(tableObject.params)
+ download.excel(data, `${t('ts.要货计划二维表')}.xlsx`)
+ } catch {
+ } finally {
+ exportLoading.value = false
+ }
+ }
/**
* tableForm方法
*/
@@ -624,47 +716,48 @@ const handleSelectionPublish = async ()=>{
data.subList = []
let flag = false
for (let item of tableData.value) {
- await PurchaseDetailApi.getPurchaseDetailPageCheckData({
- number: item.poNumber,
- lineNumber: item.poLine,
- }).then(res => {
- console.log("【要货计划】-每条数据结果",item)
- if(res.list[0].type == 'DISCRETE'){//只有离散单需要这个校验
- if (item.planQty > res.list[0].orderQty - res.list[0].plannedQty) {
- flag = true;
- message.error(t('ts.要货计划数量不得大于订单数量-已计划数量'))
- return
- }else{
- data.subList.push(item) // 拼接子表数据参数
- }
- }else{
- data.subList.push(item) // 拼接子表数据参数
- }
- })
+ if(item.planQty>0){
+ data.subList.push(item) // 拼接子表数据参数
+ }
+ // await PurchaseDetailApi.getPurchaseDetailPageCheckData({
+ // number: item.poNumber,
+ // lineNumber: item.poLine,
+ // }).then(res => {
+ // console.log("【要货计划】-每条数据结果",item)
+ // if(res.list[0].type == 'DISCRETE'){//只有离散单需要这个校验
+ // if (item.planQty > res.list[0].orderQty - res.list[0].plannedQty) {
+ // flag = true;
+ // message.error(t('ts.要货计划数量不得大于订单数量-已计划数量'))
+ // return
+ // }else{
+ // data.subList.push(item) // 拼接子表数据参数
+ // }
+ // }else{
+ // data.subList.push(item) // 拼接子表数据参数
+ // }
+ // })
}
if(flag){
formRef.value.formLoading = false
return;
}
- if (data.subList.length == tableData.value.length) {
- try {
- if (formType === 'create') {
- if(data.subList.length == 0){
- message.error(t('ts.子列表数量不能空'))
- return
- }
- await PurchasePlanMainApi.createPurchasePlanMain(data)
- message.success(t('common.createSuccess'))
- } else {
- await PurchasePlanMainApi.updatePurchasePlanMain(data)
- message.success(t('common.updateSuccess'))
+ try {
+ if (formType === 'create') {
+ if(data.subList.length == 0){
+ message.error(t('ts.子列表数量不能空'))
+ return
}
- formRef.value.dialogVisible = false
- // 刷新当前列表
- getList()
- } finally {
- formRef.value.formLoading = false
+ await PurchasePlanMainApi.createPurchasePlanMain(data)
+ message.success(t('common.createSuccess'))
+ } else {
+ await PurchasePlanMainApi.updatePurchasePlanMain(data)
+ message.success(t('common.updateSuccess'))
}
+ formRef.value.dialogVisible = false
+ // 刷新当前列表
+ getList()
+ } finally {
+ formRef.value.formLoading = false
}
formRef.value.formLoading = false
}
diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts
index b4938d19e..b77397b3b 100644
--- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts
+++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts
@@ -6,31 +6,25 @@ import * as PurchaseMainApi from '@/api/wms/purchaseMain'
import * as PurchaseDetailApi from '@/api/wms/purchaseDetail'
import { PurchaseDetail, PurchaseMain } from '../purchaseMain/purchaseMain.data'
import {getPurchaseDetailPagePoNumber} from "@/api/wms/purchaseDetail";
+import * as ItembasicApi from '@/api/wms/itembasic'
+import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data";
const { t } = useI18n() // 国际化
/**
* @returns {Array} 要货计划主表
*/
export const PurchasePlanMain = useCrudSchemas(reactive([
- {
- label: '单据号',
- field: 'number',
- sort: 'custom',
- isForm: false,
- table: {
- width: 180,
- fixed: 'left'
- },
- isSearch: true
- },
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
table: {
- width: 150
+ width: 150,
+ fixed: 'left'
},
isSearch: true,
+ sortTableDefault:1,
+ sortSearchDefault:1,
form: {
labelMessage: '影响明细中物料代码,需在供应商物料中维护',
componentProps: {
@@ -47,8 +41,59 @@ export const PurchasePlanMain = useCrudSchemas(reactive([
isMainValue: false
}]
}
+ },
+ search: {
+ componentProps: {
+ enterSearch: true,
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '供应商信息', // 查询弹窗标题
+ searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
+ searchPage: SupplierApi.getSupplierPageSCP, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }]
+ }
}
},
+ //仅是主列表页面的筛选搜索条件
+ {
+ label: '送达日期',
+ field: 'deliveryDate',
+ sort: 'custom',
+ isDetail:false,
+ isTable: false,
+ isForm:false,
+ isTableForm:false,
+ isSearch:true,
+ sortSearchDefault:3,
+ formatter: dateFormatter,
+ search: {
+ component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ type: 'datetimerange',
+ defaultTime: [new Date('1 '), new Date('1 ')]
+ }
+ },
+ },
+
+ {
+ label: '要货计划单号',
+ field: 'number',
+ sort: 'custom',
+ isForm: false,
+ table: {
+ width: 180,
+ },
+ sortTableDefault:8,
+ sortSearchDefault:4,
+ isSearch: true
+ },
+
{
label: '采购订单',
field: 'poNumber',
@@ -64,10 +109,14 @@ export const PurchasePlanMain = useCrudSchemas(reactive([
isSearchList: true,
searchListPlaceholder: '请选择采购订单',
searchField: 'number',
- searchTitle: '采购订单信息',
+ searchTitle: '采购订单信息3',
searchAllSchemas: PurchaseMain.allSchemas,
searchPage: PurchaseMainApi.getPurchaseMainPage,
searchCondition: [{
+ key: 'type',
+ value: 'SCHEDULE',
+ isMainValue: false
+ },{
key: 'available',
value: 'TRUE',
isMainValue: false
@@ -85,72 +134,71 @@ export const PurchasePlanMain = useCrudSchemas(reactive([
}
},
{
- label: '收货人',
- field: 'contacts',
- isTable:false,
+ label: '送达日期',
+ field: 'deliveryDate',
table: {
- width: 150
+ width: 180
},
+ formatter: dateFormatter,
+ sortTableDefault:2,
form: {
+ component: 'DatePicker',
componentProps: {
- disabled: false
+ style: {width: '100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
}
- }
+ },
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
},
{
- label: '联系电话',
- field: 'phone',
- isTable:false,
+ label: '采购订单类型',
+ field: 'type',
+ sort: 'custom',
+ dictType: DICT_TYPE.PURCHASE_ORDER_TYPE,
+ dictClass: 'string',
+ isTable: true,
+ isForm:true,
table: {
width: 150
},
form: {
+ // labelMessage: '信息提示说明!!!',
componentProps: {
- disabled: false
+ disabled: true
}
}
},
- //仅是主列表页面的筛选搜索条件
{
- label: '送达日期',
- field: 'deliveryDate',
- sort: 'custom',
- isDetail:false,
- isTable: false,
- isForm:false,
- isTableForm:false,
- isSearch:true,
- formatter: dateFormatter,
- search: {
- component: 'DatePicker',
+ label: '收货人',
+ field: 'contacts',
+ isTable:false,
+ table: {
+ width: 150
+ },
+ form: {
componentProps: {
- valueFormat: 'YYYY-MM-DD',
- type: 'daterange',
- defaultTime: [new Date('1 '), new Date('1 ')]
+ disabled: false
}
- },
+ }
},
{
- label: '送达日期',
- field: 'deliveryDate',
+ label: '联系电话',
+ field: 'phone',
+ isTable:false,
table: {
width: 150
},
- sortTableDefault:1000,
- formatter: dateFormatter2,
form: {
- component: 'DatePicker',
componentProps: {
- style: {width: '100%'},
- type: 'date',
- dateFormat: 'YYYY-MM-DD',
- valueFormat: 'x',
+ disabled: false
}
- },
- detail: {
- dateFormat: 'YYYY-MM-DD'
- },
+ }
},
+
{
label: '时间窗口',
field: 'timeWindow',
@@ -167,7 +215,9 @@ export const PurchasePlanMain = useCrudSchemas(reactive([
table: {
width: 150
},
- sortTableDefault:1001,
+ isTable:false,
+ isForm:false,
+ isDetail:false,
form:{
component:"TimePicker",
componentProps: {
@@ -182,7 +232,9 @@ export const PurchasePlanMain = useCrudSchemas(reactive([
table: {
width: 150
},
- sortTableDefault:1002,
+ isTable:false,
+ isForm:false,
+ isDetail:false,
form:{
component:"TimePicker",
componentProps: {
@@ -234,10 +286,18 @@ export const PurchasePlanMain = useCrudSchemas(reactive([
dictClass: 'string',
isTable: true,
isForm:false,
- isSearch: false,
+ isSearch: true,
table: {
width: 150
},
+ sortTableDefault:13,
+ sortSearchDefault:6,
+ search:{
+ value:[],
+ componentProps: {
+ multiple:true
+ }
+ },
form: {
value: '1',
componentProps: {
@@ -379,6 +439,8 @@ export const PurchasePlanMain = useCrudSchemas(reactive([
width: 150
},
isTable: false,
+ isForm:false,
+ isDetail:false,
},
{
label: '操作',
@@ -425,7 +487,7 @@ export const PurchasePlanMainRules = reactive({
*/
export const PurchasePlanDetail = useCrudSchemas(reactive([
{
- label: '单据号',
+ label: '要货计划单号',
field: 'number',
sort: 'custom',
isTableForm: false,
@@ -443,9 +505,40 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([
label: '采购订单号',
field: 'poNumber',
isSearch:true,
- isTable:false,
+ isTable:true,
+ sortTableDefault:9,
+ sortSearchDefault:2,
isForm:false,
- isTableForm:false
+ isTableForm:false,
+ table: {
+ width: 150
+ },
+ search: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ dialogWidth:'1085px',//搜索出来弹窗的宽度
+ isSearchList: true,
+ searchListPlaceholder: '请选择采购订单',
+ searchField: 'number',
+ searchTitle: '采购订单信息5',
+ searchAllSchemas: PurchaseMain.allSchemas,
+ searchPage: PurchaseMainApi.getPurchaseMainPage,
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ },{
+ key: 'supplierCode',
+ value: 'supplierCode',
+ message: '请填写供应商代码!',
+ isMainValue: true
+ },{
+ key: 'status',
+ value: 2,
+ isMainValue: false
+ }]
+ }
+ }
},
{
label: '订单号',
@@ -454,12 +547,14 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([
table: {
width: 180
},
+ hiddenInMain:true,
+ isTableForm:false,
tableForm: {
disabled: true,
isInpuFocusShow: false,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
- searchTitle: '采购订单信息',
+ searchTitle: '采购订单信息4',
searchAllSchemas: PurchaseMain.allSchemas,
searchPage: PurchaseMainApi.getPurchaseMainPage,
searchCondition: [{
@@ -481,10 +576,11 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
- isSearchList: true,
+ disabled: true,
+ isSearchList: false,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
- searchTitle: '采购订单信息',
+ searchTitle: '采购订单信息6',
searchAllSchemas: PurchaseMain.allSchemas,
searchPage: PurchaseMainApi.getPurchaseMainPage,
searchCondition: [{
@@ -504,6 +600,26 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([
}
}
},
+ {
+ label: '计划数量',
+ field: 'planQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ type: 'InputNumber',
+ precision: 6
+ },
+ sortTableDefault:4,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 0,
+ precision: 6
+ }
+ }
+ },
{
label: '订单行',
field: 'poLine',
@@ -511,13 +627,15 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([
table: {
width: 150
},
+ sortTableDefault:10,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
- isSearchList: true,
+ disabled: true,
+ isSearchList: false,
searchListPlaceholder: '请选择订单行',
searchField: 'lineNumber',
- searchTitle: '采购订单信息',
+ searchTitle: '采购订单信息2',
searchAllSchemas: PurchaseDetail.allSchemas,
searchPage: PurchaseDetailApi.getPurchaseDetailPagePoNumber,
searchCondition: [{
@@ -538,7 +656,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([
isInpuFocusShow: false,
searchListPlaceholder: '请选择订单行',
searchField: 'lineNumber',
- searchTitle: '采购订单信息',
+ searchTitle: '采购订单信息1',
searchAllSchemas: PurchaseDetail.allSchemas,
searchPage: PurchaseDetailApi.getPurchaseDetailPagePoNumber,
searchCondition: [{
@@ -560,6 +678,8 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([
table: {
width: 150
},
+ sortTableDefault:3,
+ sortSearchDefault:5,
isSearch:true,
form: {
componentProps: {
@@ -568,6 +688,29 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([
},
tableForm: {
disabled: true
+ },
+ search: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ multiple: true,
+ enterSearch: true,
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择物料代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '物料基础信息', // 查询弹窗标题
+ searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
+ searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'supplierCode',
+ value: 'supplierCode',
+ message: '请填写供应商代码!',
+ isMainValue: true,
+ },{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }]
+ }
}
},
{
@@ -582,40 +725,45 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([
disabled: true
}
},
+ sortTableDefault:11,
tableForm: {
disabled: true
}
},
+
{
- label: '计划数量',
- field: 'planQty',
+ label: '已发货数量',
+ field: 'shippedQty',
sort: 'custom',
table: {
width: 150
},
- tableForm: {
- type: 'InputNumber',
- precision: 6
+ isTableForm: false,
+ isForm: false,
+ sortTableDefault:5,
+ },
+ {
+ label: '已收货数量',
+ field: 'receivedQty',
+ sort: 'custom',
+ table: {
+ width: 150
},
- form: {
- component: 'InputNumber',
- componentProps: {
- precision: 6
- }
- }
+ isTableForm: false,
+ isForm: false,
+ sortTableDefault:6,
},
{
- label: '已发货数量',
- field: 'shippedQty',
+ label: '在途数量',
+ field: 'notReceiveQty',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
- hiddenInMain:true,
-
+ sortTableDefault:7,
},
{
label: '计量单位',
@@ -627,6 +775,12 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([
table: {
width: 150
},
+ sortTableDefault:12,
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ },
tableForm: {
type: 'Select',
disabled:true,
@@ -638,6 +792,8 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
+ isTableForm:false,
+ isForm:false,
hiddenInMain:true,
sort: 'custom',
table: {
@@ -697,6 +853,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([
field: 'remark',
sort: 'custom',
hiddenInMain:true,
+ isTableForm:false,
table: {
width: 150
},
@@ -717,10 +874,10 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([
const validatePlanQty = (rule, value, callback) => {
console.log('validatePlanQty',value)
const numReg = /^[\d]+$/
- if (numReg.test(value)&&value>0) {
+ if (numReg.test(value)&&value>=0) {
callback()
} else {
- callback(new Error('计划数量不能为0'))
+ callback(new Error('计划数量不能小于0'))
}
}
//表单校验
@@ -736,7 +893,7 @@ export const PurchasePlanDetailRules = reactive({
],
planQty: [
{ required: true, message: '请输入计划数量', trigger: 'blur' },
- { validator:validatePlanQty, message: '计划数量不能为0', trigger: 'blur'}
+ { validator:validatePlanQty, message: '计划数量不能小于0', trigger: 'blur'}
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
index da4d98c40..e6b157d16 100644
--- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
+++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
@@ -2,7 +2,10 @@
@@ -20,8 +23,9 @@
/>
-
-
+
+
+
+ {{ row.asnNumber }}
+
+
{{ row.number }}
-
-
+
+
-
+
-
-
+
-
+
+
+
\ No newline at end of file
diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue
index b89fe91d3..7b01aade1 100644
--- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue
+++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue
@@ -21,6 +21,7 @@
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@formFormDateChange="formFormDateChange"
+ @inputNumberChange="inputNumberChange"
@onEnter="onEnter"
>
@@ -40,6 +41,7 @@ import {
SupplierdeliverRequestDetail,
SupplierdeliverRequestDetailRules,
} from './supplierdeliverRequestMain.data'
+import dayjs from 'dayjs'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain'
import * as PurchasePlanDetailApi from '@/api/wms/purchasePlanDetail'
@@ -97,10 +99,11 @@ const openFormByCreate = async ( data ) => {
const setV = {}
// 供应商代码回显
setV['supplierCode'] = data['supplierCode'] // 供应商代码
+ setV['poNumber'] = data['poNumber'] //采购订单
setV['ppNumber'] = data['number'] // 要货单号
searchPage: SupplierApi.getSupplierPage
//新增--选择完要货计划,自动展示明细
- getSearchTableData(data['number'],'ppNumber','number')
+ getSearchTableData(data['number'],'ppNumber','number',0)
// 设置计划到货时间
let beginTime = data['endTime']
@@ -108,6 +111,7 @@ const openFormByCreate = async ( data ) => {
let deliveryDate = formatDate(data['deliveryDate'],'YYYY-MM-DD')
planArriveTimeStr.value = deliveryDate + ' '+ beginTime+":00"
setV['planArriveTime']= new Date(planArriveTimeStr.value).valueOf();
+ setV['arriveTime']= new Date(planArriveTimeStr.value).valueOf();
}
formRef.value.open('create', null)
@@ -129,7 +133,7 @@ const openFormByCreate = async ( data ) => {
formRef.value.formRef.setValues(setV)
})
}
-const openForm = async (type: string, row?: number) => {
+const openForm = async (type: string, row?: number, defaultSupplierCode?: string) => {
if(type == "update"){
SupplierdeliverRequestMain.allSchemas.formSchema.forEach((item) => {
if(item.field == 'supplierCode'){
@@ -151,6 +155,7 @@ const openForm = async (type: string, row?: number) => {
SupplierdeliverRequestMain.allSchemas.formSchema.forEach((item) => {
if(item.field == 'supplierCode'){
item.componentProps.isSearchList = true
+ item.value = defaultSupplierCode
}
if(item.field == 'ppNumber'){
item.componentProps.isSearchList = true
@@ -183,19 +188,30 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
// row['orderQty'] = val[0]['orderQty']
// row['uom'] = val[0]['uom']
// }
- //添加费用明细--点击确定
+ //添加费用明细--点击确定
const itemCodes = []
val.forEach(item=>{
const newRow = {...row}
+ newRow.id = dayjs().valueOf()
newRow[formField] = item[searchField]
+ newRow['allowOverShipment'] = item['allowOverShipment'] // 是否允许超发
newRow['poNumber'] = item['poNumber']
newRow['itemCode'] = item['itemCode']
newRow['poLine'] = item['poLine']
newRow['orderQty'] = item['orderQty']
newRow['uom'] = item['uom']
newRow['id'] = item['id']
- if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode']&&item1['poLine'] == item['poLine']&&item1['poNumber'] == item['poNumber'])) return
+ newRow['planQty'] = item['planQty']
+ newRow['shippedQty'] = item['shippedQty']
+ newRow['qty'] = item['planQty'] - item['shippedQty']
+ newRow['produceDate'] = dayjs().valueOf() // 是否允许超发
+ let produceDateStr = formatDate(newRow['produceDate'],'YYYYMMDD');
+ newRow['batch'] = produceDateStr
+ newRow['supplierBatch'] = produceDateStr
+ newRow.expireDate = item['expireTime']?addDay(newRow['produceDate'],item['expireTime']).valueOf():dayjs('2099-12-31').valueOf()
+ // if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode']&&item1['poLine'] == item['poLine']&&item1['poNumber'] == item['poNumber'])) return
+
itemCodes.push(item['itemCode'])
tableData.value.push(newRow)
})
@@ -216,7 +232,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
setV[formField] = val[0][searchField]
if(formField == 'ppNumber'){
//新增--选择完要货计划,自动展示明细
- getSearchTableData(val[0]['number'],formField,searchField)
+
+ setV['poNumber'] = val[0]['poNumber'] //采购订单
+ getSearchTableData(val[0]['number'],formField,searchField,0)
// 设置计划到货时间
@@ -225,6 +243,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
let deliveryDate = formatDate(val[0]['deliveryDate'],'YYYY-MM-DD')
planArriveTimeStr.value = deliveryDate + ' '+ beginTime+":00"
setV['planArriveTime']= new Date(planArriveTimeStr.value).valueOf();
+ setV['arriveTime']= new Date(planArriveTimeStr.value).valueOf();
}
// 清空子表数据
tableData.value = []
@@ -239,9 +258,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
})
}
-const getSearchTableData = async (number,formField,searchField)=>{
+const getSearchTableData = async (number,formField,searchField,isAll)=>{
const {tableObject ,tableMethods} = useTable({
- defaultParams:{number},
+ defaultParams:{number,flag:1,isAll},
getListApi: PurchasePlanDetailApi.getPurchasePlanDetailPage // 分页接口
})
tableObject.pageSize = 500
@@ -257,11 +276,21 @@ const getSearchTableData = async (number,formField,searchField)=>{
tableObject.tableList.forEach(row=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row}))
newRow[formField] = row[searchField]
+ newRow['allowOverShipment'] = row['allowOverShipment'] // 是否允许超发
newRow['poNumber'] = row['poNumber']
newRow['itemCode'] = row['itemCode']
newRow['poLine'] = row['poLine']
newRow['orderQty'] = row['orderQty']
newRow['uom'] = row['uom']
+ newRow['planQty'] = row['planQty']
+ newRow['shippedQty'] = row['shippedQty']
+ newRow['qty'] = row['planQty'] - row['shippedQty']
+ newRow['produceDate'] = dayjs().valueOf() // 是否允许超发
+ let produceDateStr = formatDate(newRow['produceDate'],'YYYYMMDD');
+ newRow['batch'] = produceDateStr
+ newRow['supplierBatch'] = produceDateStr
+ newRow.expireDate = row['expireTime']?addDay(newRow['produceDate'],row['expireTime']).valueOf():dayjs('2099-12-31').valueOf()
+
tableData.value.push(newRow)
itemCodes.push(row['itemCode'])
})
@@ -298,6 +327,33 @@ const submitForm = async (formType, submitData) => {
formRef.value.formLoading = false
return
}
+ // 2.2. 如果物料不允许超发,申请发货数量不能大于 计划数量 - 已发货数量
+ let itemCodes = []
+ let itemCodeSum = []
+ data.subList.forEach(item=>{
+ if(item['allowOverShipment']!='TRUE'){
+ let qtyDefault = item['planQty'] - item['shippedQty']
+ if(item['qty']>qtyDefault){
+ itemCodes.push(item['itemCode'])
+ }
+
+ if(!itemCodeSum.includes(item['itemCode'])){
+ let planQty = item['planQty'] //计划数量
+ let sumQty = data.subList.filter(item1=>item1['itemCode']==item['itemCode']).reduce((prev, item1) => prev + item1['qty'],0)
+ if(sumQty>planQty){
+ itemCodeSum.push(item['itemCode'])
+ }
+ }
+ }
+ })
+ if(itemCodes.length>0){
+ message.error(`${itemCodes.join(',')}${t('ts.不允许超发')}`)
+ return
+ }
+ if(itemCodeSum.length>0){
+ message.error(`${itemCodeSum.join(',')}${t('ts.总数量超出计划数量')}`)
+ return
+ }
try {
if (formType === 'create') {
let planArriveStr = formatDate(data.planArriveTime);
@@ -335,11 +391,31 @@ const submitForm = async (formType, submitData) => {
formRef.value.formLoading = false
}
}
+
+
+const inputNumberChange = (field, val,row, index) => {
+ if(field=='qty'){
+ if(row['allowOverShipment']!='TRUE'){
+ let qtyDefault = row['planQty'] - row['shippedQty']
+ if(row['qty']>qtyDefault){
+ message.error(`${row['itemCode']}${t('ts.不允许超发')}`)
+ }
+ let planQty = row['planQty'] //计划数量
+ let sumQty = tableData.value.filter(item1=>item1['itemCode']==row['itemCode']).reduce((prev, item1) => prev + item1['qty'],0)
+ if(sumQty>planQty){
+ message.error(`${row['itemCode']}${t('ts.总数量超出计划数量')}`)
+ }
+ }
+ }
+ console.log('inputNumberChange',field, val,row, index)
+}
const formFormDateChange = (field, val,row, index) => {
+ console.log('formFormDateChange',field, val,row, index)
if(field == 'produceDate'){
let produceDateStr = formatDate(val,'YYYYMMDD');
row.batch = produceDateStr
row.supplierBatch = produceDateStr
+ row.expireDate = row['expireTime']?addDay(row['produceDate'],row['expireTime']).valueOf():dayjs('2099-12-31').valueOf()
}
}
//供应商代码 回车搜索
diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts
index 8bdd03730..672b2ea87 100644
--- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts
+++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts
@@ -1,5 +1,5 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
-import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
+import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
@@ -9,7 +9,7 @@ import { validateHanset, validateEmail } from '@/utils/validator'
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
import * as ItemPackageApi from '@/api/wms/itempackage/index'
-import { validateInteger } from '@/utils/validator'
+import {validateInteger} from '@/utils/validator'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@@ -21,507 +21,553 @@ const queryParams = {
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData = data?.list[0] || {}
-// 获取当前操作人的部门
+ // 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user'
import { TableColumn } from '@/types/table'
import { tr } from 'element-plus/es/locale'
-const userStore = useUserStore()
-const userDept = userStore.userSelfInfo.dept
-// id 转str 否则form回显匹配不到
-userDept.id = userDept.id.toString()
-const userDeptArray: any = [userDept]
+ const userStore = useUserStore()
+ const userDept = userStore.userSelfInfo.dept
+ // id 转str 否则form回显匹配不到
+ userDept.id = userDept.id.toString()
+ const userDeptArray:any = [userDept]
/**
* @returns {Array} 供应商发货申请主表
*/
-export const SupplierdeliverRequestMain = useCrudSchemas(
- reactive([
- {
- label: '单据号',
- field: 'number',
- sort: 'custom',
- table: {
- width: 180,
- fixed: 'left'
- },
- isForm: false,
- isSearch: true
- },
- {
- label: '供应商代码',
- field: 'supplierCode',
- sort: 'custom',
- table: {
- width: 150
- },
- sortTableDefault: 2,
- isSearch: true,
- form: {
- // labelMessage: '信息提示说明!!!',
- componentProps: {
- enterSearch: true,
- isSearchList: true, // 开启查询弹窗
- searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
- searchField: 'code', // 查询弹窗赋值字段
- searchTitle: '供应商信息', // 查询弹窗标题
- searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
- searchPage: SupplierApi.getSupplierPageSCP // 查询弹窗所需分页方法
- }
+export const SupplierdeliverRequestMain = useCrudSchemas(reactive([
+ {
+ label: '发货单号',
+ field: 'asnNumber',
+ sort: 'custom',
+ table: {
+ width: 180,
+ fixed: 'left'
+ },
+ isSearch: true,
+ isForm: false
+ },
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180,
+ fixed: 'left'
+ },
+ isTable:false,
+ isForm: false,
+ isSearch: true,
+ },
+ {
+ label: '供应商代码',
+ field: 'supplierCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable:false,
+ isSearch: true,
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ enterSearch: true,
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '供应商信息', // 查询弹窗标题
+ searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
+ searchPage: SupplierApi.getSupplierPageSCP // 查询弹窗所需分页方法
}
- },
- {
- label: '发货单号',
- field: 'asnNumber',
- sort: 'custom',
- table: {
- width: 150
- },
- isSearch: true,
- isForm: true
- },
- {
- label: '要货计划单号',
- field: 'ppNumber',
- sort: 'custom',
- isTable: true,
- table: {
- width: 150
- },
- sortTableDefault: 1,
- form: {
- // labelMessage: '信息提示说明!!!',
- componentProps: {
- dialogWidth: '1055px', //搜索出来弹窗的宽度
- isSearchList: true, // 开启查询弹窗
- searchListPlaceholder: '请选择要货计划单号', // 输入框占位文本
- searchField: 'number', // 查询弹窗赋值字段
- searchTitle: '要货计划信息', // 查询弹窗标题
- searchAllSchemas: PurchasePlanDetail.allSchemas, // 查询弹窗所需类
- searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage, // 查询弹窗所需分页方法
- searchCondition: [
- {
- key: 'supplierCode',
- value: 'supplierCode',
- message: '请填写供应商代码!',
- isMainValue: true
- },
- {
- key: 'status',
- value: 4,
- isMainValue: false
- },
- {
- key: 'available',
- value: 'TRUE',
- isMainValue: false
- }
- ]
- }
- }
- },
- {
- label: '联系人姓名',
- field: 'contactName',
- sort: 'custom',
- isTable: false,
- table: {
- width: 150
- }
- },
- {
- label: '联系人电话',
- field: 'contactPhone',
- sort: 'custom',
- isTable: false,
- table: {
- width: 150
+ }
+ },
+
+ {
+ label: '要货计划单号',
+ field: 'ppNumber',
+ sort: 'custom',
+ isTable:true,
+ table: {
+ width: 150
+ },
+ sortTableDefault:9,
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ dialogWidth:'1055px',//搜索出来弹窗的宽度
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择要货计划单号', // 输入框占位文本
+ searchField: 'number', // 查询弹窗赋值字段
+ searchTitle: '要货计划信息', // 查询弹窗标题
+ searchAllSchemas: PurchasePlanDetail.allSchemas, // 查询弹窗所需类
+ searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage, // 查询弹窗所需分页方法
+ searchCondition: [
+ {
+ key: 'supplierCode',
+ value: 'supplierCode',
+ message: '请填写供应商代码!',
+ isMainValue: true
+ },
+ {
+ key: 'status',
+ value: 4,
+ isMainValue: false
+ },
+ {
+ key: 'available',
+ value: "TRUE",
+ isMainValue: false
+ }]
}
- },
- {
- label: '联系人电子邮件',
- field: 'contactEmail',
- sort: 'custom',
- isTable: false,
- table: {
- width: 150
+ }
+ },
+ {
+ label: '要求到货时间',
+ field: 'arriveTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isTable:false,
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ disabled: true,
+ style: { width: '100%' },
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
}
},
- {
- label: '供应商发货仓库代码',
- field: 'fromWarehouseCode',
- sort: 'custom',
- isTable: false,
- table: {
- width: 150
- },
- form: {
- componentProps: {
- disbaled: true
- }
- },
- isForm: true
- },
- {
- label: '到仓库代码',
- field: 'toWarehouseCode',
- sort: 'custom',
- isTable: false,
- table: {
- width: 150
- },
- isForm: false
- },
- {
- label: '到月台代码',
- field: 'toDockCode',
- sort: 'custom',
- isTable: false,
- table: {
- width: 150
- },
- isForm: false
- },
- {
- label: '时间窗口',
- field: 'timeWindow',
- sort: 'custom',
- isTable: false,
- table: {
- width: 150
- },
- isForm: false
- },
- {
- label: '计划到货时间',
- field: 'planArriveTime',
- formatter: dateFormatter,
- detail: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
- },
- sort: 'custom',
- table: {
- width: 180
- },
- isTable: false,
- form: {
+ },
+ {
+ label: '采购订单',
+ field: 'poNumber',
+ isForm:true,
+ isTable:false,
+ isTableForm:false,
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
disabled: true,
- component: 'DatePicker',
- componentProps: {
- style: { width: '100%' },
- type: 'datetime',
- dateFormat: 'YYYY-MM-DD HH:mm:ss',
- valueFormat: 'x'
- }
}
- },
- {
- label: '承运商',
- field: 'carrierCode',
- sort: 'custom',
- isTable: false,
- table: {
- width: 150
+ }
+ },
+ {
+ label: '计划到货时间',
+ field: 'planArriveTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isTable:true,
+ sortTableDefault:6,
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: { width: '100%' },
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
}
},
- {
- label: '运输方式',
- field: 'transferMode',
- dictType: DICT_TYPE.TRANSFER_MODE,
- sort: 'custom',
- isTable: false,
- table: {
- width: 150
+ },
+ {
+ label: '发货联系人姓名',
+ field: 'contactName',
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '发货联系人电话',
+ field: 'contactPhone',
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 150
+ },
+ },
+ // {
+ // label: '联系人电子邮件',
+ // field: 'contactEmail',
+ // sort: 'custom',
+ // isTable:false,
+ // table: {
+ // width: 150
+ // },
+ // },
+ // {
+ // label: '供应商发货仓库代码',
+ // field: 'fromWarehouseCode',
+ // sort: 'custom',
+ // isTable:false,
+ // table: {
+ // width: 150
+ // },
+ // form: {
+ // componentProps: {
+ // disbaled: true
+ // }
+ // },
+ // isForm: true
+ // },
+ {
+ label: '到仓库代码',
+ field: 'toWarehouseCode',
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 150
+ },
+ isForm: false
+ },
+ {
+ label: '到月台代码',
+ field: 'toDockCode',
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 150
+ },
+ isForm: false
+ },
+ {
+ label: '时间窗口',
+ field: 'timeWindow',
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 150
+ },
+ isForm: false
+ },
+
+ {
+ label: '承运商',
+ field: 'carrierCode',
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '运输方式',
+ field: 'transferMode',
+ dictType: DICT_TYPE.TRANSFER_MODE,
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '车牌号',
+ field: 'vehiclePlateNumber',
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 150
+ },
+ },
+ // {
+ // label: '业务类型',
+ // field: 'businessType',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // form: {
+ // value: 'SupplierDeliver',
+ // componentProps: {
+ // disabled: true,
+ // }
+ // }
+ // },
+ {
+ label: '备注',
+ field: 'remark',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable: false
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: { width: '100%' },
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
}
},
- {
- label: '车牌号',
- field: 'vehiclePlateNumber',
- sort: 'custom',
- isTable: false,
- table: {
- width: 150
+ isForm: false
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 150
+ },
+ isForm: false
+ },
+ {
+ label: '申请时间',
+ field: 'requestTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: { width: '100%' },
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
}
},
- // {
- // label: '业务类型',
- // field: 'businessType',
- // sort: 'custom',
- // table: {
- // width: 150
- // },
- // form: {
- // value: 'SupplierDeliver',
- // componentProps: {
- // disabled: true,
- // }
- // }
- // },
- {
- label: '备注',
- field: 'remark',
- sort: 'custom',
- table: {
- width: 150
- },
- isTable: false
- },
- {
- label: '创建时间',
- field: 'createTime',
- formatter: dateFormatter,
- detail: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
- },
- sort: 'custom',
- isTable: false,
- table: {
- width: 180
- },
- form: {
- component: 'DatePicker',
- componentProps: {
- style: { width: '100%' },
- type: 'datetime',
- dateFormat: 'YYYY-MM-DD HH:mm:ss',
- valueFormat: 'x'
- }
- },
- isForm: false
- },
- {
- label: '创建者',
- field: 'creator',
- sort: 'custom',
- isTable: false,
- table: {
- width: 150
- },
- isForm: false
- },
- {
- label: '申请时间',
- field: 'requestTime',
- formatter: dateFormatter,
- detail: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
- },
- sort: 'custom',
- isTable: false,
- table: {
- width: 180
- },
- form: {
- component: 'DatePicker',
- componentProps: {
- style: { width: '100%' },
- type: 'datetime',
- dateFormat: 'YYYY-MM-DD HH:mm:ss',
- valueFormat: 'x'
- }
- },
- isForm: false
- },
- {
- label: '截止时间',
- field: 'dueTime',
- formatter: dateFormatter,
- detaul: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
- },
- sort: 'custom',
- isTable: false,
- table: {
- width: 180
- },
- form: {
- component: 'DatePicker',
- componentProps: {
- style: { width: '100%' },
- type: 'datetime',
- dateFormat: 'YYYY-MM-DD HH:mm:ss',
- valueFormat: 'x'
- }
- },
- isForm: false
- },
- // {
- // label: '部门',
- // field: 'departmentCode',
- // sort: 'custom',
- // table: {
- // width: 150
- // },
- // 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: 'status',
- dictType: DICT_TYPE.REQUEST_STATUS,
- dictClass: 'string',
- isTable: true,
- isForm: false,
- isSearch: false,
- sort: 'custom',
- table: {
- width: 150
- },
- form: {
- value: '1',
- componentProps: {
- disabled: true
- }
+ isForm: false
+ },
+ {
+ label: '截止时间',
+ field: 'dueTime',
+ formatter: dateFormatter,
+ detaul: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: { width: '100%' },
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
}
},
- {
- label: '最后更新时间',
- field: 'updateTime',
- formatter: dateFormatter,
- detail: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
- },
- sort: 'custom',
- isTable: false,
- table: {
- width: 180
- },
- form: {
- component: 'DatePicker',
- componentProps: {
- style: { width: '100%' },
- type: 'datetime',
- dateFormat: 'YYYY-MM-DD HH:mm:ss',
- valueFormat: 'x'
- }
- },
- isForm: false
- },
- {
- label: '最后更新者',
- field: 'updater',
- sort: 'custom',
- table: {
- width: 150
- },
- isTable: false,
- isForm: false
- },
- {
- label: '自动提交',
- field: 'autoCommit',
- dictType: DICT_TYPE.TRUE_FALSE,
- dictClass: 'string',
- isTable: false,
- sort: 'custom',
- isForm: false,
- table: {
- width: 150
- },
- form: {
- component: 'Switch',
- value: requestsettingData.autoCommit,
- componentProps: {
- inactiveValue: 'FALSE',
- activeValue: 'TRUE',
- disabled: true
- }
+ isForm: false
+ },
+ // {
+ // label: '部门',
+ // field: 'departmentCode',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // 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: 'status',
+ dictType: DICT_TYPE.REQUEST_STATUS,
+ dictClass: 'string',
+ isTable: true,
+ isForm:false,
+ isSearch: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:2,
+ form: {
+ value: '1',
+ componentProps: {
+ disabled: true
}
- },
- {
- label: '自动通过',
- field: 'autoAgree',
- dictType: DICT_TYPE.TRUE_FALSE,
- dictClass: 'string',
- isTable: false,
- sort: 'custom',
- table: {
- width: 150
- },
- isForm: false,
- form: {
- component: 'Switch',
- value: requestsettingData.autoAgree,
- componentProps: {
- inactiveValue: 'FALSE',
- activeValue: 'TRUE',
- disabled: true
- }
+ }
+ },
+ {
+ label: '最后更新时间',
+ field: 'updateTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: { width: '100%' },
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
}
},
- {
- label: '自动执行',
- field: 'autoExecute',
- dictType: DICT_TYPE.TRUE_FALSE,
- dictClass: 'string',
- isTable: false,
- sort: 'custom',
- table: {
- width: 150
- },
- isForm: false,
- form: {
- component: 'Switch',
- value: requestsettingData.autoExecute,
- componentProps: {
- inactiveValue: 'FALSE',
- activeValue: 'TRUE',
- disabled: true
- }
+ isForm: false
+ },
+ {
+ label: '最后更新者',
+ field: 'updater',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable:false,
+ isForm: false
+ },
+ {
+ label: '自动提交',
+ field: 'autoCommit',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable:false,
+ sort: 'custom',
+ isForm:false,
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'Switch',
+ value: requestsettingData.autoCommit,
+ 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: 'autoAgree',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm:false,
+ form: {
+ component: 'Switch',
+ value: requestsettingData.autoAgree,
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE',
+ disabled: true,
}
- },
- {
- label: '操作',
- field: 'action',
- isDetail: false,
- isForm: false,
- table: {
- width: 450,
- fixed: 'right'
+ }
+ },
+ {
+ label: '自动执行',
+ field: 'autoExecute',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm:false,
+ 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: 450,
+ fixed: 'right'
+ },
+ }
+]))
//表单校验
export const SupplierdeliverRequestMainRules = reactive({
- supplierCode: [{ required: true, message: '请输入供应商代码', trigger: 'blur' }],
- ppNumber: [{ required: true, message: '请输入要货计划单号', trigger: 'blur' }],
- asnNumber: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
- contactName: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
+ supplierCode: [
+ { required: true, message: '请输入供应商代码', trigger: 'blur' }
+ ],
+ ppNumber: [
+ { required: true, message: '请输入要货计划单号', trigger: 'blur' }
+ ],
+ asnNumber: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' }
+ ],
+ contactName: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' }
+ ],
contactPhone: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator: validateHanset, message: '请输入正确的手机号', trigger: 'blur' }
@@ -530,20 +576,36 @@ export const SupplierdeliverRequestMainRules = reactive({
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator: validateEmail, message: '请输入正确的邮箱地址', trigger: 'blur' }
],
- carrierCode: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
- transferMode: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
- vehiclePlateNumber: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
- remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
- planArriveTime: [{ required: true, message: '请输入计划到货时间', trigger: 'blur' }],
+ carrierCode: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' }
+ ],
+ transferMode: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' }
+ ],
+ vehiclePlateNumber: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' }
+ ],
+ remark: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' }
+ ],
+ planArriveTime: [
+ { required: true, message: '请输入计划到货时间', trigger: 'blur' }
+ ],
// departmentCode: [
// { required: true, message: '请输入部门', trigger: 'blur' }
// ],
- autoCommit: [{ required: true, message: '请选择是否自动提交', trigger: 'change' }],
- autoAgree: [{ required: true, message: '请选择是否自动通过', trigger: 'change' }],
- autoExecute: [{ required: true, message: '请选择是否自动执行', trigger: 'change' }],
+ 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' }
// ],
@@ -552,705 +614,800 @@ export const SupplierdeliverRequestMainRules = reactive({
/**
* @returns {Array} 供应商发货申请子表
*/
-export const SupplierdeliverRequestDetail = useCrudSchemas(
- reactive([
- {
- label: '采购订单号',
- field: 'poNumber',
- sort: 'custom',
- table: {
- width: 150
- },
- isSearch: true,
- form: {
- // labelMessage: '信息提示说明!!!',
- componentProps: {
- isSearchList: true,
- searchListPlaceholder: '请选择订单号',
- searchField: 'number',
- searchTitle: '要货计划信息',
- searchAllSchemas: PurchasePlanDetail.allSchemas,
- searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
- searchCondition: [
- {
- key: 'number',
- value: 'ppNumber',
- message: '请填写要货计划单号!',
- isMainValue: true
- },
- {
- key: 'available',
- value: 'TRUE',
- isMainValue: false
- }
- ]
- }
- },
- tableForm: {
- isInpuFocusShow: true,
- searchListPlaceholder: '请选择订单号',
- searchField: 'number',
- searchTitle: '要货计划信息',
- searchAllSchemas: PurchasePlanDetail.allSchemas,
- searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
- searchCondition: [
- {
- key: 'number',
- value: 'ppNumber',
- message: '请填写要货计划单号!',
- isMainValue: true
- },
- {
- key: 'available',
- value: 'TRUE',
- isMainValue: false
- }
- ]
- }
- },
- {
- label: '订单行',
- field: 'poLine',
- sort: 'custom',
- table: {
- width: 150
- },
- form: {
- componentProps: {
- disabled: true
- }
- },
- tableForm: {
- disabled: true
- }
- },
- {
- label: '物料代码',
- field: 'itemCode',
- sort: 'custom',
- isSearch: true,
- table: {
- width: 150
- },
- sortTableDefault: 2,
- form: {
- componentProps: {
- disabled: true
- }
- },
- tableForm: {
+export const SupplierdeliverRequestDetail = useCrudSchemas(reactive([
+
+ {
+ label: '订单行',
+ field: 'poLine',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ componentProps: {
disabled: true
}
},
- {
- label: '批次',
- field: 'batch',
- sort: 'custom',
- table: {
- width: 150
- },
- hiddenInMain: true,
- tableForm: {
+ tableForm: {
+ disabled: true
+ }
+ },
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ isSearch:true,
+ table: {
+ width: 150
+ },
+ sortTableDefault:3,
+ form: {
+ componentProps: {
disabled: true
}
},
- {
- label: '供应商批次',
- field: 'supplierBatch',
- sort: 'custom',
- table: {
- width: 150
- },
- tableForm: {
- disabled: false
+ tableForm: {
+ disabled: true
+ }
+ },
+ {
+ label: '申请发货数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:4,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 1,
+ precision: 6
}
},
- {
- label: '生产日期',
- field: 'produceDate',
- formatter: dateFormatter2,
- detail: {
- dateFormat: 'YYYY-MM-DD'
- },
- sort: 'custom',
- table: {
- width: 180
- },
- form: {
- component: 'DatePicker',
- componentProps: {
- style: { width: '100%' },
- type: 'date',
- dateFormat: 'YYYY-MM-DD',
- valueFormat: 'x'
- }
- },
- tableForm: {
- type: 'FormDate',
+ tableForm: {
+ type: 'InputNumber',
+ min: 1,
+ precision: 6
+ }
+ },
+ {
+ label: '生产日期',
+ field: 'produceDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ sortTableDefault:7,
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width: '100%'},
+ type: 'date',
dateFormat: 'YYYY-MM-DD',
- valueFormat: 'x'
+ valueFormat: 'x',
}
},
-
- // {
- // label: '替代批次',
- // field: 'altBatch',
- // sort: 'custom',
- // table: {
- // width: 150
- // },
- // isTableForm: false,
- // isForm: false
- // },
- {
- label: '到货日期',
- field: 'arriveDate',
- formatter: dateFormatter2,
- detail: {
- dateFormat: 'YYYY-MM-DD'
- },
- sort: 'custom',
- hiddenInMain: true,
- table: {
- width: 180
- },
- isForm: false,
- form: {
- component: 'DatePicker',
- componentProps: {
- style: { width: '100%' },
- type: 'date',
- dateFormat: 'YYYY-MM-DD',
- valueFormat: 'x'
- }
- },
-
- isTableForm: false,
- tableForm: {
- type: 'FormDate',
- dateFormat: 'YYYY-MM-DD',
- valueFormat: 'x'
+ tableForm: {
+ type: 'FormDate',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ {
+ label: '供应商批次',
+ field: 'supplierBatch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:8,
+ tableForm: {
+ disabled: false
+ }
+ },
+ {
+ label: '发货批次',
+ field: 'batch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ hiddenInMain:true,
+ tableForm: {
+ disabled: true
+ }
+ },
+ {
+ label: '计划数量',
+ field: 'planQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable:false,
+ tableForm: {
+ disabled: true,
+ type: 'InputNumber',
+ precision: 6
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 0,
+ precision: 6
}
- },
- {
- label: '过期日期',
- hiddenInMain: true,
- field: 'expireDate',
- formatter: dateFormatter2,
- detail: {
- dateFormat: 'YYYY-MM-DD'
- },
- sort: 'custom',
- table: {
- width: 180
- },
- form: {
- component: 'DatePicker',
- componentProps: {
- style: { width: '100%' },
- type: 'date',
- dateFormat: 'YYYY-MM-DD',
- valueFormat: 'x'
- }
- },
- // tableForm: {
- // type: 'FormDate',
- // dateFormat: 'YYYY-MM-DD',
- // valueFormat: 'x',
- // }
- tableForm: {
- type: 'slot',
- disabled: true
+ }
+ },
+ {
+ label: '已发货数量',
+ field: 'shippedQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ disabled: true,
+ type: 'InputNumber',
+ precision: 6
+ },
+ isTable: false,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 0,
+ precision: 6
+ }
+ }
+ },
+
+
+ // {
+ // label: '替代批次',
+ // field: 'altBatch',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isTableForm: false,
+ // isForm: false
+ // },
+ {
+ label: '到货日期',
+ field: 'arriveDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ hiddenInMain:true,
+ table: {
+ width: 180
+ },
+ isForm: false,
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
}
},
- {
- label: '发货数量',
- field: 'qty',
- sort: 'custom',
- table: {
- width: 150
- },
- sortTableDefault: 2,
- form: {
- component: 'InputNumber',
- componentProps: {
- min: 1,
- precision: 6
- }
- },
- tableForm: {
- type: 'InputNumber',
- min: 1,
- precision: 6
+
+ isTableForm: false,
+ tableForm: {
+ type: 'FormDate',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ {
+ label: '过期日期',
+ hiddenInMain:true,
+ field: 'expireDate',
+ formatter: dateFormatter2,
+ isTableForm:false,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
}
},
- {
- label: '订单数量',
- field: 'orderQty',
- table: {
- width: 150
- },
- hiddenInMain: true,
- form: {
- component: 'InputNumber',
- componentProps: {
- disabled: true,
- min: 0,
- precision: 6
- }
- },
- tableForm: {
+ // tableForm: {
+ // type: 'FormDate',
+ // dateFormat: 'YYYY-MM-DD',
+ // valueFormat: 'x',
+ // }
+ tableForm:{
+ type: 'slot',
+ disabled: true
+ }
+ },
+ // {
+ // label: '发货数量',
+ // field: 'qty',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // sortTableDefault:2,
+ // form: {
+ // component: 'InputNumber',
+ // componentProps: {
+ // min: 1,
+ // precision: 6
+ // }
+ // },
+ // tableForm: {
+ // type: 'InputNumber',
+ // min: 1,
+ // precision: 6
+ // }
+ // },
+ {
+ label: '订单数量',
+ field: 'orderQty',
+ table: {
+ width: 150
+ },
+ hiddenInMain:true,
+ isTableForm: false,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
disabled: true,
- type: 'InputNumber',
min: 0,
precision: 6
}
},
-
- {
- label: '供应商计量数量',
- field: 'supplierPackQty',
- sort: 'custom',
- hiddenInMain: true,
- table: {
- width: 150
- },
- form: {
- component: 'InputNumber',
- componentProps: {
- min: 1,
- precision: 6
- }
- },
- isTableForm: false,
- isForm: false,
- tableForm: {
- type: 'InputNumber',
+ tableForm: {
+ disabled: true,
+ type: 'InputNumber',
+ min: 0,
+ precision: 6
+ }
+ },
+
+ {
+ label: '供应商计量数量',
+ field: 'supplierPackQty',
+ sort: 'custom',
+ hiddenInMain:true,
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
min: 1,
precision: 6
}
},
- {
- label: '供应商计量单位',
- field: 'supplierPackUnit',
- dictType: DICT_TYPE.UOM,
- dictClass: 'string',
- hiddenInMain: true,
- isTable: true,
- sort: 'custom',
- table: {
- width: 150
- },
- isTableForm: false,
- isForm: false,
- tableForm: {
- type: 'Select'
- }
- },
- {
- label: '转换率',
- hiddenInMain: true,
- field: 'convertRate',
- sort: 'custom',
- table: {
- width: 150
- },
- form: {
- component: 'InputNumber',
- componentProps: {
- min: 0
- }
- },
- isTableForm: false,
- isForm: false,
- tableForm: {
- type: 'InputNumber',
+ isTableForm: false,
+ isForm: false,
+ tableForm: {
+ type: 'InputNumber',
+ min: 1,
+ precision: 6
+ }
+ },
+ {
+ label: '供应商计量单位',
+ field: 'supplierPackUnit',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ hiddenInMain:true,
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false,
+ tableForm: {
+ type: 'Select'
+ }
+ },
+ {
+ label: '转换率',
+ hiddenInMain:true,
+ field: 'convertRate',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
min: 0
}
},
- {
- label: '单据号',
- hiddenInMain: true,
- field: 'number',
- sort: 'custom',
- table: {
- width: 180
- },
- isTableForm: false,
- form: {
- componentProps: {
- disabled: true
- }
+ isTableForm: false,
+ isForm: false,
+ tableForm: {
+ type: 'InputNumber',
+ min: 0
+ }
+ },
+ {
+ label: '单据号',
+ hiddenInMain:true,
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isTableForm: false,
+ form: {
+ componentProps: {
+ disabled: true
}
- },
+ }
+ },
+
+ {
+ label: '计量单位',
+ field: 'uom',
+ sort: 'custom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ sortTableDefault:5,
+ table: {
+ width: 150
+ },
+ tableForm: {
+ disabled: true,
+ type: 'Select'
+ }
+ },
+ {
+ label: '采购订单号',
+ field: 'poNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch:true,
+ sortTableDefault:10,
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ disabled:true,
+ // isSearchList: true,
+ searchListPlaceholder: '请选择订单号',
+ searchField: 'number',
+ searchTitle: '要货计划信息',
+ searchAllSchemas: PurchasePlanDetail.allSchemas,
+ searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
+ searchCondition: [
+ {
+ key: 'number',
+ value: 'ppNumber',
+ message: '请填写要货计划单号!',
+ isMainValue: true
+ },
+ {
+ key: 'flag',
+ value: 1,
+ isMainValue: false
+ },
+ {
+ key: 'isAll',
+ value: '1',
+ isMainValue: false
+ },
+ {
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }
- {
- label: '计量单位',
- field: 'uom',
- sort: 'custom',
- dictType: DICT_TYPE.UOM,
- dictClass: 'string',
- isTable: true,
- sortTableDefault: 3,
- table: {
- width: 150
- },
- tableForm: {
- disabled: true,
- type: 'Select'
+ ]
}
},
-
- {
- label: '从货主代码',
- field: 'fromOwnerCode',
- sort: 'custom',
- table: {
- width: 150
- },
- hiddenInMain: true,
- isTableForm: false,
- isForm: false
- },
- {
- label: '到货主代码',
- field: 'toOwnerCode',
- sort: 'custom',
- table: {
- width: 150
- },
- hiddenInMain: true,
- isTableForm: false,
- isForm: false
- },
- {
- label: '物料名称',
- field: 'itemName',
- sort: 'custom',
- table: {
- width: 150
- },
- hiddenInMain: true,
- isTableForm: false,
- isForm: false
- },
- {
- label: '物料描述1',
- field: 'itemDesc1',
- sort: 'custom',
- table: {
- width: 150
- },
- hiddenInMain: true,
- isTableForm: false,
- isForm: false
- },
- {
- label: '物料描述2',
- field: 'itemDesc2',
- sort: 'custom',
- table: {
- width: 150
- },
- hiddenInMain: true,
- isTableForm: false,
- isForm: false
- },
- {
- label: '项目代码',
- field: 'projectCode',
- sort: 'custom',
- table: {
- width: 150
- },
- hiddenInMain: true,
- isTableForm: false,
- isForm: false
- },
- {
- label: '创建时间',
- field: 'createTime',
- formatter: dateFormatter,
- detail: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
- },
- hiddenInMain: true,
- form: {
- component: 'DatePicker',
- componentProps: {
- style: { width: '100%' },
- type: 'datetime',
- dateFormat: 'YYYY-MM-DD HH:mm:ss',
- valueFormat: 'x'
- }
- },
- sort: 'custom',
- table: {
- width: 180
- },
- isTableForm: false,
- isForm: false
- },
- {
- label: '创建者',
- field: 'creator',
- sort: 'custom',
- table: {
- width: 150
- },
- hiddenInMain: true,
- isTableForm: false,
- isForm: false
- },
- {
- label: '最后更新时间',
- field: 'updateTime',
- 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'
- }
- },
- hiddenInMain: true,
- sort: 'custom',
- table: {
- width: 180
- },
- isTableForm: false,
- isForm: false
- },
- {
- label: '最后更新者',
- field: 'updater',
- sort: 'custom',
- table: {
- width: 150
- },
- hiddenInMain: true,
- isTableForm: false,
- isForm: false
- },
- {
- label: '备注',
- field: 'remark',
- sort: 'custom',
- hiddenInMain: true,
- table: {
- width: 150
+ tableForm: {
+ disabled:true,
+ isInpuFocusShow: false,
+ searchListPlaceholder: '请选择订单号',
+ searchField: 'number',
+ searchTitle: '要货计划信息',
+ searchAllSchemas: PurchasePlanDetail.allSchemas,
+ searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
+ searchCondition: [
+ {
+ key: 'number',
+ value: 'ppNumber',
+ message: '请填写要货计划单号!',
+ isMainValue: true
+ },
+ {
+ key: 'flag',
+ value: 1,
+ isMainValue: false
+ },
+ {
+ key: 'isAll',
+ value: '1',
+ isMainValue: false
+ },
+ {
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }]
+ }
+ },
+ {
+ label: '从货主代码',
+ field: 'fromOwnerCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ hiddenInMain:true,
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '到货主代码',
+ field: 'toOwnerCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ hiddenInMain:true,
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '物料名称',
+ field: 'itemName',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ hiddenInMain:true,
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '物料描述1',
+ field: 'itemDesc1',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ hiddenInMain:true,
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '物料描述2',
+ field: 'itemDesc2',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ hiddenInMain:true,
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '项目代码',
+ field: 'projectCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ hiddenInMain:true,
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ hiddenInMain:true,
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: { width: '100%' },
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
}
},
- {
- label: '操作',
- hiddenInMain: true,
- field: 'action',
- isDetail: false,
- isForm: false,
- table: {
- width: 180,
- fixed: 'right'
- },
- isTableForm: false
- }
- ])
-)
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isTableForm: false,
+ isForm: false,
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ hiddenInMain:true,
+ isTableForm: false,
+ isForm: false,
+ },
+ {
+ label: '最后更新时间',
+ field: 'updateTime',
+ 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',
+ }
+ },
+ hiddenInMain:true,
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isTableForm: false,
+ isForm: false,
+ },
+ {
+ label: '最后更新者',
+ field: 'updater',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ hiddenInMain:true,
+ isTableForm: false,
+ isForm: false,
+ },
+ {
+ label: '备注',
+ field: 'remark',
+ sort: 'custom',
+ isTable: false,
+ hiddenInMain:true,
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '操作',
+ hiddenInMain:true,
+ field: 'action',
+ isDetail: false,
+ isForm: false,
+ table: {
+ width: 180,
+ fixed: 'right'
+ },
+ isTableForm: false,
+ }
+]))
// 批次校验
const validateBatch = (rule: any, value: any, callback: any) => {
- const reg = /^[_a-zA-Z0-9]+$/
+ const reg = /^[_a-zA-Z0-9]+$/;
if (value == '' || value == undefined || value == null) {
- callback()
+ callback();
} else {
- if (!reg.test(value)) {
- callback(new Error('英文字母、数字或下划线'))
- } else {
- callback()
- }
+ if (!reg.test(value)) {
+ callback(new Error('英文字母、数字或下划线'));
+ } else {
+ callback();
+ }
}
}
+
+const validateQty = (rule: any, value: any, callback: any,a,b) => {
+ console.log('validateQty',rule, value,a,b)
+ // if (!reg.test(value)) {
+ // callback(new Error('英文字母、数字或下划线'));
+ // } else {
+ callback();
+ // }
+}
//表单校验
export const SupplierdeliverRequestDetailRules = reactive({
// packingNumber: [
// { required: true, message: '请输入包装号', trigger: 'blur' }
// ],
- qty: [{ required: true, message: '请输入发货数量', trigger: 'change' }],
+ qty:[
+ { required: true, message: '请输入发货数量1', trigger: 'change' },
+ // { validator: validateQty, trigger: 'change' },
+ ],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator: validateBatch, trigger: 'change' }
],
- produceDate: [{ required: true, message: '请输入生产日期', trigger: 'blur' }],
+ produceDate: [
+ { required: true, message: '请输入生产日期', trigger: 'blur' }
+ ],
packQty: [
- { required: true, message: '请输入包装数量', trigger: 'blur' }
- // { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
+ { required: true, message: '请输入包装数量', trigger: 'blur' },
+ { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
+ ],
+ poNumber: [
+ { required: true, message: '请选择订单号', trigger: 'change' }
+ ],
+ poLine: [
+ { required: true, message: '请选择订单行', trigger: 'change' }
+ ],
+ packUnit: [
+ { required: true, message: '请选择包装规格', trigger: 'change' }
+ ],
+ secondPackUnit: [
+ { required: false, message: '请选择包装规格2', trigger: 'change' }
],
- poNumber: [{ required: true, message: '请选择订单号', trigger: 'change' }],
- poLine: [{ required: true, message: '请选择订单行', trigger: 'change' }],
- packUnit: [{ required: true, message: '请选择包装规格', trigger: 'change' }],
- secondPackUnit: [{ required: false, message: '请选择包装规格2', trigger: 'change' }],
secondPackQty: [
- { required: false, message: '请输入包装数量2', trigger: 'blur' }
- // { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
+ { required: false, message: '请输入包装数量2', trigger: 'blur' },
+ { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
+ ],
+ convertRate: [
+ { required: true, message: '请输入转换率', trigger: 'blur' }
+ ],
+ itemCode: [
+ { required: true, message: '请选择物料代码', trigger: 'change' }
+ ],
+ remark: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
- convertRate: [{ required: true, message: '请输入转换率', trigger: 'blur' }],
- itemCode: [{ required: true, message: '请选择物料代码', trigger: 'change' }],
- remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }]
// secondPackQty:[{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}]
})
-export const SupplierdeliverRequestDetailLabel = useCrudSchemas(
- reactive([
- {
- label: '批次',
- field: 'batch',
- sort: 'custom',
- table: {
- width: 150
- },
- tableForm: {
- disabled: true
- }
- },
- {
- 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',
+export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive([
+ {
+ label: '批次',
+ field: 'batch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ disabled: true
+ }
+ },
+ {
+ 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'
+ valueFormat: 'x',
+
}
},
- // {
- // label: '替代批次',
- // field: 'altBatch',
- // sort: 'custom',
- // table: {
- // width: 150
- // },
- // isTableForm: false,
- // isForm: false,
- // tableForm:{
- // disabled:true
- // }
- // },
- {
- label: '到货日期',
- field: 'arriveDate',
- formatter: dateFormatter2,
- detail: {
- dateFormat: 'YYYY-MM-DD'
- },
- sort: 'custom',
- table: {
- width: 180
- },
- isForm: false,
- form: {
- component: 'DatePicker',
- componentProps: {
- disabled: true,
- style: { width: '100%' },
- type: 'date',
- dateFormat: 'YYYY-MM-DD',
- valueFormat: 'x'
- }
- },
- isTableForm: false,
- tableForm: {
- disabled: true,
- type: 'FormDate',
+ tableForm: {
+ disabled:true,
+ type: 'FormDate',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ // {
+ // label: '替代批次',
+ // field: 'altBatch',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isTableForm: false,
+ // isForm: false,
+ // tableForm:{
+ // disabled:true
+ // }
+ // },
+ {
+ label: '到货日期',
+ field: 'arriveDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isForm: false,
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ disabled:true,
+ style: {width: '100%'},
+ type: 'date',
dateFormat: 'YYYY-MM-DD',
- valueFormat: 'x'
+ 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',
+ isTableForm: false,
+ tableForm: {
+ disabled:true,
+ type: 'FormDate',
+ dateFormat: 'YYYY-MM-DD',
+ 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'
+ valueFormat: 'x',
}
},
- {
- label: '订单号',
- field: 'poNumber',
- sort: 'custom',
- table: {
- width: 150
- },
- form: {
- // labelMessage: '信息提示说明!!!',
- componentProps: {
- disabled: true,
- isSearchList: false,
- searchListPlaceholder: '请选择订单号',
- searchField: 'number',
- searchTitle: '要货计划信息',
- searchAllSchemas: PurchasePlanDetail.allSchemas,
- searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
- searchCondition: [
- {
- key: 'number',
- value: 'ppNumber',
- message: '请填写要货计划单号!',
- isMainValue: true
- },
- {
- key: 'available',
- value: 'TRUE',
- isMainValue: false
- }
- ]
- }
- },
- tableForm: {
- isInpuFocusShow: false,
- disabled: true,
+ tableForm: {
+ disabled:true,
+ type: 'FormDate',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ {
+ label: '订单号',
+ field: 'poNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ disabled:true,
+ isSearchList: false,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '要货计划信息',
@@ -1268,438 +1425,346 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(
value: 'TRUE',
isMainValue: false
}
+
]
}
},
- {
- label: '订单行',
- field: 'poLine',
- sort: 'custom',
- table: {
- width: 150
- },
- form: {
- componentProps: {
- disabled: true
- }
- },
- tableForm: {
+ tableForm: {
+ isInpuFocusShow: false,
+ disabled:true,
+ searchListPlaceholder: '请选择订单号',
+ searchField: 'number',
+ searchTitle: '要货计划信息',
+ searchAllSchemas: PurchasePlanDetail.allSchemas,
+ searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
+ searchCondition: [
+ {
+ key: 'number',
+ value: 'ppNumber',
+ message: '请填写要货计划单号!',
+ isMainValue: true
+ },
+ {
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }]
+ }
+ },
+ {
+ label: '订单行',
+ field: 'poLine',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ componentProps: {
disabled: true
}
},
- {
- label: '订单数量',
- field: 'orderQty',
- table: {
- width: 150
- },
- form: {
- component: 'InputNumber',
- componentProps: {
- disabled: true,
- min: 0,
- precision: 6
- }
- },
- tableForm: {
+ tableForm: {
+ disabled: true
+ }
+ },
+ {
+ label: '订单数量',
+ field: 'orderQty',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
disabled: true,
- type: 'InputNumber',
min: 0,
precision: 6
}
},
-
- {
- label: '供应商计量数量',
- field: 'supplierPackQty',
- sort: 'custom',
- table: {
- width: 150
- },
- form: {
- component: 'InputNumber',
- componentProps: {
- disabled: true,
- min: 1,
- precision: 6
- }
- },
- isTableForm: false,
- isForm: false,
- tableForm: {
- disabled: true,
- type: 'InputNumber',
+ tableForm: {
+ disabled: true,
+ type: 'InputNumber',
+ min: 0,
+ precision: 6
+ }
+ },
+
+ {
+ label: '供应商计量数量',
+ field: 'supplierPackQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ disabled:true,
min: 1,
precision: 6
}
},
- {
- label: '供应商计量单位',
- field: 'supplierPackUnit',
- dictType: DICT_TYPE.UOM,
- dictClass: 'string',
- isTable: true,
- sort: 'custom',
- table: {
- width: 150
- },
- isTableForm: false,
- isForm: false,
- tableForm: {
- disabled: true,
- type: 'Select'
- }
- },
- {
- label: '转换率',
- field: 'convertRate',
- sort: 'custom',
- table: {
- width: 150
- },
- form: {
- component: 'InputNumber',
- componentProps: {
- min: 0
- }
- },
- isTableForm: false,
- isForm: false,
- tableForm: {
- disabled: true,
- type: 'InputNumber',
+ isTableForm: false,
+ isForm: false,
+ tableForm: {
+ disabled:true,
+ type: 'InputNumber',
+ min: 1,
+ precision: 6
+ }
+ },
+ {
+ label: '供应商计量单位',
+ field: 'supplierPackUnit',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false,
+ tableForm: {
+ disabled:true,
+ type: 'Select'
+ }
+ },
+ {
+ label: '转换率',
+ field: 'convertRate',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
min: 0
}
},
- {
- label: '单据号',
- field: 'number',
- sort: 'custom',
- table: {
- width: 180
- },
- isTableForm: false,
- form: {
- componentProps: {
- disabled: true
- }
- }
- },
- {
- label: '物料代码',
- field: 'itemCode',
- sort: 'custom',
- table: {
- width: 150
- },
- form: {
- componentProps: {
- disabled: true
- }
- },
- tableForm: {
+ isTableForm: false,
+ isForm: false,
+ tableForm: {
+ disabled:true,
+ type: 'InputNumber',
+ min: 0
+ }
+ },
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isTableForm: false,
+ form: {
+ componentProps: {
disabled: true
}
- },
- {
- label: '计量单位',
- field: 'uom',
- sort: 'custom',
- dictType: DICT_TYPE.UOM,
- dictClass: 'string',
- isSearch: true,
- isTable: true,
- table: {
- width: 150
- },
- tableForm: {
- disabled: true,
- type: 'Select'
+ }
+ },
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ componentProps: {
+ disabled: true
}
},
- {
- label: '数量',
- field: 'qty',
- sort: 'custom',
- table: {
- width: 150
- },
- form: {
- component: 'InputNumber',
- componentProps: {
- disabled: true,
- min: 1,
- precision: 6
- }
- },
- tableForm: {
- disabled: true,
- type: 'InputNumber',
+ tableForm: {
+ disabled: true
+ }
+ },
+ {
+ label: '计量单位',
+ field: 'uom',
+ sort: 'custom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isSearch: true,
+ isTable: true,
+ table: {
+ width: 150
+ },
+ tableForm: {
+ disabled:true,
+ type: 'Select'
+ }
+ },
+ {
+ label: '数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ disabled:true,
min: 1,
precision: 6
}
},
- {
- label: '包装规格1',
- field: 'packUnit',
- isTable: true,
- sort: 'custom',
- table: {
- width: 150,
- componentProps: {
- disabled: true,
- isSearchList: true,
- searchListPlaceholder: '请选择包装',
- searchField: 'packUnit',
- 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: 'itemCode',
- searchTitle: '物品包装信息',
- searchAllSchemas: Itempackaging.allSchemas,
- searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
- searchCondition: [
- {
- key: 'itemCode',
- value: 'itemCode',
- message: '请选择订单行',
- isTableRowValue: true,
- isMainValue: false
- },
- {
- key: 'available',
- value: 'TRUE',
- isMainValue: false
- }
- ]
- }
- },
- {
- label: '包装名称1',
- field: 'packName',
- sort: 'custom',
- table: {
- width: 150
- },
- form: {
- componentProps: {
- disabled: true
- }
- },
- tableForm: {
- disabled: true
- }
- },
- {
- label: '物料数量1',
- field: 'packQty',
- sort: 'custom',
- table: {
- width: 150
- },
- form: {
- component: 'InputNumber',
- componentProps: {
- min: 0
- }
- },
- tableForm: {
- type: 'InputNumber',
- min: 0
- }
- },
- {
- label: '包装规格2',
- field: 'secondPackUnit',
- isTable: true,
- sort: 'custom',
- table: {
- width: 150,
- componentProps: {
- disabled: true,
- isSearchList: true,
- searchListPlaceholder: '请选择包装',
- searchField: 'packUnit',
- searchTitle: '物品包装信息',
- searchAllSchemas: Itempackaging.allSchemas,
- searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
- searchCondition: [
- {
- key: 'itemCode',
- value: 'itemCode',
- message: '请选择订单行',
- isMainValue: true
- },
- {
- key: 'available',
- value: 'TRUE',
- isMainValue: false
- }
- ]
- }
- },
- tableForm: {
- clearable: true,
- disabled: true,
- isInpuFocusShow: true,
- searchListPlaceholder: '请选择包装',
- searchField: 'packUnit',
- searchTitle: '物品包装信息',
- searchAllSchemas: Itempackaging.allSchemas,
- searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
- searchCondition: [
- {
- key: 'itemCode',
- value: 'itemCode',
- message: '请选择订单行',
- isTableRowValue: true,
- isMainValue: false
- },
- {
- key: 'available',
- value: 'TRUE',
- isMainValue: false
- }
- ]
- }
- },
- {
- label: '包装名称2',
- field: 'secondPackName',
- sort: 'custom',
- table: {
- width: 150
- },
- form: {
- componentProps: {
- disabled: true
- }
- },
- tableForm: {
- disabled: true
- }
- },
- {
- label: '物料数量2',
- field: 'secondPackQty',
- sort: 'custom',
- table: {
- width: 150
- },
- form: {
- component: 'InputNumber',
- componentProps: {
- min: 0
- }
- },
- tableForm: {
- type: 'InputNumber',
- min: 0
+ tableForm: {
+ disabled:true,
+ type: 'InputNumber',
+ min: 1,
+ precision: 6
+ }
+ },
+ {
+ label: '箱规格',
+ field: 'packUnit',
+ isTable: true,
+ sort: 'custom',
+ form: {
+ },
+ tableForm: {
+ type: 'Select',
+ initOptions: [{
+ label: '',
+ value: ''
+ }]
+ }
+ },{
+ label: '箱规格数量',
+ field: 'packQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ componentProps: {
}
},
- {
- 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: 'projectCode',
- sort: 'custom',
- table: {
- width: 150
- },
- isTableForm: false,
- isForm: false
+ tableForm: {
+ disabled:true
}
- ])
-)
-
-export const SupplierdeliverRequestPackage = useCrudSchemas(
- reactive([
- {
- label: '包装号',
- field: 'number',
- sort: 'custom',
- isSearch: true,
- table: {
- fixed: 'left'
+ },
+ {
+ label: '托规格',
+ field: 'secondPackUnit',
+ isTable: true,
+ sort: 'custom',
+ form: {
+ },
+ tableForm: {
+ type: 'Select',
+ initOptions: [{
+ label: '',
+ value: ''
+ }]
+ }
+ },
+ {
+ label: '托规格数量',
+ field: 'secondPackQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ componentProps: {
}
},
- {
- label: '物料代码',
- field: 'itemCode',
- sort: 'custom',
- isSearch: true,
- table: {}
- },
- {
- label: '批次',
- field: 'batch',
- sort: 'custom',
- isSearch: true,
- table: {}
- },
- {
- label: '数量',
- field: 'qty',
- sort: 'custom',
- table: {}
- },
- {
- label: '计量单位',
- field: 'uom',
- sort: 'custom',
- dictType: DICT_TYPE.UOM,
- dictClass: 'string', // 默认都是字符串类型其他暂不考虑
- form: {
- component: 'SelectV2'
- },
- table: {}
+ tableForm: {
+ 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: 'projectCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+]))
+
+export const SupplierdeliverRequestPackage = useCrudSchemas(reactive([
+ {
+ label: '包装号',
+ field: 'number',
+ sort: 'custom',
+ isSearch: true,
+ table: {
+ fixed: 'left'
+ },
+ },
+{
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ isSearch: true,
+ table: {
+ },
+ },
+{
+ label: '批次',
+ field: 'batch',
+ sort: 'custom',
+ isSearch: true,
+ table: {
+ },
+ },
+ {
+ label: '数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ },
+ },
+ {
+ label: '计量单位',
+ field: 'uom',
+ sort: 'custom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string', // 默认都是字符串类型其他暂不考虑
+ form: {
+ component: 'SelectV2'
+ },
+ table: {
+ },
+ },
+
+]))