You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
439 lines
9.3 KiB
439 lines
9.3 KiB
12 months ago
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
||
|
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 getRequestsettingApi from '@/api/wms/requestsetting/index'
|
||
|
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
|
||
|
const queryParams = {
|
||
|
pageSize:10,
|
||
|
pageNo:1,
|
||
|
code:'DeliverRequest'
|
||
|
}
|
||
|
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
|
||
|
const requestsettingData =data?.list[0]||{}
|
||
|
|
||
|
// 表单校验
|
||
|
export const SaleShipmentMainRules = reactive({
|
||
|
})
|
||
|
|
||
|
export const SaleShipmentMain = useCrudSchemas(reactive<CrudSchema[]>([
|
||
|
{
|
||
|
label: '客户代码',
|
||
|
field: 'customerCode',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
form: {
|
||
|
// labelMessage: '信息提示说明!!!',
|
||
|
componentProps: {
|
||
|
enterSearch: true,
|
||
|
isSearchList: true, // 开启查询弹窗
|
||
|
searchListPlaceholder: '请选择客户代码', // 输入框占位文本
|
||
|
searchField: 'code', // 查询弹窗赋值字段
|
||
|
searchTitle: '客户信息', // 查询弹窗标题
|
||
|
searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类
|
||
|
searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法
|
||
|
searchCondition: [{
|
||
|
key: 'available',
|
||
|
value: 'TRUE',
|
||
|
isMainValue: false
|
||
|
}]
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
label: '单据号',
|
||
|
field: 'number',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
isForm: false,
|
||
|
},
|
||
|
{
|
||
|
label: '业务类型',
|
||
|
field: 'businessType',
|
||
|
sort: 'custom',
|
||
|
isForm: false,
|
||
|
table: {
|
||
|
width: 150
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '备注',
|
||
|
field: 'remark',
|
||
|
sort: 'custom',
|
||
|
},
|
||
|
{
|
||
|
label: '发票时间',
|
||
|
field: 'invoiceTime',
|
||
|
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')]
|
||
|
}
|
||
|
},
|
||
|
form: {
|
||
|
component: 'DatePicker',
|
||
|
componentProps: {
|
||
|
type: 'datetime',
|
||
|
valueFormat: 'x'
|
||
|
}
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '部门',
|
||
|
field: 'departmentCode',
|
||
|
sort: 'custom',
|
||
|
isForm: false,
|
||
|
},
|
||
|
{
|
||
|
label: '状态',
|
||
|
field: 'status',
|
||
|
sort: 'custom',
|
||
|
table: {
|
||
|
width: 150
|
||
|
},
|
||
|
dictType: DICT_TYPE.REQUEST_STATUS,
|
||
|
dictClass: 'string',
|
||
|
isSearch: true,
|
||
|
isForm:false,
|
||
|
},
|
||
|
{
|
||
|
label: '自动提交',
|
||
|
field: 'autoCommit',
|
||
|
dictType: DICT_TYPE.TRUE_FALSE,
|
||
|
dictClass: 'string',
|
||
|
isTable: false,
|
||
|
isForm: false,
|
||
|
sort: 'custom',
|
||
|
table: {
|
||
|
width: 150
|
||
|
},
|
||
|
form: {
|
||
|
component: 'Switch',
|
||
|
value: requestsettingData.autoCommit,
|
||
|
componentProps: {
|
||
|
inactiveValue: 'FALSE',
|
||
|
activeValue: 'TRUE',
|
||
|
disabled: true
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
label: '自动通过',
|
||
|
field: 'autoAgree',
|
||
|
dictType: DICT_TYPE.TRUE_FALSE,
|
||
|
dictClass: 'string',
|
||
|
isTable: false,
|
||
|
isForm: false,
|
||
|
sort: 'custom',
|
||
|
table: {
|
||
|
width: 150
|
||
|
},
|
||
|
form: {
|
||
|
component: 'Switch',
|
||
|
value: requestsettingData.autoAgree,
|
||
|
componentProps: {
|
||
|
inactiveValue: 'FALSE',
|
||
|
activeValue: 'TRUE',
|
||
|
disabled: true
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
label: '自动执行',
|
||
|
field: 'autoExecute',
|
||
|
dictType: DICT_TYPE.TRUE_FALSE,
|
||
|
dictClass: 'string',
|
||
|
isTable: false,
|
||
|
isForm: false,
|
||
|
sort: 'custom',
|
||
|
table: {
|
||
|
width: 150
|
||
|
},
|
||
|
form: {
|
||
|
component: 'Switch',
|
||
|
value: requestsettingData.autoExecute,
|
||
|
componentProps: {
|
||
|
inactiveValue: 'FALSE',
|
||
|
activeValue: 'TRUE',
|
||
|
disabled: true
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
label: '直接生成记录',
|
||
|
field: 'directCreateRecord',
|
||
|
dictType: DICT_TYPE.TRUE_FALSE,
|
||
|
dictClass: 'string',
|
||
|
isForm: false,
|
||
|
isTable: false,
|
||
|
sort: 'custom',
|
||
|
table: {
|
||
|
width: 150
|
||
|
},
|
||
|
form: {
|
||
|
component: 'Switch',
|
||
|
value: requestsettingData.directCreateRecord,
|
||
|
componentProps: {
|
||
|
inactiveValue: 'FALSE',
|
||
|
activeValue: 'TRUE',
|
||
|
disabled: true
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
label: '创建时间',
|
||
|
field: '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: 'action',
|
||
|
isForm: false,
|
||
|
table: {
|
||
|
width: 150,
|
||
|
fixed: 'right'
|
||
|
}
|
||
|
}
|
||
|
]))
|
||
|
|
||
|
// 表单校验
|
||
|
export const SaleShipmentDetailRules = reactive({
|
||
|
})
|
||
|
|
||
|
export const SaleShipmentDetail = useCrudSchemas(reactive<CrudSchema[]>([
|
||
|
{
|
||
|
label: '单据号',
|
||
|
field: 'number',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
table: {
|
||
|
width: 180
|
||
|
},
|
||
|
isTable: false,
|
||
|
isTableForm: false,
|
||
|
form: {
|
||
|
componentProps: {
|
||
|
disabled: true
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
label: '销售订单号',
|
||
|
field: 'soNumber',
|
||
|
sort: 'custom',
|
||
|
table: {
|
||
|
width: 150
|
||
|
},
|
||
|
tableForm:{
|
||
|
isInpuFocusShow: true, // 开启查询弹窗
|
||
|
searchListPlaceholder: '请选择销售订单号',
|
||
|
searchField: 'number',
|
||
|
searchTitle: '销售订单信息',
|
||
|
searchAllSchemas: SaleMain.allSchemas,
|
||
|
searchPage: SaleMainApi.getSaleMainPage,
|
||
|
searchCondition: [{
|
||
|
key: 'available',
|
||
|
value: 'TRUE',
|
||
|
isMainValue: false
|
||
|
}]
|
||
|
},
|
||
|
form: {
|
||
|
// labelMessage: '信息提示说明!!!',
|
||
|
componentProps: {
|
||
|
isSearchList: true,
|
||
|
searchListPlaceholder: '请选择销售订单号',
|
||
|
searchField: 'number',
|
||
|
searchTitle: '销售订单信息',
|
||
|
searchAllSchemas: SaleMain.allSchemas,
|
||
|
searchPage: SaleMainApi.getSaleMainPage,
|
||
|
searchCondition: [{
|
||
|
key: 'available',
|
||
|
value: 'TRUE',
|
||
|
isMainValue: false
|
||
|
}]
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
label: '销售订单行',
|
||
|
field: 'soLine',
|
||
|
sort: 'custom',
|
||
|
table: {
|
||
|
width: 150
|
||
|
},
|
||
|
tableForm:{
|
||
|
isInpuFocusShow: true, // 开启查询弹窗
|
||
|
searchListPlaceholder: '请选择销售订单行',
|
||
|
searchField: 'lineNumber',
|
||
|
searchTitle: '销售订单信息',
|
||
|
searchAllSchemas: SaleMain.allSchemas,
|
||
|
searchPage: SaleMainApi.getSaleMainPage,
|
||
|
searchCondition: [{
|
||
|
key: 'available',
|
||
|
value: 'TRUE',
|
||
|
isMainValue: false
|
||
|
}]
|
||
|
},
|
||
|
form: {
|
||
|
// labelMessage: '信息提示说明!!!',
|
||
|
componentProps: {
|
||
|
isSearchList: true,
|
||
|
searchListPlaceholder: '请选择销售订单行',
|
||
|
searchField: 'lineNumber',
|
||
|
searchTitle: '销售订单信息',
|
||
|
searchAllSchemas: SaleMain.allSchemas,
|
||
|
searchPage: SaleMainApi.getSaleMainPage,
|
||
|
searchCondition: [{
|
||
|
key: 'available',
|
||
|
value: 'TRUE',
|
||
|
isMainValue: false
|
||
|
}]
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
label: '从货主代码',
|
||
|
field: 'fromOwnerCode',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '包装号',
|
||
|
field: 'packingNumber',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '批次',
|
||
|
field: 'batch',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '库存状态',
|
||
|
field: 'inventoryStatus',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
form: {
|
||
|
component: 'Radio'
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '从库位代码',
|
||
|
field: 'fromLocationCode',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '主表ID',
|
||
|
field: 'masterId',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
form: {
|
||
|
component: 'InputNumber',
|
||
|
value: 0
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '物品代码',
|
||
|
field: 'itemCode',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '物品名称',
|
||
|
field: 'itemName',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '物品描述1',
|
||
|
field: 'itemDesc1',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '物品描述2',
|
||
|
field: 'itemDesc2',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '项目代码',
|
||
|
field: 'projectCode',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '数量',
|
||
|
field: 'qty',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '计量单位',
|
||
|
field: 'uom',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '备注',
|
||
|
field: 'remark',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '创建时间',
|
||
|
field: 'createTime',
|
||
|
sort: 'custom',
|
||
|
formatter: dateFormatter,
|
||
|
isSearch: true,
|
||
|
search: {
|
||
|
component: 'DatePicker',
|
||
|
componentProps: {
|
||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||
|
type: 'daterange',
|
||
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
|
||
|
}
|
||
|
},
|
||
|
isForm: false,
|
||
|
},
|
||
|
{
|
||
|
label: '地点ID',
|
||
|
field: 'siteId',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
form: {
|
||
|
component: 'InputNumber',
|
||
|
value: 0
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '操作',
|
||
|
field: 'action',
|
||
|
isForm: false,
|
||
|
table: {
|
||
|
width: 150,
|
||
|
fixed: 'right'
|
||
|
}
|
||
|
}
|
||
|
]))
|