Browse Source

采购任务修改

master_hella_20240701
zhaoxuebing 8 months ago
parent
commit
b5833706fd
  1. 11
      src/api/wms/purchasereceiptJobDetail/index.ts
  2. 56
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue
  3. 450
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts
  4. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

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

@ -72,4 +72,15 @@ export const exportPurchasereceiptJobDetail = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/purchasereceipt-job-detail/get-import-template' })
}
// 查询采购收货任务子列表
export const queryPurchaseceiptChildPackingNumber = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchasereceipt-job-detail/seniorPackingNumber', data })
} else {
return await request.get({ url: `/wms/purchasereceipt-job-detail/pagePackingNumber`, params })
}
}

56
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue

@ -62,12 +62,34 @@
:detailAllSchemasRules="PurchasereceiptJobDetailRules"
:searchTableParams="searchTableParams"
:apiPage="PurchasereceiptJobDetailApi.getPurchasereceiptJobDetailPage"
:buttondataTable="buttondataTable"
@tableFormButton="tableFormButton"
/>
<!-- 子包装弹窗 -->
<BasicForm
ref="detailParenPackingRef"
@success="getList"
:tableAllSchemas="PurchasereceiptJobDetailPackingNumber.allSchemas"
:tableFormRules="PurchasereceiptJobDetailRules"
:tableData="packingDetatableData.tableList"
:isBusiness="true"
:isShowButton="false"
:isShowReduceButton="false"
:isShowFooterButtton="false"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { PurchasereceiptJobMain,PurchasereceiptJobMainRules,PurchasereceiptJobDetail,PurchasereceiptJobDetailRules } from './purchasereceiptJobMain.data'
import { PurchasereceiptJobMain,
PurchasereceiptJobMainRules,
PurchasereceiptJobDetail,
PurchasereceiptJobDetailRules,
PurchasereceiptJobDetailPackingNumber } from './purchasereceiptJobMain.data'
import * as PurchasereceiptJobMainApi from '@/api/wms/purchasereceiptJobMain'
import * as PurchasereceiptJobDetailApi from '@/api/wms/purchasereceiptJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -202,12 +224,44 @@ const handleClose = async (id: number) => {
} catch {}
}
//
const detailParenPackingRef = ref()
const { tableObject: packingDetatableData, tableMethods: packDetatableMethods } = useTable({
getListApi: PurchasereceiptJobDetailApi.queryPurchaseceiptChildPackingNumber
})
const { getList:queryDetailList } = packDetatableMethods
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue,'jobPurchasereceiptMain')
}
// table
const buttondataTable = ref([{
label: '查看其他包装规格',
name: 'viewParentPickingNumber',
hide: false,
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
}])
//
const tableFormButton = async (val , row) => {
if (val == 'viewParentPickingNumber') { //
packingDetatableData.params = {
masterId:row.masterId,
parentPackingNumber:row.packingNumber
}
await queryDetailList()
detailParenPackingRef.value.open('create', row, null,'viewDetail')//
}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {

450
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts

@ -952,6 +952,17 @@ export const PurchasereceiptJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
},
isTableForm:true,
}
]))
//表单校验
@ -1005,3 +1016,442 @@ export const PurchasereceiptJobDetailRules = reactive({
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})
/**
* @returns {Array}
*/
export const PurchasereceiptJobDetailPackingNumber = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled:true
}
},
tableForm: {
disabled: true,
}
},
{
label: '器具号',
field: 'containerNumber',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled:true
}
},
tableForm: {
disabled: true,
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled:true
}
},
tableForm: {
disabled: true,
}
},
{
label: '替代批次',
field: 'altBatch',
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: {
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
tableForm: {
disabled: true,
type:'FormDate',
valueFormat: 'x',
}
},
{
label: '过期日期',
field: 'expireDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
tableForm: {
disabled: true,
type:'FormDate',
valueFormat: 'x',
}
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
}
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
}
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
}
},
{
label: '订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
}
},
{
label: '订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
}
},
{
label: '包装数量',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
},
tableForm: {
disabled: true,
}
},
{
label: '包装规格',
field: 'packUnit',
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
}
},
{
label: '供应商计量数量',
field: 'supplierQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
},
tableForm: {
disabled: true,
}
},
{
label: '供应商计量单位',
field: 'supplierUom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
}
},
{
label: '转换率',
field: 'convertRate',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
},
tableForm: {
disabled: true,
}
},
{
label: '从货主代码',
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
}
},
{
label: '到货主代码',
field: 'toOwnerCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
}
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
}
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
}
},
{
label: '物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
}
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
},
tableForm: {
disabled: true,
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true,
}
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180
},
tableForm: {
disabled: true,
}
},
{
label: '备注',
fiield: 'remark',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
}
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
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: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
tableForm: {
disabled: true,
type:'FormDate',
valueFormat: 'x',
}
},
]))

2
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -98,7 +98,7 @@
@submitForm="submitFormLabel"
/>
<!-- 包装弹窗 -->
<!-- 包装弹窗 -->
<BasicForm
ref="detailParenPackingRef"
@success="getList"

Loading…
Cancel
Save