Browse Source

要货计划--创建供应商申请功能

master_hella_20240701
yufei0306 7 months ago
parent
commit
bb83e4002b
  1. 23
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  2. 84
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

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

@ -64,6 +64,8 @@
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/purchase-plan-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
<!-- 创建供应商发货申请 -->
<supplierdeliverBasicForm ref="supplierdeliverFormRef" @getList="getList" ></supplierdeliverBasicForm>
</template>
<script setup lang="ts">
@ -76,6 +78,7 @@
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { PurchaseDetail } from '../purchaseMain/purchaseMain.data'
import dayjs from 'dayjs'
import supplierdeliverBasicForm from '../supplierdeliverRequestMain/supplierdeliverBasicForm.vue'
//
defineOptions({ name: 'PurchasePlanMain' })
@ -230,6 +233,7 @@ const getSearchTableData = async (number,formField,searchField)=>{
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
@ -287,8 +291,19 @@ const getSearchTableData = async (number,formField,searchField)=>{
defaultButtons.mainListPurchasePlanModBtn({ hide: isShowMainButton(row, ['5']) }), //
// defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchase-plan-main:update' }), //
// defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchase-plan-main:delete'}), //
{
label: '创建供应商发货申请',
name: 'supplierdeliver',
hide: false,
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true //
}
]
}
const supplierdeliverFormRef = ref()
// -
const buttonTableClick = async (val, row) => {
@ -310,9 +325,15 @@ const getSearchTableData = async (number,formField,searchField)=>{
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.masterId)
} else if (val == 'supplierdeliver') { //
supplierdeliverFormRef.value.openFormByCreate({
number:row.number, //
supplierCode:row.supplierCode, //
endTime:row.endTime, //
deliveryDate:row.deliveryDate //
})
}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type : string, row ?: number) => {

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

@ -44,7 +44,8 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
<supplierdeliverBasicForm ref="supplierdeliverFormRef" @getList="getList" ></supplierdeliverBasicForm>
<!-- <BasicForm
ref="formRef"
:isOpenSearchTable="true"
:indexTableColumn="0"
@ -63,15 +64,15 @@
@submitForm="submitForm"
@formFormDateChange="formFormDateChange"
@onEnter="onEnter"
>
<template v-slot="{row}">
> -->
<!-- <template v-slot="{row}">
<el-date-picker v-bind:modelValue="row['expireTime']?addDay(row['produceDate'],row['expireTime']).format('YYYY-MM-DD'):'2099-12-31'"
:clearable="true"
style="width: 100%"
:disabled="true"
placeholder="选择日期"/>
</template>
</BasicForm>
</BasicForm> -->
<!-- 详情 -->
<Detail
@ -179,7 +180,7 @@ import { PurchasePlanDetail } from '../purchasePlanMain/purchasePlanMain.data'
import { addDay } from '@/utils/formatTime'
import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import supplierdeliverBasicForm from './supplierdeliverBasicForm.vue'
//
defineOptions({ name: 'SupplierdeliverRequestMain' })
@ -528,42 +529,45 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
}
///
const formRef = ref()
const supplierdeliverFormRef = ref()
const openForm = async (type: string, row?: number) => {
if(type == "update"){
SupplierdeliverRequestMain.allSchemas.formSchema.forEach((item) => {
if(item.field == 'supplierCode'){
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
if(item.field == 'ppNumber'){
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
if(item.field == 'asnNumber'){
item.componentProps.disabled = true
}
if(item.field == 'planArriveTime'){
item.componentProps.disabled = true
}
})
}else {
SupplierdeliverRequestMain.allSchemas.formSchema.forEach((item) => {
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 = [] //
formRef.value.open(type, row)
supplierdeliverFormRef.value.openForm(type, row)
// if(type == "update"){
// SupplierdeliverRequestMain.allSchemas.formSchema.forEach((item) => {
// if(item.field == 'supplierCode'){
// item.componentProps.isSearchList = false
// item.componentProps.disabled = true
// }
// if(item.field == 'ppNumber'){
// item.componentProps.isSearchList = false
// item.componentProps.disabled = true
// }
// if(item.field == 'asnNumber'){
// item.componentProps.disabled = true
// }
// if(item.field == 'planArriveTime'){
// item.componentProps.disabled = true
// }
// })
// }else {
// SupplierdeliverRequestMain.allSchemas.formSchema.forEach((item) => {
// 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 = [] //
// formRef.value.open(type, row)
}
/** 删除按钮操作 */

Loading…
Cancel
Save