Browse Source

修改采购退货数据

master
zhaoxuebing 8 months ago
parent
commit
e3340a8983
  1. 26
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  2. 23
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

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

@ -77,6 +77,7 @@
:apiDelete="PurchasereturnRequestDetailApi.deletePurchasereturnRequestDetail" :apiDelete="PurchasereturnRequestDetailApi.deletePurchasereturnRequestDetail"
:Echo="Echo" :Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:detailValidate="detailValidate"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -584,6 +585,18 @@ const submitForm = async (formType, data) => {
} }
try { try {
if (formType === 'create') { if (formType === 'create') {
let flag = false;
data.subList.forEach((item) => {
if(item.qty == 0){
message.warning("数量不能为0")
flag = true;
return;
}
})
if(flag){
formRef.value.formLoading = false
return
}
await PurchasereturnRequestMainApi.createPurchasereturnRequestMain(data) await PurchasereturnRequestMainApi.createPurchasereturnRequestMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {
@ -598,6 +611,19 @@ const submitForm = async (formType, data) => {
} }
} }
// /
const detailValidate = (data) => {
let tag = false;
if(data.qty <= 0){
message.warning('数量必须大于0')
tag = false;
return tag;
}else {
tag = true;
return tag;
}
}
/** 导入 */ /** 导入 */
const importFormRef = ref() const importFormRef = ref()
const handleImport = () => { const handleImport = () => {

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

@ -508,10 +508,6 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
value: 'purchaseReceiptRecordNumber', value: 'purchaseReceiptRecordNumber',
message: '请填写采购收货记录号!', message: '请填写采购收货记录号!',
isMainValue: true isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}] }]
}, },
form: { form: {
@ -528,10 +524,6 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
value: 'purchaseReceiptRecordNumber', value: 'purchaseReceiptRecordNumber',
message: '请填写采购收货记录号!', message: '请填写采购收货记录号!',
isMainValue: true isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}] }]
} }
}, },
@ -556,10 +548,6 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
value: 'supplierCode', value: 'supplierCode',
message: '请填写采购收货记录号!', message: '请填写采购收货记录号!',
isMainValue: true isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}] }]
}, },
form: { form: {
@ -576,10 +564,6 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
value: 'supplierCode', value: 'supplierCode',
message: '请填写采购收货记录号!', message: '请填写采购收货记录号!',
isMainValue: true isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}] }]
} }
} }
@ -716,14 +700,15 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}, },
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps:{ componentProps: {
disabled:true min: 0,
precision: 6
} }
}, },
tableForm:{ tableForm:{
disabled:true,
type:'InputNumber', type:'InputNumber',
min:0, min:0,
precision: 6
} }
}, },
{ {

Loading…
Cancel
Save