Browse Source

要货计划子表编辑,计划数量:是否可用true可编辑,false不可编辑,大于0

hella_online_20240919
yufei_wang 2 months ago
parent
commit
7accf6baf5
  1. 1
      src/locales/en-US.ts
  2. 1
      src/locales/zh-CN.ts
  3. 24
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

1
src/locales/en-US.ts

@ -691,6 +691,7 @@ export default {
:'Forecast Date', :'Forecast Date',
:'Order Line', :'Order Line',
:'Planned Quantity', :'Planned Quantity',
0:'The number of plans must be greater than 0',
:'Last update time', :'Last update time',
:'Last Updater', :'Last Updater',
:'Demand plan', :'Demand plan',

1
src/locales/zh-CN.ts

@ -693,6 +693,7 @@ export default {
:'预测日期', :'预测日期',
:'订单行', :'订单行',
:'计划数量', :'计划数量',
0:'计划数量必须大于0',
:'最后更新时间', :'最后更新时间',
:'最后更新者', :'最后更新者',
:'要货计划', :'要货计划',

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

@ -83,7 +83,6 @@
:detailAllSchemas="PurchasePlanDetail.allSchemas" :detailAllSchemas="PurchasePlanDetail.allSchemas"
:detailAllSchemasRules="PurchasePlanDetailRules" :detailAllSchemasRules="PurchasePlanDetailRules"
:apiCreate="PurchasePlanDetailApi.createPurchasePlanDetail" :apiCreate="PurchasePlanDetailApi.createPurchasePlanDetail"
:apiUpdate="PurchasePlanDetailApi.updatePurchasePlanDetail"
:apiPage="PurchasePlanDetailApi.getPurchasePlanDetailPage" :apiPage="PurchasePlanDetailApi.getPurchasePlanDetailPage"
:apiDelete="PurchasePlanDetailApi.deletePurchasePlanDetail" :apiDelete="PurchasePlanDetailApi.deletePurchasePlanDetail"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
@ -98,6 +97,8 @@
:isOpenSearchTable="true" :isOpenSearchTable="true"
:mainSubmitCreateApi="true" :mainSubmitCreateApi="true"
fieldTableColumn="poLine" fieldTableColumn="poLine"
@detailOpenForm="detailOpenForm"
@handleSubmitForm="handleSubmitForm"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -517,7 +518,26 @@ const getSearchTableData = async (number,formField,searchField)=>{
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
} }
const detailOpenForm = (type, row) => {
PurchasePlanDetail.allSchemas.formSchema.forEach(item=>{
if(item.field == 'planQty'){
//
item.componentProps.disabled = row.available=="FALSE"
}
})
}
const handleSubmitForm = async (formType, data)=>{
if(formType == 'update'){
if(Number(data.planQty)<=0){
message.error(t('ts.计划数量必须大于0'))
return
}
await PurchasePlanDetailApi.updatePurchasePlanDetail(data)
message.success(t('common.updateSuccess'))
}
}
/** 删除按钮操作 */ /** 删除按钮操作 */
const handleDelete = async (id : number) => { const handleDelete = async (id : number) => {
try { try {

Loading…
Cancel
Save