|
@ -1,99 +1,104 @@ |
|
|
<template> |
|
|
<template> |
|
|
<Dialog :title="dialogTitle" v-model="dialogVisible"> |
|
|
<Dialog :title="dialogTitle" v-model="dialogVisible" :width="isBusiness?'60%':'40%'"> |
|
|
<Form ref="formRef" v-loading="formLoading" :rules="rules" :schema="formSchema" :is-col="true" > |
|
|
<Form ref="formRef" v-loading="formLoading" :rules="rules" :schema="formSchema" :is-col="true" > |
|
|
<!-- <template #productItemCode="form"> |
|
|
<!-- <template #productItemCode="form"> |
|
|
<slot name="productItemCode" :param="form"></slot> |
|
|
<slot name="productItemCode" :param="form"></slot> |
|
|
</template> --> |
|
|
</template> --> |
|
|
<template #itemCode="form"> |
|
|
<template #itemCode="form" v-if="props.searchTableParams?.find((item:any) => (item.formField == 'itemCode'))"> |
|
|
<div class="w-[100%] flex"> |
|
|
<div class="w-[100%] flex"> |
|
|
<el-input v-model="form['itemCode']" :placeholder="'请选择物料代码'" @click="opensearchTable('itemCode', 'code')" /> |
|
|
<el-input v-model="form['itemCode']" :placeholder="'请选择物料代码'" @click="opensearchTable('itemCode', 'code')" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #productItemCode="form"> |
|
|
<template #productItemCode="form" v-if="props.searchTableParams?.find((item:any) => (item.formField == 'productItemCode'))"> |
|
|
<div class="w-[100%] flex"> |
|
|
<div class="w-[100%] flex"> |
|
|
<el-input v-model="form['productItemCode']" :placeholder="'请选择物料代码'" @click="opensearchTable('productItemCode', 'code')" /> |
|
|
<el-input v-model="form['productItemCode']" :placeholder="'请选择物料代码'" @click="opensearchTable('productItemCode', 'code')" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #componentItemCode="form"> |
|
|
<template #componentItemCode="form" v-if="props.searchTableParams?.find((item:any) => (item.formField == 'componentItemCode'))"> |
|
|
<div class="w-[100%] flex"> |
|
|
<div class="w-[100%] flex"> |
|
|
<el-input v-model="form['componentItemCode']" :placeholder="'请选择物料代码'" @click="opensearchTable('componentItemCode', 'code')" /> |
|
|
<el-input v-model="form['componentItemCode']" :placeholder="'请选择物料代码'" @click="opensearchTable('componentItemCode', 'code')" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #supplierCode="form"> |
|
|
<template #supplierCode="form" v-if="props.searchTableParams?.find((item:any) => (item.formField == 'supplierCode'))"> |
|
|
<div class="w-[100%] flex"> |
|
|
<div class="w-[100%] flex"> |
|
|
<el-input v-model="form['supplierCode']" :placeholder="'请选择供应商代码'" @click="opensearchTable('supplierCode', 'code')" /> |
|
|
<el-input v-model="form['supplierCode']" :placeholder="'请选择供应商代码'" @click="opensearchTable('supplierCode', 'code')" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #productionLineCode="form"> |
|
|
<template #productionLineCode="form" v-if="props.searchTableParams?.find((item:any) => (item.formField == 'productionLineCode'))"> |
|
|
<div class="w-[100%] flex"> |
|
|
<div class="w-[100%] flex"> |
|
|
<el-input v-model="form['productionLineCode']" :placeholder="'请选择生产线代码'" @click="opensearchTable('productionLineCode', 'code')" /> |
|
|
<el-input v-model="form['productionLineCode']" :placeholder="'请选择生产线代码'" @click="opensearchTable('productionLineCode', 'code')" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #fgLocationCode="form"> |
|
|
<template #fgLocationCode="form" v-if="props.searchTableParams?.find((item:any) => (item.formField == 'fgLocationCode'))"> |
|
|
<div class="w-[100%] flex"> |
|
|
<div class="w-[100%] flex"> |
|
|
<el-input v-model="form['fgLocationCode']" :placeholder="'请选择库位代码'" @click="opensearchTable('fgLocationCode', 'code')" /> |
|
|
<el-input v-model="form['fgLocationCode']" :placeholder="'请选择库位代码'" @click="opensearchTable('fgLocationCode', 'code')" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #defaultWarehouseCode="form"> |
|
|
<template #defaultWarehouseCode="form" v-if="props.searchTableParams?.find((item:any) => (item.formField == 'defaultWarehouseCode'))"> |
|
|
<div class="w-[100%] flex"> |
|
|
<div class="w-[100%] flex"> |
|
|
<el-input v-model="form['defaultWarehouseCode']" :placeholder="'请选择仓库代码'" @click="opensearchTable('defaultWarehouseCode', 'code')" /> |
|
|
<el-input v-model="form['defaultWarehouseCode']" :placeholder="'请选择仓库代码'" @click="opensearchTable('defaultWarehouseCode', 'code')" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #defaultLocationCode="form"> |
|
|
<template #defaultLocationCode="form" v-if="props.searchTableParams?.find((item:any) => (item.formField == 'defaultLocationCode'))"> |
|
|
<div class="w-[100%] flex"> |
|
|
<div class="w-[100%] flex"> |
|
|
<el-input v-model="form['defaultLocationCode']" :placeholder="'请选择库位代码'" @click="opensearchTable('defaultLocationCode', 'code')" /> |
|
|
<el-input v-model="form['defaultLocationCode']" :placeholder="'请选择库位代码'" @click="opensearchTable('defaultLocationCode', 'code')" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #customerCode="form"> |
|
|
<template #customerCode="form" v-if="props.searchTableParams?.find((item:any) => (item.formField == 'customerCode'))"> |
|
|
<div class="w-[100%] flex"> |
|
|
<div class="w-[100%] flex"> |
|
|
<el-input v-model="form['customerCode']" :placeholder="'请选择客户代码'" @click="opensearchTable('customerCode', 'code')" /> |
|
|
<el-input v-model="form['customerCode']" :placeholder="'请选择客户代码'" @click="opensearchTable('customerCode', 'code')" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #warehouseCode="form"> |
|
|
<template #warehouseCode="form" v-if="props.searchTableParams?.find((item:any) => (item.formField == 'warehouseCode'))"> |
|
|
<div class="w-[100%] flex"> |
|
|
<div class="w-[100%] flex"> |
|
|
<el-input v-model="form['warehouseCode']" :placeholder="'请选择仓库代码'" @click="opensearchTable('warehouseCode', 'code')" /> |
|
|
<el-input v-model="form['warehouseCode']" :placeholder="'请选择仓库代码'" @click="opensearchTable('warehouseCode', 'code')" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #areaCode="form"> |
|
|
<template #areaCode="form" v-if="props.searchTableParams?.find((item:any) => (item.formField == 'areaCode'))"> |
|
|
<div class="w-[100%] flex"> |
|
|
<div class="w-[100%] flex"> |
|
|
<el-input v-model="form['areaCode']" :placeholder="'请选择库区代码'" @click="opensearchTable('areaCode', 'code')" /> |
|
|
<el-input v-model="form['areaCode']" :placeholder="'请选择库区代码'" @click="opensearchTable('areaCode', 'code')" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #locationGroupCode="form"> |
|
|
<template #locationGroupCode="form" v-if="props.searchTableParams?.find((item:any) => (item.formField == 'locationGroupCode'))"> |
|
|
<div class="w-[100%] flex"> |
|
|
<div class="w-[100%] flex"> |
|
|
<el-input v-model="form['locationGroupCode']" :placeholder="'请选择库位组代码'" @click="opensearchTable('locationGroupCode', 'code')" /> |
|
|
<el-input v-model="form['locationGroupCode']" :placeholder="'请选择库位组代码'" @click="opensearchTable('locationGroupCode', 'code')" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #rawLocationCode="form"> |
|
|
<template #rawLocationCode="form" v-if="props.searchTableParams?.find((item:any) => (item.formField == 'rawLocationCode'))"> |
|
|
<div class="w-[100%] flex"> |
|
|
<div class="w-[100%] flex"> |
|
|
<el-input v-model="form['rawLocationCode']" :placeholder="'请选择库位代码'" @click="opensearchTable('rawLocationCode', 'code')" /> |
|
|
<el-input v-model="form['rawLocationCode']" :placeholder="'请选择库位代码'" @click="opensearchTable('rawLocationCode', 'code')" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #workshopCode="form"> |
|
|
<template #workshopCode="form" v-if="props.searchTableParams?.find((item:any) => (item.formField == 'workshopCode'))"> |
|
|
<div class="w-[100%] flex"> |
|
|
<div class="w-[100%] flex"> |
|
|
<el-input v-model="form['workshopCode']" :placeholder="'请选择车间代码'" @click="opensearchTable('workshopCode', 'code')" /> |
|
|
<el-input v-model="form['workshopCode']" :placeholder="'请选择车间代码'" @click="opensearchTable('workshopCode', 'code')" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #outAreaCodes="form"> |
|
|
<template #outAreaCodes="form" v-if="props.searchTableParams?.find((item:any) => (item.formField == 'outAreaCodes'))"> |
|
|
<div class="w-[100%] flex"> |
|
|
<div class="w-[100%] flex"> |
|
|
<el-input v-model="form['outAreaCodes']" :placeholder="'请选择库区代码'" @click="opensearchTable('outAreaCodes', 'code')" /> |
|
|
<el-input v-model="form['outAreaCodes']" :placeholder="'请选择库区代码'" @click="opensearchTable('outAreaCodes', 'code')" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #inAreaCodes="form"> |
|
|
<template #inAreaCodes="form" v-if="props.searchTableParams?.find((item:any) => (item.formField == 'inAreaCodes'))"> |
|
|
<div class="w-[100%] flex"> |
|
|
<div class="w-[100%] flex"> |
|
|
<el-input v-model="form['inAreaCodes']" :placeholder="'请选择库区代码'" @click="opensearchTable('inAreaCodes', 'code')" /> |
|
|
<el-input v-model="form['inAreaCodes']" :placeholder="'请选择库区代码'" @click="opensearchTable('inAreaCodes', 'code')" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #customercode="form"> |
|
|
<template #customercode="form" v-if="props.searchTableParams?.find((item:any) => (item.formField == 'customercode'))"> |
|
|
<div class="w-[100%] flex"> |
|
|
<div class="w-[100%] flex"> |
|
|
<el-input v-model="form['customercode']" :placeholder="'请选择客户代码'" @click="opensearchTable('customercode', 'code')" /> |
|
|
<el-input v-model="form['customercode']" :placeholder="'请选择客户代码'" @click="opensearchTable('customercode', 'code')" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template #itemcode="form"> |
|
|
<template #itemcode="form" v-if="props.searchTableParams?.find((item:any) => (item.formField == 'itemcode'))"> |
|
|
<div class="w-[100%] flex"> |
|
|
<div class="w-[100%] flex"> |
|
|
<el-input v-model="form['itemcode']" :placeholder="'请选择物料代码'" @click="opensearchTable('itemcode', 'code')" /> |
|
|
<el-input v-model="form['itemcode']" :placeholder="'请选择物料代码'" @click="opensearchTable('itemcode', 'code')" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
<template #asnNumber="form" v-if="props.searchTableParams?.find((item:any) => (item.formField == 'asnNumber'))"> |
|
|
|
|
|
<div class="w-[100%] flex"> |
|
|
|
|
|
<el-input v-model="form['asnNumber']" :placeholder="'请选择发货单号'" @click="opensearchTable('asnNumber', 'asnNumber')" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
</Form> |
|
|
</Form> |
|
|
<div class="table" v-if="isBusiness"> |
|
|
<div class="table" v-if="isBusiness"> |
|
|
<TableForm ref="tableFormRef" |
|
|
<TableForm ref="tableFormRef" |
|
@ -221,8 +226,6 @@ const searchTableSuccess = (formField,searchField, val) => { |
|
|
|
|
|
|
|
|
/** 打开弹窗 */ |
|
|
/** 打开弹窗 */ |
|
|
const open = async (type: string, row?: any) => { |
|
|
const open = async (type: string, row?: any) => { |
|
|
|
|
|
|
|
|
console.log(props.tableAllSchemas); |
|
|
|
|
|
dialogVisible.value = true |
|
|
dialogVisible.value = true |
|
|
dialogTitle.value = t('action.' + type) |
|
|
dialogTitle.value = t('action.' + type) |
|
|
formType.value = type |
|
|
formType.value = type |
|
@ -273,7 +276,13 @@ const submitForm = async () => { |
|
|
|
|
|
|
|
|
if (props.isBusiness) { |
|
|
if (props.isBusiness) { |
|
|
const validateForm = await tableFormRef.value.validateForm() |
|
|
const validateForm = await tableFormRef.value.validateForm() |
|
|
if (!validateForm) return; |
|
|
if (!validateForm) { |
|
|
|
|
|
if (props.tableData.length == 0) { |
|
|
|
|
|
message.warning('请填写明细信息!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 提交请求 |
|
|
// 提交请求 |
|
@ -314,7 +323,8 @@ const emit = defineEmits([ |
|
|
'handleDeleteTable', |
|
|
'handleDeleteTable', |
|
|
'handleAddTable', |
|
|
'handleAddTable', |
|
|
'inpuFocus', |
|
|
'inpuFocus', |
|
|
'searchTableSuccess' |
|
|
'searchTableSuccess', |
|
|
|
|
|
'opensearchTable' |
|
|
]) |
|
|
]) |
|
|
//普通下拉改变事件 |
|
|
//普通下拉改变事件 |
|
|
const formSelectChange = (field, val) => { |
|
|
const formSelectChange = (field, val) => { |
|
|