Browse Source

计划外入库添加明细

master_hella_20240701
wangyufei 5 months ago
parent
commit
70fbf3f0e6
  1. 2
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts
  2. 32
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  3. 1
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts

2
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts

@ -687,6 +687,7 @@ export const UnplannedreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]
table: { table: {
width: 150 width: 150
}, },
isTable:false,
}, },
{ {
label: '科目代码', label: '科目代码',
@ -695,6 +696,7 @@ export const UnplannedreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]
table: { table: {
width: 150 width: 150
}, },
isTable:false,
}, },
{ {
label: '原因', label: '原因',

32
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="UnplannedreceiptRequestMainRules" :rules="UnplannedreceiptRequestMainRules"
:formAllSchemas="UnplannedreceiptRequestMain.allSchemas" :formAllSchemas="UnplannedreceiptRequestMain.allSchemas"
@ -195,19 +197,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if(formField == 'toLocationCode'){ if(formField == 'toLocationCode'){
row['toLocationCode'] = val[0]['code'] row['toLocationCode'] = val[0]['code']
} else if(formField == 'itemCode'){ } else if(formField == 'itemCode'){
const isType = await isItemType(val[0]['code'], labelType.value) if(val.length==0){
if(!isType){ return
message.warning('当前物料可制造与其他数据不一致,请重新选择!') }
} else { const enableBuy = val[0]['enableBuy']
row['itemCode'] = val[0]['code'] let newVal = val.filter(item=>item.enableBuy==enableBuy)
row['uom'] = val[0]['uom'] if(newVal.length<val.length){
// \ message.warning('不能同时选择可制造和可采购的物料')
row['validityDays'] = val[0]['validityDays']
// StdcostpriceApi.queryStdcostpriceByItemCode({"itemCode":val[0]['code']})
// .then(res => {
// row['singlePrice'] = res.price
// })
} }
newVal.forEach(item=>{
let tfk = JSON.parse(JSON.stringify(tableFormKeys))
tfk.batch = formatTime(new Date(), 'yyyyMMdd')
//
tfk['produceDate'] = dayjs().valueOf()
tfk['arriveDate'] = dayjs().valueOf()
tfk['itemCode'] = item['code']
tfk['uom'] = item['uom']
tfk['validityDays'] = item['validityDays']
tableData.value.push(tfk)
})
} else if(formField === 'costcentreCode'){ } else if(formField === 'costcentreCode'){
row['costcentreCode'] = val[0]['costcentreCode'] row['costcentreCode'] = val[0]['costcentreCode']
} else if(formField === 'qadProjectCode'){ } else if(formField === 'qadProjectCode'){

1
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts

@ -615,6 +615,7 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
width: 150 width: 150
}, },
tableForm:{ tableForm:{
multiple:true,//多选
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',// 输入框占位文本 searchListPlaceholder: '请选择物料代码',// 输入框占位文本
searchField: 'code',// 查询弹窗赋值字段 searchField: 'code',// 查询弹窗赋值字段

Loading…
Cancel
Save