Browse Source

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

intex_online20241111
ljlong_2630 1 month 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. 77
      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) {
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,
},
{
label: '包装规格',
field: 'packUnit',
label: '换货库位',
field: 'locationCode',
sort: 'custom',
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']))
newVal.forEach(item=>{
let tfk = JSON.parse(JSON.stringify(tableFormKeys))
tfk.batch = formatTime(new Date(), 'yyyyMMdd')
tfk['itemCode'] = item['itemCode']
tfk['itemName'] = item['itemName']
tfk['uom'] = item['supplierUom']
tfk['packUnit'] = item['packUnit']
tfk['uom'] = item['uom']
tfk['batch'] = item['batch']
tfk['inventoryQty'] = item['qty']
tfk['locationCode'] = item['locationCode']
tfk['inventoryStatus'] = item['inventoryStatus']
tableData.value.push(tfk)
})
}
@ -420,7 +422,7 @@ const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue,'requestUnplannedreceiptMain')
detailRef.value.openDetail(row, titleName, titleValue,'requestPurchaseBarterMain')
}
/** 删除按钮操作 */

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

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

Loading…
Cancel
Save