diff --git a/src/api/wms/relegateRequest/index.ts b/src/api/wms/relegateRequest/index.ts
new file mode 100644
index 000000000..a26e8c360
--- /dev/null
+++ b/src/api/wms/relegateRequest/index.ts
@@ -0,0 +1,73 @@
+import request from '@/config/axios'
+
+export interface RelegateRequestVO {
+ id: number
+ itemCode: string
+ downItemCode: string
+ businessType: string
+ uom: string
+ qty: number
+ fromBatch: string
+ fromPackingNumber: string
+ fromLocationCode: string
+ fromAreaTypes: string
+ fromAreaCodes: string
+ fromWarehouseCode: string
+ toPackingNumber: string
+ toBatch: string
+ toLocationCode: string
+ toWarehouseCode: string
+ toAreaTypes: string
+ toAreaCodes: string
+ number: string
+ available: string
+ remark: string
+ departmentCode: string
+ siteId: number
+ extraProperties: string
+ status: string
+ concurrencyStamp: number
+ serialNumber: string
+ ruleUserId: number
+}
+
+// 查询物料降级信息列表
+export const getRelegateRequestPage = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/wms/relegate-request/senior', data })
+ } else {
+ return await request.get({ url: `/wms/relegate-request/page`, params })
+ }
+}
+
+// 查询物料降级信息详情
+export const getRelegateRequest = async (id: number) => {
+ return await request.get({ url: `/wms/relegate-request/get?id=` + id })
+}
+
+// 新增物料降级信息
+export const createRelegateRequest = async (data: RelegateRequestVO) => {
+ return await request.post({ url: `/wms/relegate-request/create`, data })
+}
+
+// 修改物料降级信息
+export const updateRelegateRequest = async (data: RelegateRequestVO) => {
+ return await request.put({ url: `/wms/relegate-request/update`, data })
+}
+
+// 删除物料降级信息
+export const deleteRelegateRequest = async (id: number) => {
+ return await request.delete({ url: `/wms/relegate-request/delete?id=` + id })
+}
+
+// 导出物料降级信息 Excel
+export const exportRelegateRequest = async (params) => {
+ return await request.download({ url: `/wms/relegate-request/export-excel`, params })
+}
+
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/wms/relegate-request/get-import-template' })
+}
\ No newline at end of file
diff --git a/src/views/wms/basicDataManage/itemManage/relegateRequest/index.vue b/src/views/wms/basicDataManage/itemManage/relegateRequest/index.vue
new file mode 100644
index 000000000..e60621efe
--- /dev/null
+++ b/src/views/wms/basicDataManage/itemManage/relegateRequest/index.vue
@@ -0,0 +1,233 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wms/basicDataManage/itemManage/relegateRequest/relegateRequest.data.ts b/src/views/wms/basicDataManage/itemManage/relegateRequest/relegateRequest.data.ts
new file mode 100644
index 000000000..d5dee49f8
--- /dev/null
+++ b/src/views/wms/basicDataManage/itemManage/relegateRequest/relegateRequest.data.ts
@@ -0,0 +1,243 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+
+import * as ItembasicApi from '@/api/wms/itembasic'
+import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
+
+// 表单校验
+export const RelegateRequestRules = reactive({
+ itemCode: [required],
+ downItemCode: [required],
+ businessType: [required],
+ available: [required],
+ departmentCode: [required],
+ concurrencyStamp: [required],
+})
+
+export const RelegateRequest = useCrudSchemas(reactive([
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ isSearch: true,
+ form: {
+ componentProps: {
+ isSearchList: true,
+ searchListPlaceholder: '请选择物料代码',
+ searchField: 'itemCode',
+ searchTitle: '客户物料基础信息',
+ searchAllSchemas: Itembasic.allSchemas,
+ searchPage: ItembasicApi.getItembasicPage,
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }]
+ }
+ }
+ },
+ {
+ label: '降级后物料代码',
+ field: 'downItemCode',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '计量单位',
+ field: 'uom',
+ sort: 'custom',
+ form: {
+ componentProps: {
+ disabled: true,
+ }
+ },
+ },
+ {
+ label: '数量',
+ field: 'qty',
+ sort: 'custom',
+ },
+ {
+ label: '从批次',
+ field: 'fromBatch',
+ sort: 'custom',
+ form: {
+ componentProps: {
+ disabled: true,
+ }
+ },
+ },
+ {
+ label: '从包装号',
+ field: 'fromPackingNumber',
+ sort: 'custom',
+ form: {
+ componentProps: {
+ disabled: true,
+ }
+ },
+ },
+ {
+ label: '从库位代码',
+ field: 'fromLocationCode',
+ sort: 'custom',
+ form: {
+ componentProps: {
+ disabled: true,
+ }
+ },
+ },
+ {
+ label: '从库区类型',
+ field: 'fromAreaTypes',
+ sort: 'custom',
+ isForm:false,
+ },
+ {
+ label: '从库区代码',
+ field: 'fromAreaCodes',
+ sort: 'custom',
+ isForm:false,
+ },
+ {
+ label: '从仓库代码',
+ field: 'fromWarehouseCode',
+ sort: 'custom',
+ isForm:false,
+ },
+ {
+ label: '到包装号',
+ field: 'toPackingNumber',
+ sort: 'custom',
+ },
+ {
+ label: '到批次',
+ field: 'toBatch',
+ sort: 'custom',
+ },
+ {
+ label: '到库位代码',
+ field: 'toLocationCode',
+ sort: 'custom',
+ },
+ {
+ label: '到仓库代码',
+ field: 'toWarehouseCode',
+ sort: 'custom',
+ isForm:false,
+ },
+ {
+ label: '到库区类型',
+ field: 'toAreaTypes',
+ sort: 'custom',
+ isForm:false,
+ },
+ {
+ label: '到库区代码',
+ field: 'toAreaCodes',
+ sort: 'custom',
+ isForm:false,
+ },
+ {
+ label: '是否可用',
+ field: 'available',
+ sort: 'custom',
+ isForm:false,
+ },
+ {
+ label: '备注',
+ field: 'remark',
+ sort: 'custom',
+ },
+ {
+ label: '部门',
+ field: 'departmentCode',
+ sort: 'custom',
+ isForm:false,
+ },
+ {
+ label: '地点ID',
+ field: 'siteId',
+ sort: 'custom',
+ form: {
+ component: 'InputNumber',
+ value: 0
+ },
+ isForm:false,
+ },
+ {
+ label: '扩展属性',
+ field: 'extraProperties',
+ sort: 'custom',
+ isForm:false,
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ sort: 'custom',
+ formatter: dateFormatter,
+ search: {
+ component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ type: 'daterange',
+ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
+ }
+ },
+ isForm: false,
+ },
+ {
+ label: '状态',
+ field: 'status',
+ dictType: DICT_TYPE.REQUEST_STATUS,
+ dictClass: 'string',
+ isSearch: true,
+ isForm: false,
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '并发乐观锁',
+ field: 'concurrencyStamp',
+ sort: 'custom',
+ isForm:false,
+ form: {
+ component: 'InputNumber',
+ value: 0
+ },
+ },
+ {
+ label: '工作流流水号',
+ field: 'serialNumber',
+ isForm:false,
+ sort: 'custom',
+ },
+ {
+ label: '权限所属人员id',
+ field: 'ruleUserId',
+ sort: 'custom',
+ isForm:false,
+ form: {
+ component: 'InputNumber',
+ value: 0
+ },
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isForm: false,
+ table: {
+ width: 150,
+ fixed: 'right'
+ }
+ }
+]))
diff --git a/src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts b/src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts
index 4a5107150..623f4d311 100644
--- a/src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts
+++ b/src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts
@@ -4,6 +4,9 @@ import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import * as CustomerApi from '@/api/wms/customer'
import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/customer.data'
+import * as PackageunitApi from '@/api/wms/packageunit'
+import { Packageunit } from '@/views/wms/basicDataManage/itemManage/packageunit/packageunit.data'
+
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
@@ -357,15 +360,20 @@ export const SaleDetail = useCrudSchemas(reactive([
{
label: '包装规格',
field: 'packUnit',
- // dictType: DICT_TYPE.PACK_UNIT,
- // dictClass: 'string',
- isTable: true,
sort: 'custom',
table: {
width: 150
},
- tableForm: {
- type: 'Select'
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择包装规格代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '包装规格信息', // 查询弹窗标题
+ searchAllSchemas: Packageunit.allSchemas, // 查询弹窗所需类
+ searchPage: PackageunitApi.getPackageunitPage, // 查询弹窗所需分页方法
+ }
}
},
{
diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue
index d22258d89..cb188aa14 100644
--- a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue
+++ b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue
@@ -42,8 +42,6 @@
{
+const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
- const setV = {}
+ if (type == 'tableForm') {
+ row['soLine'] = val[0]['lineNumber']
+ row['soNumber'] = val[0]['number']
+ row['itemCode'] = val[0]['itemCode']
+ row['projectCode'] = val[0]['projectCode']
+ row['uom'] = val[0]['uom']
+ }else {
+ const setV = {}
if(formField == 'CustomerCode') {
setV['CustomerCode'] = val[0]['CustomerCode']
} else {
setV[formField] = val[0][searchField]
}
formRef.setValues(setV)
+ }
})
}
@@ -121,7 +127,15 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
- setV[formField] = val[0][searchField]
+ if(formField == 'soLine') {
+ setV['soLine'] = val[0]['lineNumber']
+ setV['soNumber'] = val[0]['number']
+ setV['itemCode'] = val[0]['itemCode']
+ setV['projectCode'] = val[0]['projectCode']
+ setV['uom'] = val[0]['uom']
+ }else {
+ setV[formField] = val[0][searchField]
+ }
formRef.setValues(setV)
})
}
@@ -247,9 +261,18 @@ const submitForm = async (formType, data) => {
}
}
+/**
+ * tableForm方法
+*/
+const tableFormKeys = {}
+SaleShipmentDetail.allSchemas.tableFormColumns.forEach(item => {
+ tableFormKeys[item.field] = item.default ? item.default : ''
+})
+
// 添加明细
const handleAddTable = () => {
- tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
+ let tableForm = JSON.parse(JSON.stringify(tableFormKeys))
+ tableData.value.push(tableForm)
}
// 删除明细
const handleDeleteTable = (item, index) => {
diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts
index 98ab99139..8f9dbb872 100644
--- a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts
+++ b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts
@@ -4,8 +4,8 @@ import { dateFormatter } from '@/utils/formatTime'
import * as CustomerApi from '@/api/wms/customer'
import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/customer.data'
-import * as SaleMainApi from '@/api/wms/saleMain'
-import { SaleMain } from '@/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data'
+import * as SaleDetailApi from '@/api/wms/saleDetail'
+import { SaleDetail } from '@/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@@ -65,6 +65,7 @@ export const SaleShipmentMain = useCrudSchemas(reactive([
label: '备注',
field: 'remark',
sort: 'custom',
+ isForm: false,
},
{
label: '发票时间',
@@ -87,6 +88,13 @@ export const SaleShipmentMain = useCrudSchemas(reactive([
}
},
},
+ {
+ label: '地点',
+ field: 'siteId',
+ sort: 'custom',
+ isSearch: true,
+ hiddenInMain: true,
+ },
{
label: '部门',
field: 'departmentCode',
@@ -243,33 +251,13 @@ export const SaleShipmentDetail = useCrudSchemas(reactive([
table: {
width: 150
},
- tableForm:{
- isInpuFocusShow: true, // 开启查询弹窗
- searchListPlaceholder: '请选择销售订单号',
- searchField: 'number',
- searchTitle: '销售订单信息',
- searchAllSchemas: SaleMain.allSchemas,
- searchPage: SaleMainApi.getSaleMainPage,
- searchCondition: [{
- key: 'available',
- value: 'TRUE',
- isMainValue: false
- }]
+ tableForm: {
+ type: 'Select',
+ disabled: true
},
form: {
- // labelMessage: '信息提示说明!!!',
componentProps: {
- isSearchList: true,
- searchListPlaceholder: '请选择销售订单号',
- searchField: 'number',
- searchTitle: '销售订单信息',
- searchAllSchemas: SaleMain.allSchemas,
- searchPage: SaleMainApi.getSaleMainPage,
- searchCondition: [{
- key: 'available',
- value: 'TRUE',
- isMainValue: false
- }]
+ disabled: true
}
}
},
@@ -285,8 +273,8 @@ export const SaleShipmentDetail = useCrudSchemas(reactive([
searchListPlaceholder: '请选择销售订单行',
searchField: 'lineNumber',
searchTitle: '销售订单信息',
- searchAllSchemas: SaleMain.allSchemas,
- searchPage: SaleMainApi.getSaleMainPage,
+ searchAllSchemas: SaleDetail.allSchemas,
+ searchPage: SaleDetailApi.getSaleDetailPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
@@ -300,27 +288,35 @@ export const SaleShipmentDetail = useCrudSchemas(reactive([
searchListPlaceholder: '请选择销售订单行',
searchField: 'lineNumber',
searchTitle: '销售订单信息',
- searchAllSchemas: SaleMain.allSchemas,
- searchPage: SaleMainApi.getSaleMainPage,
+ searchAllSchemas: SaleDetail.allSchemas,
+ searchPage: SaleDetailApi.getSaleDetailPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
+ },
+ {
+ key: 'customerCode',
+ value: 'customerCode',
+ isMainValue: true
}]
}
}
},
{
- label: '从货主代码',
- field: 'fromOwnerCode',
- sort: 'custom',
- isSearch: true,
- },
- {
- label: '包装号',
- field: 'packingNumber',
+ label: '物品代码',
+ field: 'itemCode',
sort: 'custom',
isSearch: true,
+ tableForm: {
+ type: 'Select',
+ disabled: true
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
},
{
label: '批次',
@@ -329,59 +325,81 @@ export const SaleShipmentDetail = useCrudSchemas(reactive([
isSearch: true,
},
{
- label: '库存状态',
- field: 'inventoryStatus',
+ label: '从货主代码',
+ field: 'fromOwnerCode',
sort: 'custom',
isSearch: true,
- form: {
- component: 'Radio'
- },
+ isForm: false,
+ isTableForm: false
},
{
- label: '从库位代码',
- field: 'fromLocationCode',
+ label: '包装号',
+ field: 'packingNumber',
sort: 'custom',
isSearch: true,
+ isForm: false,
+ isTableForm: false
},
+
{
- label: '主表ID',
- field: 'masterId',
+ label: '库存状态',
+ field: 'inventoryStatus',
+ // dictType: DICT_TYPE.INVENTORY_STATUS,
+ // dictClass: 'string',
+ isTable: true,
sort: 'custom',
- isSearch: true,
- form: {
- component: 'InputNumber',
- value: 0
+ table: {
+ width: 150
},
+ isTableForm: false,
+ hiddenInMain: true,
+ isForm: false,
},
{
- label: '物品代码',
- field: 'itemCode',
+ label: '从库位代码',
+ field: 'fromLocationCode',
sort: 'custom',
isSearch: true,
+ isTableForm: false
},
+
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
- isSearch: true,
+ table: {
+ width: 150
+ },
+ isForm: false,
+ isTableForm: false
},
{
label: '物品描述1',
- field: 'itemDesc1',
+ field: 'itemName',
sort: 'custom',
- isSearch: true,
+ table: {
+ width: 150
+ },
+ isForm: false,
+ isTableForm: false
},
{
label: '物品描述2',
- field: 'itemDesc2',
+ field: 'itemName',
sort: 'custom',
- isSearch: true,
+ table: {
+ width: 150
+ },
+ isForm: false,
+ isTableForm: false
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
isSearch: true,
+ isTableForm: false,
+ hiddenInMain: true,
},
{
label: '数量',
@@ -392,14 +410,29 @@ export const SaleShipmentDetail = useCrudSchemas(reactive([
{
label: '计量单位',
field: 'uom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
sort: 'custom',
- isSearch: true,
+ table: {
+ width: 150
+ },
+ tableForm: {
+ type: 'Select',
+ disabled: true
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
+ isTableForm: false
},
{
label: '创建时间',
@@ -416,16 +449,7 @@ export const SaleShipmentDetail = useCrudSchemas(reactive([
}
},
isForm: false,
- },
- {
- label: '地点ID',
- field: 'siteId',
- sort: 'custom',
- isSearch: true,
- form: {
- component: 'InputNumber',
- value: 0
- },
+ isTableForm: false
},
{
label: '操作',