Browse Source

数据不为零修改

master
fangdawei 10 months ago
parent
commit
eee8116587
  1. 31
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  2. 4
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
  3. 31
      src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue
  4. 4
      src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts
  5. 31
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue
  6. 4
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts
  7. 31
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

31
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue

@ -69,6 +69,7 @@
:apiDelete="ScrapRequestDetailApi.deleteScrapRequestDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailValidate="detailValidate"
/>
<!-- 导入 -->
@ -348,6 +349,23 @@ const submitForm = async (formType, data) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
console.log("【报废出库子列表】",data.subList)
if(data.subList.length == 0){
message.warning("请添加子列表数据")
return;
}
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 ScrapRequestMainApi.createScrapRequestMain(data)
message.success(t('common.createSuccess'))
} else {
@ -362,6 +380,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 handleImport = () => {

4
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts

@ -514,13 +514,13 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'InputNumber',
componentProps: {
min: 1,
min: 0,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
min: 0,
precision: 6
}
},

31
src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue

@ -69,6 +69,7 @@
:apiDelete="TransferissueRequestDetailApi.deleteTransferissueRequestDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailValidate="detailValidate"
/>
<!-- 导入 -->
@ -361,7 +362,24 @@ const handleDeleteTable = (item, index) => {
const submitForm = async (formType, data) => {
data.subList = tableData.value //
try {
console.log("【调拨出库子列表】",data.subList)
if (formType === 'create') {
if(data.subList.length == 0){
message.warning("请添加子列表数据")
return;
}
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 TransferissueRequestMainApi.createTransferissueRequestMain(data)
message.success(t('common.createSuccess'))
} else {
@ -376,6 +394,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 handleImport = () => {

4
src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts

@ -634,13 +634,13 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
form: {
component: 'InputNumber',
componentProps: {
min: 1,
min: 0,
precision: 6,
}
},
tableForm: {
type: 'InputNumber',
min: 1,
min: 0,
precision: 6,
},
},

31
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue

@ -69,6 +69,7 @@
:apiDelete="UnplannedissueRequestDetailApi.deleteUnplannedissueRequestDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailValidate="detailValidate"
/>
<!-- 导入 -->
@ -356,6 +357,23 @@ const submitForm = async (formType, data) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
console.log("【计划外出库子列表】",data.subList)
if(data.subList.length == 0){
message.warning("请添加子列表数据")
return;
}
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 UnplannedissueRequestMainApi.createUnplannedissueRequestMain(data)
message.success(t('common.createSuccess'))
} else {
@ -370,6 +388,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 handleImport = () => {

4
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts

@ -451,13 +451,13 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
form: {
component: 'InputNumber',
componentProps: {
min: 1,
min: 0,
precision: 6,
}
},
tableForm: {
type: 'InputNumber',
min: 1,
min: 0,
precision: 6,
}
},

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

@ -69,6 +69,7 @@
:apiDelete="UnplannedreceiptRequestDetailApi.deleteUnplannedreceiptRequestDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailValidate="detailValidate"
/>
<!-- 创建标签 -->
@ -479,6 +480,23 @@ const submitForm = async (formType, data) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
console.log("【计划外入库子列表】",data.subList)
if(data.subList.length == 0){
message.warning("请添加子列表数据")
return;
}
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 UnplannedreceiptRequestMainApi.createUnplannedreceiptRequestMain(data)
message.success(t('common.createSuccess'))
} else {
@ -493,6 +511,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 handleImport = () => {

Loading…
Cancel
Save