陈薪名 10 months ago
parent
commit
3eabc649dc
  1. 2
      src/components/Detail/src/Detail.vue
  2. 37
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  3. 16
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

2
src/components/Detail/src/Detail.vue

@ -563,7 +563,7 @@ const openForm = async (type: string, row?: number) => {
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
try { try {
// detailValidate // detailValidate
const rs = (await props.detailValidate) ? props.detailValidate(data) : true const rs = (await props.detailValidate) ? await props.detailValidate(data) : true
if (!rs) return if (!rs) return
if (formType === 'create') { if (formType === 'create') {
await props.apiCreate(data) await props.apiCreate(data)

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

@ -35,12 +35,17 @@
@searchTableSuccess="searchTableSuccess" @submitForm="submitForm" /> @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" />
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="false" :allSchemas="PurchasePlanMain.allSchemas" <Detail
:detailAllSchemas="PurchasePlanDetail.allSchemas" :detailAllSchemasRules="PurchasePlanDetailRules" ref="detailRef"
:isBasic="false"
:allSchemas="PurchasePlanMain.allSchemas"
:detailAllSchemas="PurchasePlanDetail.allSchemas"
:detailAllSchemasRules="PurchasePlanDetailRules"
:apiCreate="PurchasePlanDetailApi.createPurchasePlanDetail" :apiCreate="PurchasePlanDetailApi.createPurchasePlanDetail"
:apiUpdate="PurchasePlanDetailApi.updatePurchasePlanDetail" :apiUpdate="PurchasePlanDetailApi.updatePurchasePlanDetail"
:apiPage="PurchasePlanDetailApi.getPurchasePlanDetailPage" :apiPage="PurchasePlanDetailApi.getPurchasePlanDetailPage"
:apiDelete="PurchasePlanDetailApi.deletePurchasePlanDetail" @searchTableSuccessDetail="searchTableSuccessDetail" :apiDelete="PurchasePlanDetailApi.deletePurchasePlanDetail"
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailValidate="detailValidate" /> :detailValidate="detailValidate" />
<!-- 导入 --> <!-- 导入 -->
@ -55,6 +60,7 @@
import * as PurchasePlanDetailApi from '@/api/wms/purchasePlanDetail' import * as PurchasePlanDetailApi from '@/api/wms/purchasePlanDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' import * as PurchaseDetailApi from '@/api/wms/purchaseDetail'
import {mainListPurchasePlanModBtn} from "@/utils/disposition/defaultButtons";
// //
defineOptions({ name: 'PurchasePlanMain' }) defineOptions({ name: 'PurchasePlanMain' })
@ -191,6 +197,7 @@
defaultButtons.mainListPurchasePlanAccBtn({ hide: isShowMainButton(row, ['3']) }), // defaultButtons.mainListPurchasePlanAccBtn({ hide: isShowMainButton(row, ['3']) }), //
defaultButtons.mainListPurchasePlanRejBtn({ hide: isShowMainButton(row, ['3']) }), // defaultButtons.mainListPurchasePlanRejBtn({ hide: isShowMainButton(row, ['3']) }), //
defaultButtons.mainListPurchasePlanWitBtn({ hide: isShowMainButton(row, ['3']) }), // defaultButtons.mainListPurchasePlanWitBtn({ hide: isShowMainButton(row, ['3']) }), //
defaultButtons.mainListPurchasePlanModBtn({ hide: isShowMainButton(row, ['5']) }), //
// defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchase-plan-main:update' }), // // defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchase-plan-main:update' }), //
// defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchase-plan-main:delete'}), // // defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchase-plan-main:delete'}), //
] ]
@ -210,7 +217,9 @@
handleRej(row.id) handleRej(row.id)
} else if (val == 'mainPurPlanWit') { // } else if (val == 'mainPurPlanWit') { //
handleWit(row.id) handleWit(row.id)
} else if (val == 'edit') { // } else if(val == 'mainPurPlanMod'){ //
handleReOpen(row.id)
}else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
@ -269,6 +278,20 @@
} catch { } } catch { }
} }
/** 打开按钮操作 */
const handleReOpen = async (id : number) => {
try {
//
await message.confirm('是否重新打开所选中数据?')
//
await PurchasePlanMainApi.openPurchasePlanMain(id)
message.success(t('打开成功!'))
//
await getList()
} catch { }
}
/** 发布按钮操作 */ /** 发布按钮操作 */
const handlePublish = async (id : number) => { const handlePublish = async (id : number) => {
try { try {
@ -391,9 +414,9 @@
} }
// / // /
const detailValidate = (data) => { const detailValidate = async (data) => {
let tag = false let tag = false
PurchaseDetailApi.getPurchaseDetailPage({ await PurchaseDetailApi.getPurchaseDetailPage({
number: data.poNumber, number: data.poNumber,
lineNumber: data.poLine lineNumber: data.poLine
}).then(res => { }).then(res => {
@ -403,6 +426,8 @@
} else { } else {
tag = true tag = true
} }
}).catch(err =>{
console.log(err);
}) })
return tag return tag
} }

16
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -334,8 +334,20 @@ const openForm = async (type: string, row?: number) => {
} }
}) })
}else { }else {
item.componentProps.isSearchList = true SupplierdeliverRequestMain.allSchemas.formSchema.forEach((item) => {
item.componentProps.disabled = true if(item.field == 'supplierCode'){
item.componentProps.isSearchList = true
}
if(item.field == 'ppNumber'){
item.componentProps.isSearchList = true
}
if(item.field == 'asnNumber'){
item.componentProps.disabled = false
}
if(item.field == 'planArriveTime'){
item.componentProps.disabled = false
}
})
} }
tableData.value = [] // tableData.value = [] //
formRef.value.open(type, row) formRef.value.open(type, row)

Loading…
Cancel
Save