Browse Source

采购退货申请

master_hella_20240701
yufei0306 7 months ago
parent
commit
5aea3d50ea
  1. 18
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  2. 80
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

18
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue

@ -63,6 +63,7 @@
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@onEnter="onEnter"
/>
<!-- 添加明细采购收货记录单号 -->
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" />
@ -128,6 +129,14 @@ const isShowButton = ref(true)
const updataTableColumns = (val) => {
tableColumns.value = val
}
const onEnter = async (field,value)=>{
console.log(field,value)
if('supplierCode'==field){
//
}else if('purchaseReceiptRecordNumber' == field){
//
}
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
@ -195,7 +204,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
// getBomDisassemble
// PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailList({
PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailListToRepeat({
masterId: val[0]['id']
masterId: val[0]['masterId']
}).then((res) => {
if (res) tableData.value = res
tableData.value.forEach((item) => {
@ -225,6 +234,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
if (item.field == 'qty') {
item.tableForm.disabled = false
}
if (item.field == 'returnedQty') {
item.tableForm.disabled = false
}
if (item.field == 'reason') {
item.tableForm.disabled = false
}
@ -702,6 +714,10 @@ const handleDeleteTable = (item, index, formRef) => {
//
const submitForm = async (formType, data) => {
if(tableData.value.find(item=>Number(item.returnedQty)>Number(item.receiptQty))){
message.warning("退货数量不能大于收获数量")
return;
}
data.subList = tableData.value //
try {
if (formType === 'create') {

80
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

@ -45,6 +45,26 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false,
isSearch: true,
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
isForm:false,
sort: 'custom',
table: {
width: 150
},
sortTableDefault:1,
form: {
value: '1',
componentProps: {
disabled: true
}
}
},
{
label: '供应商代码',
field: 'supplierCode',
@ -56,6 +76,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
form:{
componentProps:{
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -79,8 +100,10 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: '请选择采购收货记录单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: '采购收货记录', // 查询弹窗标题
isConcatDetailSchemas:true,
searchDetailSchemas: PurchasereceiptRecordDetail.allSchemas,
searchAllSchemas: PurchasereceiptRecordMain.allSchemas, // 查询弹窗所需类
searchPage: PurchasereceiptRecordMainApi.getPurchasereceiptRecordMainPage, // 查询弹窗所需分页方法
searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
@ -307,27 +330,9 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isTable: false,
isForm:false,
sort: 'custom',
table: {
width: 150
},
form: {
value: '1',
componentProps: {
disabled: true
}
}
},
{
label: '备注',
label: '原因',
field: 'remark',
sort: 'custom',
table: {
@ -762,6 +767,29 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
precision: 6
}
},
{
label: '退货数量',
field: 'returnedQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
disabled:false
}
},
isForm:false,
tableForm:{
type:'InputNumber',
min:0,
precision: 6,
disabled:false
}
},
{
label: '数量',
field: 'qty',
@ -776,6 +804,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
precision: 6
}
},
isForm:false,
tableForm:{
type:'InputNumber',
min:0,
@ -1109,6 +1138,15 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isTableForm:false,
isForm:false
},
{
label: '原因',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '操作',
hiddenInMain:true,

Loading…
Cancel
Save