Browse Source

采购退货申请-新版的文件名

hella_online_20240816
wangyufei 3 months ago
parent
commit
9ef6ae66ff
  1. 26
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue
  2. 467
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts

26
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue

@ -54,10 +54,10 @@
<BasicForm <BasicForm
ref="formRef" ref="formRef"
@success="getList" @success="getList"
:rules="PurchasereturnRequestMainRules" :rules="PurchasereturnRequestMainRulesNew"
:formAllSchemas="PurchasereturnRequestMain.allSchemas" :formAllSchemas="PurchasereturnRequestMainNew.allSchemas"
:tableAllSchemas="PurchasereturnRequestDetail.allSchemas" :tableAllSchemas="PurchasereturnRequestDetailNew.allSchemas"
:tableFormRules="PurchasereturnRequestDetailRules" :tableFormRules="PurchasereturnRequestDetailRulesNew"
:tableData="tableData" :tableData="tableData"
:apiUpdate="PurchasereturnRequestMainApi.updatePurchasereturnRequestMain" :apiUpdate="PurchasereturnRequestMainApi.updatePurchasereturnRequestMain"
:apiCreate="PurchasereturnRequestMainApi.createPurchasereturnRequestMain" :apiCreate="PurchasereturnRequestMainApi.createPurchasereturnRequestMain"
@ -140,15 +140,19 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import {
PurchasereturnRequestMainNew,
PurchasereturnRequestMainRulesNew,
PurchasereturnRequestDetailNew,
PurchasereturnRequestDetailRulesNew,
PurchasereturnPurchasereceiptRecordNew
} from './purchasereturnRequestMainNew.data'
import { import {
PurchasereturnRequestMain, PurchasereturnRequestMain,
PurchasereturnRequestMainRules,
PurchasereturnRequestDetail, PurchasereturnRequestDetail,
PurchasereturnRequestDetailRules, PurchasereturnRequestDetailRules,
PurchasereReturnRequestDetailLabel, PurchasereReturnRequestDetailLabel
PurchasereceiptRecordMain1, } from '../purchasereturnRequestMain/purchasereturnRequestMain.data'
PurchasereturnPurchasereceiptRecord
} from './purchasereturnRequestMain.data'
import * as PurchasereturnRequestMainApi from '@/api/wms/purchasereturnRequestMain' import * as PurchasereturnRequestMainApi from '@/api/wms/purchasereturnRequestMain'
import * as PurchasereturnRequestDetailApi from '@/api/wms/purchasereturnRequestDetail' import * as PurchasereturnRequestDetailApi from '@/api/wms/purchasereturnRequestDetail'
import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail' import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail'
@ -275,7 +279,7 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
}) })
console.log('物料供应商',res) console.log('物料供应商',res)
if(res&&res.length>0){ if(res&&res.length>0){
PurchasereturnRequestMain.allSchemas.formSchema.forEach(item=>{ PurchasereturnRequestMainNew.allSchemas.formSchema.forEach(item=>{
if(item.field == 'supplierCode'){ if(item.field == 'supplierCode'){
item.componentProps.options = res item.componentProps.options = res
} }
@ -604,7 +608,7 @@ const chooseReceiptList = ()=>{
} }
searchTableRef.value.open( searchTableRef.value.open(
"收货单明细", "收货单明细",
PurchasereturnPurchasereceiptRecord.allSchemas, PurchasereturnPurchasereceiptRecordNew.allSchemas,
PurchasereturnRequestDetailApi.getPurchasereturnPurchasereceiptRecordByItemCode, PurchasereturnRequestDetailApi.getPurchasereturnPurchasereceiptRecordByItemCode,
"hahaha", "hahaha",
"hahaha", "hahaha",

467
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMain.data.ts → src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts

@ -43,120 +43,10 @@ const userDept = userStore.userSelfInfo.dept
userDept.id = userDept.id.toString() userDept.id = userDept.id.toString()
const userDeptArray: any = [userDept] const userDeptArray: any = [userDept]
// 采购收货记录展示列
export const PurchasereceiptRecordMain1 = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '物料代码',
field: 'itemCode',
fixed: 'left',
sort: 'custom',
table: {
width: 150
},
isSearch: true
},
{
label: '采购收货记录单号',
field: 'number',
fixed: 'left',
sort: 'custom',
table: {
width: 200
},
isSearch: true
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
table: {
width: 180
},
sortTableDefault: 2,
isSearch: true
},
{
label: '采购订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: true
},
{
label: '订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
}
},
{
label: '批次', // 实际是子表的从批次,为了不影响页面,单独放上面
field: 'fromBatch',
sort: 'custom',
isForm: false,
isTableForm: false,
table: {
width: 150
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
}
},
// {
// label: '包装规格',
// field: 'packUnit',
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '从库位代码',
// field: 'fromLocationCode',
// sort: 'custom',
// table: {
// width: 150
// },
//
// },
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
}
}
])
)
/** /**
* @returns {Array} 退 * @returns {Array} 退
*/ */
export const PurchasereturnRequestMain = useCrudSchemas( export const PurchasereturnRequestMainNew = useCrudSchemas(
reactive<CrudSchema[]>([ reactive<CrudSchema[]>([
{ {
label: '物料代码', label: '物料代码',
@ -431,9 +321,53 @@ export const PurchasereturnRequestMain = useCrudSchemas(
} }
]) ])
) )
//表单校验
export const PurchasereturnRequestMainRulesNew = reactive({
supplierCode: [
{ required: true, message: '请输入供应商代码', trigger: 'blur' }
],
dueTime: [
{ required: true, message: '请选择截止时间', trigger: 'blur' }
],
// purchaseReceiptRecordNumber: [
// { required: true, message: '请输入采购收货记录单号', trigger: 'blur' }
// ],
carrierCode: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
],
vehiclePlateNumber: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
fromWarehouseCode: [
{ required: true, message: '请输入从仓库代码', trigger: 'blur' }
],
fromAreaTypes: [
{ required: true, message: '请选择从库区类型范围', trigger: 'change' }
],
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' }
],
autoAgree: [
{ required: true, message: '请选择是否自动通过', trigger: 'change' }
],
autoExecute: [
{ required: true, message: '请选择是否自动执行', trigger: 'change' }
],
directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],
})
export const PurchasereturnPurchasereceiptRecordNew = useCrudSchemas(
export const PurchasereturnPurchasereceiptRecord = useCrudSchemas(
reactive<CrudSchema[]>([ reactive<CrudSchema[]>([
{ {
label: '收货日期', label: '收货日期',
@ -556,56 +490,12 @@ export const PurchasereturnPurchasereceiptRecord = useCrudSchemas(
]) ])
) )
//表单校验
export const PurchasereturnRequestMainRules = reactive({
supplierCode: [
{ required: true, message: '请输入供应商代码', trigger: 'blur' }
],
dueTime: [
{ required: true, message: '请选择截止时间', trigger: 'blur' }
],
// purchaseReceiptRecordNumber: [
// { required: true, message: '请输入采购收货记录单号', trigger: 'blur' }
// ],
carrierCode: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
],
vehiclePlateNumber: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
fromWarehouseCode: [
{ required: true, message: '请输入从仓库代码', trigger: 'blur' }
],
fromAreaTypes: [
{ required: true, message: '请选择从库区类型范围', trigger: 'change' }
],
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' }
],
autoAgree: [
{ required: true, message: '请选择是否自动通过', trigger: 'change' }
],
autoExecute: [
{ required: true, message: '请选择是否自动执行', trigger: 'change' }
],
directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],
})
/** /**
* @returns {Array} 退 * @returns {Array} 退
*/ */
export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const PurchasereturnRequestDetailNew = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '批次', label: '批次',
field: 'batch', field: 'batch',
@ -731,264 +621,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
])) ]))
//表单校验 //表单校验
export const PurchasereturnRequestDetailRules = reactive({ export const PurchasereturnRequestDetailRulesNew = reactive({
}) })
export const PurchasereReturnRequestDetailLabel = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
isTableForm: true,
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
isTableForm: true,
},
{
label: '物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
isTable:false,
isTableForm: false,
isForm: false
},
// {
// label: '器具号',
// field: 'containerNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// isTableForm: false,
// isForm: false
// },
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled:true,
min: 1,
precision: 6
},
},
tableForm: {
disabled:true,
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
}
},
{
label: '从库位代码1',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '生产日期',
field: 'produceDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
disabled:true,
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
tableForm:{
disabled:true,
type:'FormDate',
placeholder: '请选择生产日期',
valueFormat: 'x',
},
},
// {
// label: '替代批次',
// field: 'altBatch',
// sort: 'custom',
// table: {
// width: 150
// },
// isTableForm: false,
// isForm: false
// },
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
tableForm: {
type: 'Select'
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '包装数量',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true,
isSearchList: true,
searchListPlaceholder: '请选择包装',
searchField: 'packQty',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
disabled: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',
searchField: 'packQty',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
isTableForm: true,
isForm: true
},
{
label: '包装规格',
field: 'packUnit',
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150,
componentProps: {
disabled: true
}
},
tableForm:{
disabled:true
},
isTableForm: true,
isForm: true
},
]))
Loading…
Cancel
Save