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

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

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

Loading…
Cancel
Save