Browse Source

生产订单修改

master
李胜楠 1 year ago
parent
commit
c5a5643302
  1. 14
      src/views/wms/productionManage/productionplan/workMain/index.vue
  2. 134
      src/views/wms/productionManage/productionplan/workMain/workMain.data.ts

14
src/views/wms/productionManage/productionplan/workMain/index.vue

@ -44,7 +44,6 @@
@success="getList"
:rules="WorkMainRules"
:formAllSchemas="WorkMain.allSchemas"
:searchTableParams="searchTableParams"
:tableAllSchemas="WorkDetail.allSchemas"
:tableFormRules="WorkDetailRules"
:tableData="tableData"
@ -64,7 +63,6 @@
:allSchemas="WorkMain.allSchemas"
:detailAllSchemas="WorkDetail.allSchemas"
:detailAllSchemasRules="WorkDetailRules"
:searchTableParams="searchTableParams"
:apiCreate="WorkDetailApi.createWorkDetail"
:apiUpdate="WorkDetailApi.updateWorkDetail"
:apiPage="WorkDetailApi.getWorkDetailPage"
@ -99,22 +97,12 @@ const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableParams = ref([
//{
// formField: 'productItemCode',
// searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage
//}
])
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
if (type == 'tableForm') {
//
//row[formField] = val[0][searchField]
row[formField] = val[0][searchField]
//row['poLine'] = val[0]['poLine']
//row['batch'] = val[0]['toBatch']
//row['altBatch'] = val[0]['altBatch']

134
src/views/wms/productionManage/productionplan/workMain/workMain.data.ts

@ -1,6 +1,9 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { fa } from 'element-plus/es/locale'
import * as CustomerApi from '@/api/wms/customer'
import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/customer.data'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
const { t } = useI18n() // 国际化
/**
@ -8,12 +11,31 @@ const { t } = useI18n() // 国际化
*/
export const WorkMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '供应商代码',
label: '客户代码',
field: 'customerCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择客户代码',
searchField: 'code',
searchTitle: '客户信息',
searchAllSchemas: Customer.allSchemas,
searchPage: CustomerApi.getCustomerPage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择客户代码',
searchField: 'code',
searchTitle: '客户信息',
searchAllSchemas: Customer.allSchemas,
searchPage: CustomerApi.getCustomerPage
}
}
},
{
label: '订单类型',
@ -26,6 +48,7 @@ export const WorkMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isForm: false,
},
{
label: '订单日期',
@ -74,6 +97,7 @@ export const WorkMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isForm: false,
},
{
label: '单据号',
@ -176,6 +200,7 @@ export const WorkMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isForm: false,
},
{
label: '是否可用',
@ -210,27 +235,27 @@ export const WorkMainRules = reactive({
customerCode: [
{ required: true, message: '请选择客户代码', trigger: 'change' }
],
type: [
{ required: true, message: '请选择订单类型', trigger: 'change' }
],
// type: [
// { required: true, message: '请选择订单类型', trigger: 'change' }
// ],
orderDate: [
{ required: true, message: '请输入订单日期', trigger: 'change' }
{ required: true, message: '请选择订单日期', trigger: 'change' }
],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
createTime: [
{ required: true, message: '请输入创建时间', trigger: 'blur' }
],
creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
number: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],
// createTime: [
// { required: true, message: '请输入创建时间', trigger: 'blur' }
// ],
// creator: [
// { required: true, message: '请输入创建者', trigger: 'blur' }
// ],
// number: [
// { required: true, message: '请输入单据号', trigger: 'blur' }
// ],
// businessType: [
// { required: true, message: '请输入业务类型', trigger: 'blur' }
// ],
})
/**
@ -244,6 +269,8 @@ export const WorkDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '项目代码',
@ -252,6 +279,8 @@ export const WorkDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '完工数量',
@ -262,7 +291,18 @@ export const WorkDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'InputNumber',
}
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type:'InputNumber',
min: 1,
precision: 6
},
isTableForm: false,
isForm: false
},
{
label: '单据号',
@ -272,6 +312,11 @@ export const WorkDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isTableForm: false,
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物品代码',
@ -280,6 +325,25 @@ export const WorkDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择物品代码',
searchField: 'code',
searchTitle: '物品基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择物品代码',
searchField: 'code',
searchTitle: '物品基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage
}
}
},
{
label: '备注',
@ -330,12 +394,21 @@ export const WorkDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'InputNumber',
}
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type:'InputNumber',
min: 1,
precision: 6
},
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.TRUE_FALSE,
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: true,
isTable: true,
@ -343,6 +416,9 @@ export const WorkDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '最后更新时间',
@ -394,7 +470,9 @@ export const WorkDetail = useCrudSchemas(reactive<CrudSchema[]>([
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
isTableForm: false,
isForm: false
},
{
label: '操作',
@ -411,12 +489,12 @@ export const WorkDetail = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
export const WorkDetailRules = reactive({
lineNumber: [
{ required: true, message: '请输入行号', trigger: 'change' }
],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
// lineNumber: [
// { required: true, message: '请输入行号', trigger: 'change' }
// ],
// available: [
// { required: true, message: '请选择是否可用', trigger: 'change' }
// ],
uom: [
{ required: true, message: '请选择计量单位', trigger: 'change' }
],

Loading…
Cancel
Save