Browse Source

物品基础管理配置文件修改

master
陈薪名 1 year ago
parent
commit
ec1dcc80f9
  1. 186
      src/views/wms/basicDataManage/itemManage/bom/bom.data.ts
  2. 4
      src/views/wms/basicDataManage/itemManage/bom/index.vue
  3. 5
      src/views/wms/basicDataManage/itemManage/itembasic/index.vue
  4. 7
      src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts
  5. 4
      src/views/wms/basicDataManage/itemManage/itempackaging/index.vue
  6. 226
      src/views/wms/basicDataManage/itemManage/itempackaging/itempackaging.data.ts
  7. 7
      src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue
  8. 139
      src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts
  9. 5
      src/views/wms/basicDataManage/itemManage/stdcostprice/index.vue
  10. 150
      src/views/wms/basicDataManage/itemManage/stdcostprice/stdcostprice.data.ts

186
src/views/wms/basicDataManage/itemManage/bom/bom.data.ts

@ -0,0 +1,186 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
const { t } = useI18n() // 国际化
/**
* @returns {Array}
*/
export const Bom = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '父物料代码',
field: 'productItemCode',
isSearch: true,
sort: 'custom',
table: {
width: 150,
fixed: 'left'
}
},
{
label: '子物料代码',
field: 'componentItemCode',
isSearch: true,
sort: 'custom',
table: {
width: 150
}
},
{
label: '子物料计量单位',
field: 'componentUom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
sort: 'custom',
isSearch: true,
isTable: true,
table: {
width: 150
}
},
{
label: '子物料数量',
field: 'componentQty',
isSearch: true,
sort: 'custom',
form: {
component: 'InputNumber',
},
table: {
width: 120
}
},
{
label: '工序代码',
field: 'processCode',
sort: 'custom',
table: {
width: 120
}
},
{
label: '版本',
field: 'version',
sort: 'custom'
},
{
label: '层级',
field: 'layer',
sort: 'custom',
// form: {
// component: 'Input',
// componentProps: {
// // focus: ()=>{console.log('111111111111111111111')},
// modelValue: '11111'
// }
// }
},
{
label: '生效时间',
field: 'activeTime',
isTable: true,
sort: 'custom',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
}
}
},
{
label: '失效时间',
field: 'expireTime',
isTable: true,
sort: 'custom',
formatter : dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
}
}
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
table: {
width: 120
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '创建时间',
field: 'createTime',
isTable: true,
sort: 'custom',
formatter: dateFormatter,
isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
}
},
{
label: '创建者',
field: 'creator',
isForm: false,
isTable: false
},
{ label: '备注', field: 'remark', isTable: false },
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
}
}
]))
//表单校验
export const BomRules = reactive({
productItemCode: [
{ required: true, message: '请输入父物料代码', trigger: 'blur' }
],
componentItemCode: [
{ required: true, message: '请输入子物料代码', trigger: 'blur' }
],
componentUom: [
{ required: true, message: '请选择子物料计量单位', trigger: 'change' }
],
componentQty: [
{ required: true, message: '请输入子物料数量', trigger: 'blur' }
],
processCode: [
{ required: true, message: '请输入工序代码', trigger: 'blur' }
],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
})

4
src/views/wms/basicDataManage/itemManage/bom/index.vue

@ -11,6 +11,7 @@
:routeName="routeName" :routeName="routeName"
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="Bom.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -68,7 +69,8 @@ import download from '@/utils/download'
import * as BomApi from '@/api/wms/bom' import * as BomApi from '@/api/wms/bom'
import * as ItembasicApi from '@/api/wms/itembasic' import * as ItembasicApi from '@/api/wms/itembasic'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue' import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import { Bom, BomRules, Itembasic } from '@/utils/disposition/tableColumns' import { Itembasic } from './../itembasic/itembasic.data'
import { Bom, BomRules } from './bom.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'

5
src/views/wms/basicDataManage/itemManage/itembasic/index.vue

@ -39,7 +39,7 @@
<BasicForm <BasicForm
ref="basicFormRef" ref="basicFormRef"
@success="getList" @success="getList"
:rules="ItembasicRules" :rules="rules"
:formAllSchemas="Itembasic.allSchemas" :formAllSchemas="Itembasic.allSchemas"
:apiUpdate="ItembasicApi.updateItembasic" :apiUpdate="ItembasicApi.updateItembasic"
:apiCreate="ItembasicApi.createItembasic" :apiCreate="ItembasicApi.createItembasic"
@ -58,7 +58,7 @@ import download from '@/utils/download'
import * as ItembasicApi from '@/api/wms/itembasic' import * as ItembasicApi from '@/api/wms/itembasic'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import { Itembasic, ItembasicRules } from '@/utils/disposition/tableColumns' import { Itembasic, rules } from './itembasic.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { ItemBasicTabsList } from '@/utils/disposition/tabsList' import { ItemBasicTabsList } from '@/utils/disposition/tabsList'
defineOptions({ name: 'Itembasic' }) defineOptions({ name: 'Itembasic' })
@ -97,7 +97,6 @@ const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(Itembasic.allSchemas.tableColumns) const tableColumns = ref(Itembasic.allSchemas.tableColumns)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val

