Browse Source

发货申请的新增

master_hella_20240701
yufei0306 7 months ago
parent
commit
77fc48e36b
  1. 4
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts
  2. 109
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue

4
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts

@ -81,7 +81,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
disabled: true,
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -148,6 +148,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择发货计划单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
@ -691,6 +692,7 @@ export const DeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
tableForm:{
multiple:true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',

109
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue

@ -43,6 +43,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList"
:rules="DeliverRequestMainRules"
:formAllSchemas="DeliverRequestMain.allSchemas"
@ -119,9 +121,18 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => {
if (type == 'tableForm') {
if(formField == 'itemCode') {
row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['customerUom']
}else {
const tableFormKeys = {}
DeliverRequestDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
console.log('tableData.value',tableData.value)
val.forEach(item=>{
if(tableData.value.find(item1=>item1['id'] == item['id'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['uom'] = item['customerUom']
tableData.value.push(newRow)
})
}else{
row[formField] = val[0][searchField]
}
} else {
@ -129,54 +140,54 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
setV[formField] = val[0][searchField]
if(formField == 'deliverPlanNumber') {
setV['deliverPlanNumber'] = val[0]['number']
if(setV['deliverPlanNumber'] != null){
isShowButton.value = false
}
// if(setV['deliverPlanNumber'] != null){
// isShowButton.value = false
// }
setV['customerCode'] = val[0]['customerCode']
// getBomDisassemble
DeliverPlanDetailApi.selectDetailByMasterID(val[0]['id'])
.then(res => {
res.forEach(item => {
item.qty = item.planQty
})
if (res) tableData.value = res
// tableform
DeliverRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'itemCode') {
item.isInpuFocusShow = false
item.tableForm.isInpuFocusShow = false
item.tableForm.disabled = true
}
if(item.field == 'uom') {
item.tableForm.disabled = true
}
})
// tableform
if(formField == 'customerCode'){
console.log(1111,val);
customerCode.value = val[0]['code']
console.log(11112,customerCode.value);
}
DeliverRequestMain.allSchemas.tableFormColumns.map(item => {
if(item.field == 'customerDockCode') {
item.tableForm.searchCondition = [
{
key: 'customerCode',
value: customerCode.value ,
isMainValue: true
}]
item.form.componentProps.searchCondition = [
{
key: 'customerCode',
value: customerCode.value ,
isMainValue: true
}]}
else {
delete item.tableForm.searchCondition
delete item.form.componentProps.searchCondition
}
})
})
// DeliverPlanDetailApi.selectDetailByMasterID(val[0]['id'])
// .then(res => {
// res.forEach(item => {
// item.qty = item.planQty
// })
// if (res) tableData.value = res
// // tableform
// DeliverRequestDetail.allSchemas.tableFormColumns.map(item => {
// if(item.field == 'itemCode') {
// item.isInpuFocusShow = false
// item.tableForm.isInpuFocusShow = false
// item.tableForm.disabled = true
// }
// if(item.field == 'uom') {
// item.tableForm.disabled = true
// }
// })
// // tableform
// if(formField == 'customerCode'){
// console.log(1111,val);
// customerCode.value = val[0]['code']
// console.log(11112,customerCode.value);
// }
// DeliverRequestMain.allSchemas.tableFormColumns.map(item => {
// if(item.field == 'customerDockCode') {
// item.tableForm.searchCondition = [
// {
// key: 'customerCode',
// value: customerCode.value ,
// isMainValue: true
// }]
// item.form.componentProps.searchCondition = [
// {
// key: 'customerCode',
// value: customerCode.value ,
// isMainValue: true
// }]}
// else {
// delete item.tableForm.searchCondition
// delete item.form.componentProps.searchCondition
// }
// })
// })
if(formField == 'itemCode'){
console.log( val[0]);
row['uom'] = val[0]['customerUom']

Loading…
Cancel
Save