Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
陈薪名 1 year ago
parent
commit
4e07f20675
  1. 25
      src/views/wms/basicDataManage/itemarea/index.vue
  2. 403
      src/views/wms/basicDataManage/itemarea/itemarea.data.ts
  3. 5
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue
  4. 157
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts
  5. 173
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

25
src/views/wms/basicDataManage/itemarea/index.vue

@ -51,7 +51,18 @@
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Itemarea.allSchemas" />
<Detail
ref="detailRef"
:isBasic="true"
:allSchemas="Itemarea.allSchemas"
:detailAllSchemas="ItemareaDetail.allSchemas"
:apiCreate="ItemareaDetailApi.createItemareaDetail"
:apiUpdate="ItemareaDetailApi.updateItemareaDetail"
:apiPage="ItemareaDetailApi.getItemareaDetailPage"
:apiDelete="ItemareaDetailApi.deleteItemareaDetail"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/itemarea/import" :importTemplateData="importTemplateData" @success="importSuccess" />
@ -59,8 +70,9 @@
<script setup lang="ts">
import download from '@/utils/download'
import { Itemarea,ItemareaRules } from './itemarea.data'
import { Itemarea,ItemareaRules,ItemareaDetail } from './itemarea.data'
import * as ItemareaApi from '@/api/wms/itemarea'
import * as ItemareaDetailApi from '@/api/wms/itemareaDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
@ -85,6 +97,15 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val

403
src/views/wms/basicDataManage/itemarea/itemarea.data.ts

