Browse Source

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

intex_online20241111
ljlong_2630 4 weeks ago
parent
commit
2ac7137aec
  1. 11
      src/api/wms/purchaseBarterRequestMain/index.ts
  2. 4
      src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRecord/purchaseBarterRecordMain.data.ts
  3. 10
      src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/index.vue
  4. 83
      src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/purchaseBarterRequestMain.data.ts

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

@ -99,3 +99,14 @@ export async function inStoragePurchaseBarterRequestMain(id: number) {
export async function suspendPurchaseBarterRequestMain(id: number) { export async function suspendPurchaseBarterRequestMain(id: number) {
return await request.put({ url: `/wms/purchase-barter-request-main/suspend?id=` + id }) return await request.put({ url: `/wms/purchase-barter-request-main/suspend?id=` + id })
} }
export const getSupplieritemPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/purchase-barter-request-main/getSupplieritemSenior', data })
} else {
return await request.get({ url: `/wms/purchase-barter-request-main/getSupplieritemPage`, params })
}
}

4
src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRecord/purchaseBarterRecordMain.data.ts

@ -74,8 +74,8 @@ export const PurchaseBarterRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
isSearch: true, isSearch: true,
}, },
{ {
label: '包装规格', label: '换货库位',
field: 'packUnit', field: 'locationCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
}, },

10
src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/index.vue

@ -141,11 +141,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
let newVal = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode'])) let newVal = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']))
newVal.forEach(item=>{ newVal.forEach(item=>{
let tfk = JSON.parse(JSON.stringify(tableFormKeys)) let tfk = JSON.parse(JSON.stringify(tableFormKeys))
tfk.batch = formatTime(new Date(), 'yyyyMMdd')
tfk['itemCode'] = item['itemCode'] tfk['itemCode'] = item['itemCode']
tfk['itemName'] = item['itemName'] tfk['itemName'] = item['itemName']
tfk['uom'] = item['supplierUom'] tfk['uom'] = item['uom']
tfk['packUnit'] = item['packUnit'] tfk['batch'] = item['batch']
tfk['inventoryQty'] = item['qty']
tfk['locationCode'] = item['locationCode']
tfk['inventoryStatus'] = item['inventoryStatus']
tableData.value.push(tfk) tableData.value.push(tfk)
}) })
} }
@ -420,7 +422,7 @@ const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue,'requestUnplannedreceiptMain') detailRef.value.openDetail(row, titleName, titleValue,'requestPurchaseBarterMain')
} }
/** 删除按钮操作 */ /** 删除按钮操作 */

83
src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/purchaseBarterRequestMain.data.ts

@ -6,7 +6,8 @@ import {
Supplieritem Supplieritem
} from "@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data"; } from "@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data";
import * as SupplieritemApi from "@/api/wms/supplieritem"; import * as SupplieritemApi from "@/api/wms/supplieritem";
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as PurchaseBarterRequestMainApi from "@/api/wms/purchaseBarterRequestMain";
/** /**
* @returns {Array} * @returns {Array}
*/ */
@ -109,16 +110,10 @@ export const PurchaseBarterRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',// 输入框占位文本 searchListPlaceholder: '请选择物料代码',// 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '供应商物料信息', // 查询弹窗标题 searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 searchAllSchemas: Balance.allSchemas,
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 searchPage: PurchaseBarterRequestMainApi.getSupplieritemPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
},{
key: 'supplierCode', key: 'supplierCode',
value: 'supplierCode', value: 'supplierCode',
action: '==', action: '==',
@ -147,21 +142,19 @@ export const PurchaseBarterRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '供应商物料信息', // 查询弹窗标题 searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 searchAllSchemas: Balance.allSchemas,
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 searchPage: PurchaseBarterRequestMainApi.getSupplieritemPage, // 查询弹窗所需分页方法
searchCondition: [ searchCondition: [{
{ key: 'supplierCode',
key: 'available', value: 'supplierCode',
value: 'TRUE', action: '==',
isMainValue: false message: '供应商代码不能为空!',
},{ isFormModel:true, // filters中添加筛选的数据--取于formModel
key: 'supplierCode', required:true, // 前置添加必有,和isFormModel结合使用
value: 'supplierCode', isSearch: true,
message: '供应商代码不能为空!', isMainValue: false
isMainValue:true }],
}
],
verificationParams: [ verificationParams: [
{ {
key: 'itemCode', key: 'itemCode',
@ -220,8 +213,8 @@ export const PurchaseBarterRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
} }
}, },
{ {
label: '包装规格', label: '换货库位',
field: 'packUnit', field: 'locationCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
tableForm: { tableForm: {
@ -233,15 +226,42 @@ export const PurchaseBarterRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
} }
} }
}, },
{
label: '库存数量 ',
field: 'inventoryQty',
sort: 'custom',
isSearch: false,
isTable: false,
tableForm: {
disabled: true
},
form:{
componentProps:{
disabled:true
}
}
},
{ {
label: '换货数量', label: '换货数量',
field: 'qty', field: 'qty',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
// form: {
// component: 'InputNumber',
// value: 0
// },
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 componentProps: {
min: 0,
precision: 6,
}
}, },
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6,
}
}, },
{ {
label: '换货原因 ', label: '换货原因 ',
@ -265,15 +285,16 @@ export const PurchaseBarterRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
function validateQty(rule, value, callback) { function validateQty(rule, value, callback) {
const numericValue = Number(value); const numericValue = Number(value);
if (Number.isInteger(numericValue) && numericValue > 0) { if (numericValue > 0) {
// if(numericValue < )
callback(); callback();
} else { } else {
callback(new Error('数量必须是一个正数')); callback(new Error('换货数量必须是一个正数'));
} }
} }
//表单校验 //表单校验
export const PurchaseBarterRequestDetailRules = reactive({ export const PurchaseBarterRequestDetailRules = reactive({
qty:[ qty:[
{ validator:validateQty, message: '数量必须是一个正数', trigger: 'change'} { validator:validateQty, message: '换货数量必须是一个正数', trigger: 'change'}
], ],
}) })

Loading…
Cancel
Save