陈薪名 10 months ago
parent
commit
0fd0f68c7a
  1. 11
      src/api/wms/customerdock/index.ts
  2. 5
      src/api/wms/purchaseDetail/index.ts
  3. 12
      src/api/wms/purchasereceiptRecordDetail/index.ts
  4. 10
      src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts
  5. 6
      src/views/wms/basicDataManage/customerManage/customeritem/index.vue
  6. 2
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts
  7. 40
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
  8. 33
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  9. 20
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue
  10. 65
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  11. 60
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts
  12. 82
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue
  13. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts
  14. 10
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

11
src/api/wms/customerdock/index.ts

@ -62,3 +62,14 @@ export const exportCustomerdock = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/customerdock/get-import-template' })
}
// 查询客户月台列表
export const pageCustomerCodeToCustomerDock = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/customerdock/pageCustomerCodeToCustomerDockSenior', data })
} else {
return await request.get({ url: `/wms/customerdock/pageCustomerCodeToCustomerDock`, params })
}
}

5
src/api/wms/purchaseDetail/index.ts

@ -43,6 +43,11 @@ export const getPurchaseDetailPage = async (params) => {
}
}
// 校验子表数据
export const getPurchaseDetailPageCheckData = async (params) => {
return await request.get({ url: `/wms/purchase-detail/pageCheckData`, params })
}
// 查询采购订单子列表
export const getPurchaseDetailPagePoNumber = async (params) => {
if (params.isSearch) {

12
src/api/wms/purchasereceiptRecordDetail/index.ts

@ -58,6 +58,18 @@ export const getPurchasereceiptRecordDetailPage = async (params) => {
return await request.get({ url: `/wms/purchasereceipt-record-detail/page`, params })
}
}
// 查询采购收货记录子列表
export const getPurchasereceiptRecordDetailPageBySupplierCode = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchasereceipt-record-detail/seniorBySupplierCode', data })
} else {
return await request.get({ url: `/wms/purchasereceipt-record-detail/pageBySupplierCode`, params })
}
}
// 查询采购收货记录子列表
export const getPurchasereceiptRecordDetailList = async (params) => {
return await request.get({ url: `/wms/purchasereceipt-record-detail/list`, params })

10
src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts

@ -77,7 +77,7 @@ export const Customeritem = useCrudSchemas(reactive<CrudSchema[]>([
},
{
label: '客户计量单位',
field: 'cusotmerUom',
field: 'customerUom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
@ -85,6 +85,11 @@ export const Customeritem = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
form: {
componentProps:{
disabled: true
}
}
},
{
label: '转换率',
@ -183,7 +188,8 @@ export const Customeritem = useCrudSchemas(reactive<CrudSchema[]>([
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
activeValue: 'TRUE',
disabled: true
}
},
isSearch: true

6
src/views/wms/basicDataManage/customerManage/customeritem/index.vue

@ -139,6 +139,8 @@ const butttondata = [
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
// const res = await CustomeritemApi.getItempackaging(row.id)
console.log(1111,row);
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
@ -179,6 +181,10 @@ const formsSuccess = async (formType,data) => {
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
if(formField == 'itemCode'){
console.log(val);
setV['cusotmerUom'] = val[0]['uom']
}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})

2
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts

@ -146,7 +146,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '客户月台信息', // 查询弹窗标题
searchAllSchemas: Customerdock.allSchemas, // 查询弹窗所需类
searchPage: CustomerdockApi.getCustomerdockPage, // 查询弹窗所需分页方法
searchPage: CustomerdockApi.pageCustomerCodeToCustomerDock, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',

40
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue

@ -100,6 +100,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const customerCode = ref()
const tableColumns = ref(DeliverRequestMain.allSchemas.tableColumns)
const isShowButton = ref(true)
@ -143,6 +144,31 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if(item.field == 'uom') {
item.tableForm.disabled = true
}
})
// tableform
if(formField == 'customerCode'){
console.log(1111,val);
customerCode.value = val[0]['code']
console.log(11112,customerCode.value);
}
DeliverRequestMain.allSchemas.tableFormColumns.map(item => {
if(item.field == 'customerDockCode') {
item.tableForm.searchCondition = [
{
key: 'customerCode',
value: customerCode.value ,
isMainValue: true
}]
item.form.componentProps.searchCondition = [
{
key: 'customerCode',
value: customerCode.value ,
isMainValue: true
}]}
else {
delete item.tableForm.searchCondition
delete item.form.componentProps.searchCondition
}
})
}).catch(err => {
console.log(err)
@ -330,12 +356,26 @@ const openForm =async (type: string, row?: number) => {
item.componentProps.isSearchList = false,
item.componentProps.disabled = true
}
if (item.field == 'customerCode') {
item.componentProps.isSearchList = false,
item.componentProps.disabled = true
}
if (item.field == 'customerDockCode') {
item.componentProps.isSearchList = false,
item.componentProps.disabled = true
}
})
}else {
DeliverRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'deliverPlanNumber') {
item.componentProps.isSearchList = true
}
if (item.field == 'customerCode') {
item.componentProps.isSearchList = true
}
if (item.field == 'customerDockCode') {
item.componentProps.isSearchList = true
}
})
}
tableData.value = [] //