@ -1,92 +1,295 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const ItemareaRules = reactive({
itemCode: [required],
areaCode: [required],
inPackUnit: [required],
outPackUnit: [required],
needReceive: [required],
available: [required],
manageMode: [required],
})
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '../itemManage/itembasic/itembasic.data'
import * as AreaApi from '@/api/wms/areabasic'
import { Area } from '../factoryModeling/areabasic/areabasic.data'
import * as PackageunitApi from '@/api/wms/packageunit'
import { Packageunit } from '../itemManage/packageunit/packageunit.data'
export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false,
},
// {
// label: 'id',
// field: 'id',
// sort: 'custom',
// isForm: false,
// },
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 120,
fixed: 'left'
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
},
{
label: '区域代码',
field: 'areaCode',
sort: 'custom',
isSearch: true,
table: {
width: 120,
fixed: 'left'
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库区代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库区基础信息', // 查询弹窗标题
searchAllSchemas: Area.allSchemas, // 查询弹窗所需类
searchPage: AreaApi.getAreaPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
},
{
label: '入库包装规格',
field: 'inPackUnit',
sort: 'custom',
isSearch: true,
table: {
width: 140,
fixed: 'left'
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '包装规格基础信息', // 查询弹窗标题
searchAllSchemas: Packageunit.allSchemas, // 查询弹窗所需类
searchPage: PackageunitApi.getPackageunitPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
},
{
label: '出库包装规格',
field: 'outPackUnit',
sort: 'custom',
isSearch: true,
table: {
width: 140,
fixed: 'left'
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '包装规格基础信息', // 查询弹窗标题
searchAllSchemas: Packageunit.allSchemas, // 查询弹窗所需类
searchPage: PackageunitApi.getPackageunitPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
},
{
label: '最高库存数量(0 为无限)',
label: '最高库存数量',
field: 'maxQty',
sort: 'custom',
table: {
width: 140,
fixed: 'left'
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
},
},
{
label: '最低库存数量',
field: 'minQty',
sort: 'custom',
table: {
width: 140,
fixed: 'left'
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
},
},
{
label: '安全预警库存数量',
field: 'safeQty',
sort: 'custom',
table: {
width: 170,
fixed: 'left'
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
},
},
{
label: '是否自动补料',
field: 'autoRepleinsh',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
// colorType: 'danger',
isTable: true,
table: {
width: 140
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
{
label: '补料来源库区',
field: 'repleinshFromArea',
sort: 'custom',
isSearch: true,
table: {
width: 140,
fixed: 'left'
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库区代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库区基础信息', // 查询弹窗标题
searchAllSchemas: Area.allSchemas, // 查询弹窗所需类
searchPage: AreaApi.getAreaPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
},
{
label: '补料数量',
field: 'repleinshQty',
sort: 'custom',
table: {
width: 120,
fixed: 'left'
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
},
},
{
label: '需要接收确认',
field: 'needReceive',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
// colorType: 'danger',
isTable: true,
table: {
width: 140
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
// colorType: 'danger',
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: {
@ -100,6 +303,12 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
field: 'expireTime',
sort: 'custom',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
} ,
form: {
component: 'DatePicker',
componentProps: {
@ -112,6 +321,9 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 120
} ,
},
{
label: '创建时间',
@ -119,12 +331,21 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
formatter: dateFormatter,
isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
},
{
label: '创建者ID',
label: '创建者',
field: 'creator',
sort: 'custom',
isForm: false,
table: {
width: 120
},
},
{
label: '最后更新时间',
@ -132,28 +353,170 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
formatter: dateFormatter,
isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
},
{
label: '最后更新者ID',
label: '最后更新者',
field: 'updater',
sort: 'custom',
isForm: false,
table: {
width: 120
},
},
{
label: '管理精度',
field: 'manageMode',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.MANAGEMENT_MODE,
dictClass: 'string',
// colorType: 'danger',
isTable: true,
table: {
width: 120
},
},
{
label: '入库后库存自动转换为出库包装规格',
field: 'newlyToOutpackunit',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
// colorType: 'danger',
isTable: true,
table: {
width: 120
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
{
label: '出库后剩余库存自动转换为出库包装规格',
field: 'surplusToOutpackunit',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
// colorType: 'danger',
isTable: true,
table: {
width: 120
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验
export const ItemareaRules = reactive({
itemCode: [
{ required: true, message: '请选择物料代码', trigger: 'change' }
],
areaCode: [
{ required: true, message: '请选择到区域代码', trigger: 'change' }
],
inPackUnit: [
{ required: true, message: '请选择入库包装规格', trigger: 'change' }
],
outPackUnit: [
{ required: true, message: '请选择出库包装规格', trigger: 'change' }
],
needReceive: [
{ required: true, message: '请选择需要接受确认', trigger: 'change' }
],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
manageMode: [
{ required: true, message: '请选择管理精度', trigger: 'change' }
],
})
/**
* @returns {Array}
*/
export const ItemareaDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false,
},
{
label: '主表ID',
field: 'masterId',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
},
{
label: '创建者Id',
field: 'creator',
sort: 'custom',
isForm: false,
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
},
{
label: '最后更新者Id',
field: 'updater',
sort: 'custom',
isForm: false,
},
{
label: '库位组',
field: 'locationGroup',
sort: 'custom',
},
{
label: '库位代码',
field: 'locationCode',
sort: 'custom',
},
{
label: '操作',

5
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue

@ -120,7 +120,10 @@
const setV = {}
setV[formField] = val[0][searchField]
if(formField == 'supplierCode'){
tableData.value = [] //
tableData.value = [] //
setV['contactName']=val[0]['contacts']
setV['contactPhone']=val[0]['phone']
setV['contactEmail']=val[0]['email']
}
formRef.setValues(setV)
}

157
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts

@ -100,21 +100,6 @@ export const PurchaseMain = useCrudSchemas(reactive<CrudSchema[]>([
value: new Date().getTime()
},
},
{
label: '税率',
field: 'taxRate',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
style: {width:'100%'},
min: 0
}
}
},
{
label: '截止日期',
field: 'dueDate',
@ -138,32 +123,23 @@ export const PurchaseMain = useCrudSchemas(reactive<CrudSchema[]>([
},
},
{
label: '版本',
field: 'version',
sort: 'custom',
table: {
width: 150
},
},
{
label: '联系人姓名',
field: 'contactName',
sort: 'custom',
table: {
width: 150
},
},
{
label: '联系人电话',
field: 'contactPhone',
label: '税率',
field: 'taxRate',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
style: {width:'100%'},
min: 0
}
}
},
{
label: '联系人电子邮件',
field: 'contactEmail',
label: '版本',
field: 'version',
sort: 'custom',
table: {
width: 150
@ -186,13 +162,6 @@ export const PurchaseMain = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm: false,
isForm: false,
},
{
label: '备注',
field: 'remark',
table: {
width: 150
},
},
{
label: '是否寄存订单',
field: 'isConsignment',
@ -212,21 +181,6 @@ export const PurchaseMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
isForm: false,
form: {
value: 'PurchaseReceipt',
componentProps: {
disabled: true
}
}
},
{
label: '是否可用',
field: 'available',
@ -247,6 +201,47 @@ export const PurchaseMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '联系人姓名',
field: 'contactName',
sort: 'custom',
table: {
width: 150
},
},
{
label: '联系人电话',
field: 'contactPhone',
sort: 'custom',
table: {
width: 150
},
},
{
label: '联系人电子邮件',
field: 'contactEmail',
sort: 'custom',
table: {
width: 150
},
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
isForm: false,
isTable: false,
form: {
value: 'PurchaseReceipt',
componentProps: {
disabled: true
}
}
},
{
label: '创建者',
field: 'creator',
@ -311,6 +306,13 @@ export const PurchaseMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '备注',
field: 'remark',
table: {
width: 150
},
},
{
label: '操作',
field: 'action',
@ -366,6 +368,19 @@ export const PurchaseMainRules = reactive({
* @returns {Array}
*/
export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
isTableForm: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '行号',
field: 'lineNumber',
@ -422,19 +437,6 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '单据号',
field: 'number',
isTableForm: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '计量单位',
field: 'uom',
@ -679,14 +681,6 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm: false,
isForm: false
},
{
label: '备注',
field: 'remark',
table: {
width: 150
},
},
{
label: '是否可用',
field: 'available',
@ -793,6 +787,13 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
isForm: false,
},
{
label: '备注',
field: 'remark',
table: {
width: 150
},
},
{
label: '操作',
field: 'action',

173
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

@ -126,15 +126,34 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isForm: false,
},
{
label: '备注',
field: 'remark',
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
isTable: false,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
isSearch: true,
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
isForm: false,
table: {
width: 150
},
},
{
label: '创建时间',
@ -160,8 +179,8 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '创建者',
field: 'creator',
label: '最后更新者',
field: 'updater',
sort: 'custom',
isForm: false,
table: {
@ -192,33 +211,13 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '最后更新者',
field: 'updater',
sort: 'custom',
isForm: false,
table: {
width: 150
},
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
isSearch: true,
isTable: false,
},
{
label: '操作',
@ -255,12 +254,26 @@ export const PurchasePlanMainRules = reactive({
* @returns {Array}
*/
export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
isTableForm: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
width: 170
},
tableForm: {
isInpuFocusShow: true,
@ -358,20 +371,6 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
}]
}
},
{
label: '单据号',
field: 'number',
sort: 'custom',
isTableForm: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料代码',
field: 'itemCode',
@ -406,32 +405,6 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
},
// {
// label: '已计划数量',
// field: 'plannedQty',
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// componentProps: {
// disabled: true
// }
// },
// tableForm: {
// disabled: true
// }
// },
{
label: '已发货数量',
field: 'shippedQty',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '计划数量',
field: 'planQty',
@ -452,6 +425,16 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '已发货数量',
field: 'shippedQty',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '计量单位',
field: 'uom',
@ -467,6 +450,31 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
type: 'Select'
}
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
inactiveValue: 'FALSE',
disabled: true
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '最后更新者',
field: 'updater',
@ -508,31 +516,6 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
inactiveValue: 'FALSE',
disabled: true
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '操作',
field: 'action',

Loading…
Cancel
Save