7
src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts

@ -5,7 +5,7 @@ const { t } = useI18n() // 国际化
/** /**
* @returns {Array} * @returns {Array}
*/ */
const crudSchemas = reactive<CrudSchema[]>([ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '代码', label: '代码',
field: 'code', field: 'code',
@ -397,8 +397,7 @@ const crudSchemas = reactive<CrudSchema[]>([
fixed: 'right' fixed: 'right'
}, },
} }
]) ]))
// 表单校验 // 表单校验
export const rules = reactive({ export const rules = reactive({
code: [ code: [
@ -471,5 +470,3 @@ export const rules = reactive({
{ required: true, message: '请输入失效时间', trigger: 'change' } { required: true, message: '请输入失效时间', trigger: 'change' }
], ],
}) })
export const { allSchemas } = useCrudSchemas(crudSchemas)

4
src/views/wms/basicDataManage/itemManage/itempackaging/index.vue

@ -11,6 +11,7 @@
:routeName="routeName" :routeName="routeName"
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="Itempackaging.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -62,7 +63,8 @@ import download from '@/utils/download'
import * as ItempackagingApi from '@/api/wms/itempackaging' import * as ItempackagingApi from '@/api/wms/itempackaging'
import * as ItembasicApi from '@/api/wms/itembasic' import * as ItembasicApi from '@/api/wms/itembasic'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue' import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import { Itempackaging, ItempackagingRules, Itembasic } from '@/utils/disposition/tableColumns' import { Itembasic } from './../itembasic/itembasic.data'
import { Itempackaging, ItempackagingRules } from './itempackaging.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'

226
src/views/wms/basicDataManage/itemManage/itempackaging/itempackaging.data.ts

@ -0,0 +1,226 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
const { t } = useI18n() // 国际化
/**
* @returns {Array}
*/
export const Itempackaging = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150,
fixed: 'left'
}
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: true,
isTable: true,
table: {
width: 120
}
},
{
label: '包装单位',
field: 'stdPackUnit',
sort: 'custom',
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string',
isSearch: true,
isTable: true,
table: {
width: 120
}
},
{
label: '包装数量',
field: 'stdPackQty',
sort: 'custom',
isSearch: true,
table: {
width: 120
},
form: {
component: 'InputNumber',
}
},
{
label: '替代包装单位1',
field: 'altPackUnit1',
sort: 'custom',
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string',
isTable: true,
table: {
width: 150
}
},
{
label: '替代包装量1',
field: 'altPackQty1',
sort: 'custom',
table: {
width: 130
},
form: {
component: 'InputNumber',
}
},
{
label: '替代包装量2',
field: 'altPackQty2',
sort: 'custom',
table: {
width: 130
},
form: {
component: 'InputNumber',
}
},
{
label: '替代包装单位3',
field: 'altPackUnit3',
sort: 'custom',
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string',
isTable: true,
table: {
width: 150
}
},
{
label: '替代包装量3',
field: 'altPackQty3',
sort: 'custom',
table: {
width: 130
},
form: {
component: 'InputNumber',
}
},
{
label: '替代包装单位4',
field: 'altPackUnit4',
sort: 'custom',
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string',
table: {
width: 150
}
},
{
label: '替代包装量4',
field: 'altPackQty4',
sort: 'custom',
table: {
width: 130
},
form: {
component: 'InputNumber',
}
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
table: {
width: 120
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '生效时间',
field: 'activeTime',
sort: 'custom',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
}
}
},
{
label: '失效时间',
field: 'expireTime',
sort: 'custom',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
}
}
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
isForm: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
}
},
{
label: '创建者',
field: 'creator',
isForm: false,
isTable: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验
export const ItempackagingRules = reactive({
itemCode: [{ required: true, message: '物品代码不能为空', trigger: 'blur' }],
uom: [{ required: true, message: '计量单位不能为空', trigger: 'change' }],
stdPackUnit: [{ required: true, message: '包装单位不能为空', trigger: 'change' }],
stdPackQty: [{ required: true, message: '包装数量不能为空', trigger: 'blur' }],
available: [{ required: true, message: '是否可用不能为空', trigger: 'change' }]
})

7
src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue

@ -11,6 +11,7 @@
:routeName="routeName" :routeName="routeName"
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="Productionlineitem.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -64,7 +65,11 @@ import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import * as ItembasicApi from '@/api/wms/itembasic' import * as ItembasicApi from '@/api/wms/itembasic'
import * as ProductionLineCodeApi from '@/api/wms/productionline' import * as ProductionLineCodeApi from '@/api/wms/productionline'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue' import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import { Productionlineitem, ProductionlineitemRules, Itembasic, Productionline, Location } from '@/utils/disposition/tableColumns' // import { Itembasic, Productionline, Location } from '@/utils/disposition/tableColumns'
import { Itembasic } from './../itembasic/itembasic.data'
import { Productionline } from './../productionline/productionline.data'
import { Location } from './../location/location.data'
import { Productionlineitem, ProductionlineitemRules } from './productionlineitem.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'

139
src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts

@ -0,0 +1,139 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
const { t } = useI18n() // 国际化
/**
* @returns {Array} 线
*/
export const Productionlineitem = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '完工收货库位',
field: 'fgLocationCode',
isSearch: true,
sort: 'custom',
table: {
width: 150,
fixed: 'left'
}
},
{
label: '产线代码' ,
field: 'productionLineCode',
isSearch: true,
sort: 'custom',
table: {
width: 150
}
},
{
label: '物品代码',
field: 'itemCode',
isSearch: true,
sort: 'custom',
table: {
width: 150
}
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom',
isSearch: true,
isTable: true,
table: {
width: 120
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '生效时间',
field: 'activeTime',
sort: 'custom',
formatter : dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
}
}
},
{
label: '失效时间',
field: 'expireTime',
sort: 'custom',
formatter : dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
}
}
},
{
label:'备注',
field: 'remark',
isTable: false
},
{
label: '创建时间',
field: 'createTime',
isForm: false,
formatter: dateFormatter,
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
}
},
{
label: '创建者',
field: 'creator',
isForm: false,
isTable: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
}
}
]))
//表单校验
export const ProductionlineitemRules = reactive({
fgLocationCode: [
{ required: true, message: '请输入完工收货库位', trigger: 'blur' }
],
productionLineCode: [
{ required: true, message: '请输入产线代码', trigger: 'blur' }
],
itemCode: [
{ required: true, message: '请输入物品代码', trigger: 'blur' }
],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
})