33
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts

@ -10,13 +10,6 @@ import { Customerdock } from '@/views/wms/basicDataManage/customerManage/custome
import * as CustomerItemApi from '@/api/wms/customeritem'
import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data'
import * as SaleMainApi from '@/api/wms/saleMain'
import * as SaleDetailApi from '@/api/wms/saleDetail'
import { SaleDetail, SaleMain } from '../saleMain/saleMain.data'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
const { t } = useI18n() // 国际化
/**
@ -328,11 +321,11 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchListPlaceholder: '请选择客户月台代码',
searchField: 'code',
searchTitle: '物料基础信息',
searchTitle: '客户月台基础信息',
searchAllSchemas: Customerdock.allSchemas,
searchPage: CustomerDockApi.getCustomerdockPage,
searchPage: CustomerDockApi.pageCustomerCodeToCustomerDock,
searchCondition: [{
key: 'available',
value: 'TRUE',
@ -343,7 +336,25 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
isMainValue: true
}]
},
isForm: false,
form: {
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择客户月台代码',
searchField: 'code',
searchTitle: '客户月台基础信息',
searchAllSchemas: Customerdock.allSchemas,
searchPage: CustomerDockApi.pageCustomerCodeToCustomerDock,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}]
}
},
},
{
label: '项目',

20
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue

@ -91,6 +91,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const customerCode = ref()
const tableColumns = ref(DeliverPlanMain.allSchemas.tableColumns)
//
@ -101,6 +102,25 @@ const updataTableColumns = (val) => {
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
// tableform
if(formField == 'customerCode'){
customerCode.value = val[0]['code']
}
DeliverPlanDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'customerDockCode') {
item.tableForm.searchCondition = [
{
key: 'customerCode',
value: customerCode.value ,
isMainValue: false
}]
item.form.componentProps.searchCondition = [
{
key: 'customerCode',
value: customerCode.value ,
isMainValue: false
}]}
})
if (type == 'tableForm') {
if(formField == 'itemCode') {
row['uom'] = val[0]['customerUom']

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

@ -77,6 +77,7 @@
:apiDelete="PurchasereturnRequestDetailApi.deletePurchasereturnRequestDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailValidate="detailValidate"
/>
<!-- 导入 -->
@ -167,6 +168,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
row['projectCode'] = val[0]['projectCode']
} else {
const setV = {}
if(formField == 'purchaseReceiptRecordNumber'){
isShowButton.value = false
setV[formField] = val[0][searchField]
setV['purchaseReceiptRecordNumber'] = val[0]['number']
setV['supplierCode'] = val[0]['supplierCode']
@ -176,8 +179,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
// getBomDisassemble
PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailList({
masterId: val[0]['id']
})
.then((res) => {
}).then((res) => {
if (res) tableData.value = res
tableData.value.forEach((item) => {
item.batch = item.toBatch
@ -191,7 +193,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
// item.fromLocationCode = item.fromLocationCode
// item.fromLocationGroupCode = item.fromLocationGroupCode
})
isShowButton.value = false
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') {
item.componentProps.disabled = true
@ -212,10 +214,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
item.tableForm.isInpuFocusShow = false
}
})
})
.catch((err) => {
}).catch((err) => {
console.log(err)
})
}
if(formField == 'supplierCode'){
isShowButton.value = true
setV['supplierCode'] = val[0]['code']
setV['purchaseReceiptRecordNumber'] = ''
tableData.value = []
}
formRef.setValues(setV)
}
})
@ -224,7 +232,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
if(formField == 'poLine'){
if(formField == 'poLine' || formField == 'itemCode'){
console.log(val)
setV['poLine'] = val[0]['poLine']
setV['poNumber'] = val[0]['poNumber']
@ -397,7 +405,8 @@ const openForm = async (type: string, row?: number) => {
if(type == 'create'){
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') {
item.componentProps.disabled = false
item.componentProps.disabled = true
item.componentProps.isSearchList = true
}
if(item.field == 'purchaseReceiptRecordNumber'){
item.componentProps.disabled = true
@ -408,7 +417,8 @@ const openForm = async (type: string, row?: number) => {
if(type == 'update'){
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') {
item.componentProps.disabled = false
item.componentProps.disabled = true
item.componentProps.isSearchList = false
}
if(item.field == 'purchaseReceiptRecordNumber'){
item.componentProps.disabled = true
@ -513,6 +523,7 @@ const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
let purchaseReceiptRecordNumber = formRef.value.formRef.formModel.purchaseReceiptRecordNumber
PurchasereturnRequestDetail.allSchemas.tableFormColumns.map((item) => {
item.tableForm.disabled = true
if (item.field == 'remark') {
@ -524,9 +535,21 @@ const handleAddTable = () => {
if (item.field == 'qty') {
item.tableForm.disabled = false
}
if(purchaseReceiptRecordNumber == ''){
if (item.field == 'itemCode') {
item.tableForm.isInpuFocusShow = true
}
if(item.field == 'poLine'){
item.tableForm.isInpuFocusShow = false
}
}else{
if (item.field == 'itemCode') {
item.tableForm.isInpuFocusShow = false
}
if(item.field == 'poLine'){
item.tableForm.isInpuFocusShow = true
}
}
})
}
//
@ -541,7 +564,6 @@ const handleDeleteTable = (item, index, formRef) => {
})
nextTick(() => {
const setV = {}
setV['purchaseReceiptRecordNumber'] = ''
setV['supplierCode'] = ''
formRef.setValues(setV)
@ -565,6 +587,18 @@ const submitForm = async (formType, data) => {
}
try {
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)
message.success(t('common.createSuccess'))
} else {
@ -579,6 +613,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 = () => {

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

@ -10,7 +10,8 @@ import {
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail'
import { Supplier } from "@/views/wms/basicDataManage/supplierManage/supplier/supplier.data";
import * as SupplierApi from "@/api/wms/supplier";
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -99,7 +100,12 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
form:{
componentProps:{
disabled:false
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPage // 查询弹窗所需分页方法
}
}
},
@ -491,7 +497,18 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150
},
tableForm:{
disabled:true
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择订单行',
searchField: 'poLine',
searchTitle: '采购收货记录信息',
searchAllSchemas: PurchasereceiptRecordDetail.allSchemas,
searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage,
searchCondition: [{
key: 'number',
value: 'purchaseReceiptRecordNumber',
message: '请填写采购收货记录号!',
isMainValue: true
}]
},
form: {
// labelMessage: '信息提示说明!!!',
@ -507,10 +524,6 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
value: 'purchaseReceiptRecordNumber',
message: '请填写采购收货记录号!',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
@ -523,11 +536,35 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150
},
tableForm:{
disabled:true
// labelMessage: '信息提示说明!!!',
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择订单行',
searchField: 'poLine',
searchTitle: '采购收货记录信息',
searchAllSchemas: PurchasereceiptRecordDetail.allSchemas,
searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageBySupplierCode,
searchCondition: [{
key: 'supplierCode',
value: 'supplierCode',
message: '请填写采购收货记录号!',
isMainValue: true
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
disabled:true
isSearchList: true,
searchListPlaceholder: '请选择订单行',
searchField: 'poLine',
searchTitle: '采购收货记录信息',
searchAllSchemas: PurchasereceiptRecordDetail.allSchemas,
searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageBySupplierCode,
searchCondition: [{
key: 'supplierCode',
value: 'supplierCode',
message: '请填写采购收货记录号!',
isMainValue: true
}]
}
}
},
@ -664,13 +701,14 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
form: {
component: 'InputNumber',
componentProps: {
disabled:true
min: 0,
precision: 6
}
},
tableForm:{
disabled:true,
type:'InputNumber',
min:0,
precision: 6
}
},
{

82
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue

@ -26,17 +26,33 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm ref="formRef" @success="getList" :rules="PurchaseMainRules" :formAllSchemas="PurchaseMain.allSchemas"
:tableAllSchemas="PurchaseDetail.allSchemas" :tableFormRules="PurchaseDetailRules" :tableData="tableData"
:apiUpdate="PurchaseMainApi.updatePurchaseMain" :apiCreate="PurchaseMainApi.createPurchaseMain" :isBusiness="true"
@handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" />
<BasicForm ref="formRef"
@success="getList"
:rules="PurchaseMainRules"
:formAllSchemas="PurchaseMain.allSchemas"
:tableAllSchemas="PurchaseDetail.allSchemas"
:tableFormRules="PurchaseDetailRules"
:tableData="tableData"
:apiUpdate="PurchaseMainApi.updatePurchaseMain"
:apiCreate="PurchaseMainApi.createPurchaseMain"
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@onChange="onChangeQty" />
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="false" :allSchemas="PurchaseMain.allSchemas"
:detailAllSchemas="PurchaseDetail.allSchemas" :detailAllSchemasRules="PurchaseDetailRules"
:apiCreate="PurchaseDetailApi.createPurchaseDetail" :apiUpdate="PurchaseDetailApi.updatePurchaseDetail"
:apiPage="PurchaseDetailApi.getPurchaseDetailPage" :apiDelete="PurchaseDetailApi.deletePurchaseDetail" :Echo="Echo"
<Detail ref="detailRef"
:isBasic="false"
:allSchemas="PurchaseMain.allSchemas"
:detailAllSchemas="PurchaseDetail.allSchemas"
:detailAllSchemasRules="PurchaseDetailRules"
:apiCreate="PurchaseDetailApi.createPurchaseDetail"
:apiUpdate="PurchaseDetailApi.updatePurchaseDetail"
:apiPage="PurchaseDetailApi.getPurchaseDetailPage"
:apiDelete="PurchaseDetailApi.deletePurchaseDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail" />
<!-- 导入 -->
@ -208,13 +224,44 @@
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type : string, row ?: number) => {
console.log("【purchaseMain】type类型:",type);
tableData.value = [] //
if(type == 'create'){
PurchaseMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') {
item.componentProps.isSearchList = true
item.componentProps.disabled = true
}
})
}
if(type == 'update'){
PurchaseMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') {
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
})
}
formRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => {
console.log("row",row.type);
if(row.type == 'DISCRETE'){
PurchaseDetail.allSchemas.formSchema.map((item) => {
if (item.field == 'orderQty') {
item.componentProps.disabled = false
}
})
}else{
PurchaseDetail.allSchemas.formSchema.map((item) => {
if (item.field == 'orderQty') {
item.componentProps.disabled = true
}
})
}
detailRef.value.openDetail(row, titleName, titleValue,'orderPurchaseMain')
}
@ -361,6 +408,23 @@
}
getList() //
}
const onChangeQty = (field, cur) => {
if(field == 'type' && cur == 'DISCRETE'){
PurchaseDetail.allSchemas.tableFormColumns.map((item) => {
if (item.field == 'orderQty') {
item.tableForm.disabled = false
}
})
}
if(field == 'type' && cur == 'SCHEDULE'){
PurchaseDetail.allSchemas.tableFormColumns.map((item) => {
if (item.field == 'orderQty') {
item.tableForm.disabled = true
}
})
}
}
/** 初始化 **/
onMounted(async () => {

2
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts

@ -459,11 +459,13 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'InputNumber',
componentProps: {
disabled:false,
min: 1,
precision: 6
}
},
tableForm: {
disabled:false,
type: 'InputNumber',
min: 1,
precision: 6

10
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

@ -388,15 +388,17 @@
const submitForm = async (formType, data) => {
data.subList = []
for (let item of tableData.value) {
await PurchaseDetailApi.getPurchaseDetailPage({
await PurchaseDetailApi.getPurchaseDetailPageCheckData({
number: item.poNumber,
lineNumber: item.poLine,
}).then(res => {
console.log("【要货计划】-每条数据结果",item)
if(res.list[0].type == 'DISCRETE'){//
if (item.planQty > res.list[0].orderQty - res.list[0].plannedQty) {
message.error('要货计划数量不得大于订单数量-已计划数量')
return
}
}
data.subList.push(item) //
})
}
@ -422,16 +424,20 @@
// /
const detailValidate = async (data) => {
let tag = false
await PurchaseDetailApi.getPurchaseDetailPage({
await PurchaseDetailApi.getPurchaseDetailPageCheckData({
number: data.poNumber,
lineNumber: data.poLine
}).then(res => {
if(res.list[0].type == 'DISCRETE'){//
if (data.planQty > res.list[0].orderQty - res.list[0].plannedQty) {
message.error('要货计划数量不得大于订单数量-已计划数量')
tag = false
} else {
tag = true
}
}else{
tag = true
}
}).catch(err =>{
console.log(err);
})

Loading…
Cancel
Save