Browse Source

增加查看其他包装数据页面

master_hella_20240701
zhaoxuebing 8 months ago
parent
commit
48ec3c31eb
  1. 11
      src/api/wms/supplierdeliverRecordDetail/index.ts
  2. 1
      src/api/wms/supplierdeliverRecordMain/index.ts
  3. 1
      src/api/wms/supplierdeliverRequestDetail/index.ts
  4. 6
      src/api/wms/supplierdeliverRequestMain/index.ts
  5. 3
      src/locales/en-US.ts
  6. 3
      src/locales/zh-CN.ts
  7. 52
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue
  8. 625
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts
  9. 34
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  10. 156
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

11
src/api/wms/supplierdeliverRecordDetail/index.ts

@ -85,3 +85,14 @@ export const exportSupplierdeliverRecordDetail = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/supplierdeliver-record-detail/get-import-template' })
}
// 查询供应商发货记录
export const queryChildPickingNumber = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/supplierdeliver-record-detail/queryChildPickingNumberSenior', data })
} else {
return await request.get({ url: `/wms/supplierdeliver-record-detail/queryChildPickingNumberPage`, params })
}
}

1
src/api/wms/supplierdeliverRecordMain/index.ts

@ -85,3 +85,4 @@ export const importTemplate = () => {
export const createPurchasereceiptRequest = async (number:string) => {
return await request.post({ url: `/wms/supplierdeliver-record-main/createPurchasereceiptRequest?number=`+number })
}

1
src/api/wms/supplierdeliverRequestDetail/index.ts

@ -32,6 +32,7 @@ export interface SupplierdeliverRequestDetailVO {
toOwnerCode: string
}
// 查询供应商发货申请子列表
export const getSupplierdeliverRequestDetailPage = async (params) => {
if (params.isSearch) {

6
src/api/wms/supplierdeliverRequestMain/index.ts

@ -1,4 +1,5 @@
import request from '@/config/axios'
import { SupplierdeliverRequestDetailVO } from '../supplierdeliverRequestDetail'
export interface SupplierdeliverRequestMainVO {
ppNumber: string
@ -90,11 +91,10 @@ export const selfCheckReport = async (id) => {
}
// 生成标签
export const genLabel = async (id) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/genLabel?id=` + id })
export const genLabel = async (data:SupplierdeliverRequestMainVO) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/genLabel`,data })
}
// 生成记录
export const genRecordsSupplierdeliverRequestMain = async (id) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/genRecords?id=` + id })

3
src/locales/en-US.ts

@ -311,7 +311,8 @@ export default {
dataCreate: 'Dict Data Create',
dataUpdate: 'Dict Data Eidt',
fileUpload: 'File Upload',
createLabel: 'create label'
createLabel: 'create label',
viewDetail:'Detailed list'
},
dialog: {
dialog: 'Dialog',

3
src/locales/zh-CN.ts

@ -310,7 +310,8 @@ export default {
typeUpdate: '字典类型编辑',
dataCreate: '字典数据新增',
dataUpdate: '字典数据编辑',
createLabel: '创建标签'
createLabel: '创建标签',
viewDetail:'明细列表'
},
dialog: {
dialog: '弹窗',

52
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue

@ -57,12 +57,27 @@
:detailAllSchemas="SupplierdeliverRecordDetail.allSchemas"
:detailAllSchemasRules="SupplierdeliverRecordDetailRules"
:apiPage="SupplierdeliverRecordDetailApi.getSupplierdeliverRecordDetailPage"
:buttondataTable="buttondataTable"
@tableFormButton="tableFormButton"
/>
<!-- 父包装弹窗 -->
<BasicForm
ref="detailParenPackingRef"
@success="getList"
:tableAllSchemas="SupplierdeliverRecordDetailPickingNumer.allSchemas"
:tableFormRules="SupplierdeliverRecordDetailRules"
:tableData="detatableData.tableList"
:isBusiness="true"
:isShowButton="false"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { SupplierdeliverRecordMain,SupplierdeliverRecordMainRules,SupplierdeliverRecordDetail,SupplierdeliverRecordDetailRules } from './supplierdeliverRecordMain.data'
import { SupplierdeliverRecordMain,SupplierdeliverRecordMainRules,
SupplierdeliverRecordDetail,SupplierdeliverRecordDetailRules,SupplierdeliverRecordDetailPickingNumer } from './supplierdeliverRecordMain.data'
import * as SupplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain'
import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -163,12 +178,45 @@ const handleDocumentPrint = async (id) => {
window.open(documentSrc.value + '&id=' + id)
}
//
const detailParenPackingRef = ref()
const { tableObject: detatableData, tableMethods: detatableMethods } = useTable({
getListApi: SupplierdeliverRecordDetailApi.queryChildPickingNumber
})
const { getList:getDetailList } = detatableMethods
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue,'recordSupplierdeliverMain')
}
// table
const buttondataTable = ref([{
label: '查看其他包装规格',
name: 'viewParentPickingNumber',
hide: false,
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
}])
// Bom
const tableFormButton = async (val , row) => {
if (val == 'viewParentPickingNumber') { //
detatableData.params = {
masterId:row.masterId,
parentPackingNumber:row.packingNumber
}
await getDetailList()
detailParenPackingRef.value.open('create', row, null,'viewDetail')//
}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
@ -194,6 +242,8 @@ const searchFormClick = (searchData) => {
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()

625
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts

@ -392,62 +392,14 @@ export const SupplierdeliverRecordMainRules = reactive({
* @returns {Array}
*/
export const SupplierdeliverRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
// {
// label: '从包装号',
// field: 'fromPackingNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '到包装号',
// field: 'toPackingNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '从批次',
// field: 'fromBatch',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '到批次',
// field: 'toBatch',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '替代批次',
// field: 'altBatch',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '从器具号',
// field: 'fromContainerNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '到器具号',
// field: 'toContainerNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '订单号',
field: 'poNumber',
@ -518,7 +470,6 @@ export const SupplierdeliverRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
{
label: '包装规格',
field: 'packUnit',
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string',
isTable: true,
sort: 'custom',
@ -765,14 +716,17 @@ export const SupplierdeliverRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150
},
},
// {
// label: '任务明细ID',
// field: 'jobDetailId',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
},
isTableForm:true,
}
]))
//表单校验
@ -832,3 +786,544 @@ export const SupplierdeliverRecordDetailRules = reactive({
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})
/**
* @returns {Array}
*/
export const SupplierdeliverRecordDetailPickingNumer = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '订单数量',
field: 'orderQty',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled: true,
min: 0,
precision: 6
}
},
tableForm: {
disabled: true,
type: 'InputNumber',
min: 0,
precision: 6
}
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '包装数量',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '包装规格',
field: 'packUnit',
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '供应商计量数量',
field: 'supplierQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '供应商计量单位',
field: 'supplierUom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '到货日期',
field: 'arriveDate',
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
}
},
{
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
}
},
{
label: '过期日期',
field: 'expireDate',
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
}
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '从库位组代码',
field: 'fromLocationGroupCode',
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '到库位组代码',
field: 'toLocationGroupCode',
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '从库区代码',
field: 'fromAreaCode',
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '到库区代码',
field: 'toAreaCode',
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '从货主代码',
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '到货主代码',
field: 'toOwnerCode',
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
disabled: true,
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
tableForm:{
disabled: true
}
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
form:{
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
}
]))

34
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -95,8 +95,8 @@
:tableData="detatableData.tableList"
:isBusiness="true"
:isShowButton="false"
@searchTableSuccess="searchTableSuccessLabel"
@submitForm="submitFormLabel"
/>
</template>
@ -148,9 +148,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
row['orderQty'] = val[0]['orderQty']
row['uom'] = val[0]['uom']
}
if (formField == 'packQty'){
row['packUnit'] = val[0]['packUnit']
}
} else {
const setV = {}
setV[formField] = val[0][searchField]
@ -183,13 +180,30 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
setV['poLine'] = val[0]['poLine']
setV['uom'] = val[0]['uom']
}
if (formField == 'packQty'){
setV['packUnit'] = val[0]['packUnit']
}
formRef.setValues(setV)
})
}
//
const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
console.log("formField:",formField)
console.log("val:",val)
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
if (formField == 'packUnit') {
row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty']
}
if (formField == 'secondPackUnit') {
row['secondPackUnit'] = val[0]['packUnit']
row['secondPackQty'] = val[0]['packQty']
}
}
})
}
const { tableObject, tableMethods } = useTable({
getListApi: SupplierdeliverRequestMainApi.getSupplierdeliverRequestMainPage //
})
@ -543,8 +557,12 @@ const { getList:getDetailList } = detatableMethods
//
const submitFormLabel = async (formType, data) => {
try {
console.log("formType==",formType)
console.log("data==",data)
data.subList = detatableData.tableList
console.log("detatableData",detatableData)
await message.confirm('是否为此数据生成标签?')
await SupplierdeliverRequestMainApi.genLabel(genLabelId.value)
await SupplierdeliverRequestMainApi.genLabel(data)
isCreateLabel.value = true
message.success('创建标签成功')
} finally {

156
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

@ -862,73 +862,6 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
precision: 6
}
},
{
label: '包装数量',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
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: {
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
}]
}
},
{
label: '包装规格',
field: 'packUnit',
isTable: true,
sort: 'custom',
table: {
width: 150,
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true,
}
},
{
label: '从货主代码',
field: 'fromOwnerCode',
@ -1446,7 +1379,60 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
}
},
{
label: '包装数量',
label: '包装规格1',
field: 'packUnit',
isTable: true,
sort: 'custom',
table: {
width: 150,
componentProps: {
disabled: true,
isSearchList: true,
searchListPlaceholder: '请选择包装',
searchField: 'packUnit',
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: 'packUnit',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
{
label: '包装数量1',
field: 'packQty',
sort: 'custom',
table: {
@ -1454,10 +1440,25 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true,
isSearchList: false,
}
},
{
label: '包装规格2',
field: 'secondPackUnit',
isTable: true,
sort: 'custom',
table: {
width: 150,
componentProps: {
disabled: true,
isSearchList: true,
searchListPlaceholder: '请选择包装',
searchField: 'packQty',
searchField: 'packUnit',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
@ -1473,15 +1474,15 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
isInpuFocusShow: false,
disabled: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',
searchField: 'packQty',
searchField: 'packUnit',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
@ -1500,12 +1501,13 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
}
},
{
label: '包装规格',
field: 'packUnit',
isTable: true,
label: '包装数量2',
field: 'secondPackQty',
sort: 'custom',
table: {
width: 150,
width: 150
},
form: {
componentProps: {
disabled:true
}

Loading…
Cancel
Save