5
src/views/wms/basicDataManage/itemManage/stdcostprice/index.vue

@ -11,6 +11,7 @@
:routeName="routeName" :routeName="routeName"
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="Stdcostprice.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -63,7 +64,9 @@ import * as StdcostpriceApi from '@/api/wms/stdcostprice'
import * as SupplierApi from '@/api/wms/supplier' import * as SupplierApi from '@/api/wms/supplier'
import * as ItembasicApi from '@/api/wms/itembasic' import * as ItembasicApi from '@/api/wms/itembasic'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue' import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import { Stdcostprice, StdcostpriceRules, Supplier, Itembasic } from '@/utils/disposition/tableColumns' import { Itembasic } from './../itembasic/itembasic.data'
import { Supplier } from './../supplier/supplier.data'
import { Stdcostprice, StdcostpriceRules } from './stdcostprice.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'

150
src/views/wms/basicDataManage/itemManage/stdcostprice/stdcostprice.data.ts

@ -0,0 +1,150 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
const { t } = useI18n() // 国际化
/**
* @returns {Array}
*/
export const Stdcostprice = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '供应商代码',
field: 'supplierCode',
isSearch: true,
sort: 'custom',
table: {
width: 150,
fixed: 'left'
}
},
{
label: '物料代码',
field: 'itemCode',
isSearch: true,
sort: 'custom',
table: {
width: 150
}
},
{
label: '货币',
field: 'currency',
dictType: DICT_TYPE.CURRENCY,
dictClass: 'string',
sort: 'custom',
isSearch : true,
isTable : true
},
{
label: '价格',
field: 'price',
sort: 'custom',
isSearch: true
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 120
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '生效时间',
field: 'activeTime',
isTable: true,
sort: 'custom',
formatter : dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
}
}
},
{
label: '失效时间',
field: 'expireTime',
isTable: true,
sort: 'custom',
formatter : dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
}
}
},
{
label: '创建时间',
field: 'createTime',
isForm: false,
sort: 'custom',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
},
{
label: '创建者',
field: 'creator',
isForm: false,
isTable: false
},
{
label: '备注',
field: 'remark',
isTable: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
}
}
]))
//表单校验
export const StdcostpriceRules = reactive({
supplierCode: [
{ required: true, message: '请输入供应商代码', trigger: 'blur' }
],
itemCode: [
{ required: true, message: '请输入物料代码', trigger: 'blur' }
],
currency: [
{ required: true, message: '请选择货币', trigger: 'change' }
],
price: [
{ required: true, message: '请输入价格', trigger: 'blur' }
],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
})
Loading…
Cancel
Save