Browse Source

增加数量校验

master
zhaoxuebing 10 months ago
parent
commit
1a1e123bee
  1. 15
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  2. 3
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts

15
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -70,6 +70,7 @@
@searchTableSuccessDetail="searchTableSuccessDetail"
:buttondataTable="buttondataTable"
@tableFormButton="tableFormButton"
:detailValidate="detailValidate"
/>
<!-- 创建标签 -->
@ -124,6 +125,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItembasicApi from '@/api/wms/itembasic'
import * as PackageApi from '@/api/wms/package'
import { formatTime } from '@/utils/index'
import * as PurchaseDetailApi from "@/api/wms/purchaseDetail";
//
defineOptions({ name: 'ProductreceiptRequestMain' })
@ -554,6 +556,19 @@ const tableFormButton = async (val , row) => {
}
}
// /
const detailValidate = (data) => {
let tag = false;
if(data.qty <= 0){
message.warning('数量必须大于0')
tag = false;
return tag;
}else {
tag = true;
return tag;
}
}
/** 初始化 **/
onMounted(async () => {
getList()

3
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts

@ -1022,9 +1022,6 @@ export const ProductreceiptRequestDetailRules = reactive({
workStationCode: [
{ required: true, message: '请选择工位代码', trigger: 'change' }
],
qty:[
{ min: 0.000001, message: '数量不能为0', trigger: 'blur' }
],
uom: [
{ required: true, message: '请选择计量单位', trigger: 'change' }
],

Loading…
Cancel
Save