Browse Source

修改制品数据为小数的问题

master
zhaoxuebing 10 months ago
parent
commit
747aad332b
  1. 30
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue
  2. 4
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts
  3. 30
      src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue
  4. 4
      src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts
  5. 30
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
  6. 4
      src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts

30
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue

@ -71,6 +71,7 @@
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:buttondataTable="buttondataTable" :buttondataTable="buttondataTable"
@tableFormButton="tableFormButton" @tableFormButton="tableFormButton"
:detailValidate="detailValidate"
/> />
<!-- bom列表 --> <!-- bom列表 -->
@ -494,6 +495,22 @@ const submitForm = async (formType, data) => {
} }
try { try {
if (formType === 'create') { 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 ProductdismantleRequestMainApi.createProductdismantleRequestMain(data) await ProductdismantleRequestMainApi.createProductdismantleRequestMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {
@ -508,6 +525,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 searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {

4
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts

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

30
src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue

@ -71,6 +71,7 @@
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:buttondataTable="buttondataTable" :buttondataTable="buttondataTable"
@tableFormButton="tableFormButton" @tableFormButton="tableFormButton"
:detailValidate="detailValidate"
/> />
<!-- bom列表 --> <!-- bom列表 -->
@ -531,6 +532,22 @@ const submitForm = async (formType, data) => {
} }
try { try {
if (formType === 'create') { 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 ProductrepairRequestMainApi.createProductrepairRequestMain(data) await ProductrepairRequestMainApi.createProductrepairRequestMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {
@ -545,6 +562,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 = () => {

4
src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts

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

30
src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

@ -72,6 +72,7 @@
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:buttondataTable="buttondataTable" :buttondataTable="buttondataTable"
@tableFormButton="tableFormButton" @tableFormButton="tableFormButton"
:detailValidate="detailValidate"
/> />
<!-- bom列表 --> <!-- bom列表 -->
@ -532,6 +533,22 @@ const submitForm = async (formType, data) => {
} }
try { try {
if (formType === 'create') { 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 ProductscrapRequestMainApi.createProductscrapRequestMain(data) await ProductscrapRequestMainApi.createProductscrapRequestMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {
@ -546,6 +563,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 = () => {

4
src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts

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

Loading…
Cancel
Save