ljlong_2630
6 days ago
55 changed files with 3493 additions and 789 deletions
@ -0,0 +1,60 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface FinishedShipmentDetailVO { |
|||
id: number |
|||
masterId: number |
|||
materialCode: string |
|||
materialName: string |
|||
backNumber: string |
|||
materialDescription: string |
|||
shipmentQuantity: number |
|||
unitPrice: number |
|||
lockedQuantity: number |
|||
available: string |
|||
deletionTime: Date |
|||
deleterId: string |
|||
extraProperties: string |
|||
concurrencyStamp: number |
|||
siteId: string |
|||
} |
|||
|
|||
// 查询已发未结发货记录子列表
|
|||
export const getFinishedShipmentDetailPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/wms/finished-shipment-record-detail/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/wms/finished-shipment-record-detail/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询已发未结发货记录子详情
|
|||
export const getFinishedShipmentDetail = async (id: number) => { |
|||
return await request.get({ url: `/wms/finished-shipment-record-detail/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增已发未结发货记录子
|
|||
export const createFinishedShipmentDetail = async (data: FinishedShipmentDetailVO) => { |
|||
return await request.post({ url: `/wms/finished-shipment-record-detail/create`, data }) |
|||
} |
|||
|
|||
// 修改已发未结发货记录子
|
|||
export const updateFinishedShipmentDetail = async (data: FinishedShipmentDetailVO) => { |
|||
return await request.put({ url: `/wms/finished-shipment-record-detail/update`, data }) |
|||
} |
|||
|
|||
// 删除已发未结发货记录子
|
|||
export const deleteFinishedShipmentDetail = async (id: number) => { |
|||
return await request.delete({ url: `/wms/finished-shipment-record-detail/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出已发未结发货记录子 Excel
|
|||
export const exportFinishedShipmentDetail = async (params) => { |
|||
return await request.download({ url: `/wms/finished-shipment-record-detail/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/wms/finished-shipment-record-detail/get-import-template' }) |
|||
} |
@ -0,0 +1,56 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface FinishedShipmentMainVO { |
|||
id: number |
|||
orderNumber: string |
|||
shipmentRecordNumber: string |
|||
shipmentType: string |
|||
customerOrderNumber: string |
|||
available: string |
|||
deletionTime: Date |
|||
deleterId: string |
|||
extraProperties: string |
|||
concurrencyStamp: number |
|||
siteId: string |
|||
} |
|||
|
|||
// 查询已发未结发货记录主列表
|
|||
export const getFinishedShipmentMainPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/wms/finished-shipment-record-main/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/wms/finished-shipment-record-main/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询已发未结发货记录主详情
|
|||
export const getFinishedShipmentMain = async (id: number) => { |
|||
return await request.get({ url: `/wms/finished-shipment-record-main/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增已发未结发货记录主
|
|||
export const createFinishedShipmentMain = async (data: FinishedShipmentMainVO) => { |
|||
return await request.post({ url: `/wms/finished-shipment-record-main/create`, data }) |
|||
} |
|||
|
|||
// 修改已发未结发货记录主
|
|||
export const updateFinishedShipmentMain = async (data: FinishedShipmentMainVO) => { |
|||
return await request.put({ url: `/wms/finished-shipment-record-main/update`, data }) |
|||
} |
|||
|
|||
// 删除已发未结发货记录主
|
|||
export const deleteFinishedShipmentMain = async (id: number) => { |
|||
return await request.delete({ url: `/wms/finished-shipment-record-main/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出已发未结发货记录主 Excel
|
|||
export const exportFinishedShipmentMain = async (params) => { |
|||
return await request.download({ url: `/wms/finished-shipment-record-main/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/wms/finished-shipment-record-main/get-import-template' }) |
|||
} |
@ -0,0 +1,18 @@ |
|||
import request from '@/config/axios' |
|||
export const getSupplierMoldCostDetailPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/wms/supplier-tool-apport-statement-detail/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/wms/supplier-tool-apport-statement-detail/page`, params }) |
|||
} |
|||
} |
|||
export const exportSupplierMoldCostDetail = async (params) => { |
|||
if (params.isSearch) { |
|||
const data = {...params} |
|||
return await request.downloadPost({ url: `/wms/supplier-tool-apport-statement-detail/export-excel-senior`, data }) |
|||
}else{ |
|||
return await request.download({ url: `/wms/supplier-tool-apport-statement-detail/export-excel`, params }) |
|||
} |
|||
} |
@ -0,0 +1,49 @@ |
|||
import request from '@/config/axios' |
|||
// 从客户对账单中获取客户代码 -- 销售申请
|
|||
export const getCustomerList = async () => { |
|||
return await request.get({ url: `/wms/supplier-tool-apport-statement-main/getCustomerList`}) |
|||
} |
|||
export const getSupplierMoldCostMainPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/wms/supplier-tool-apport-statement-main/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/wms/supplier-tool-apport-statement-main/page`, params }) |
|||
} |
|||
} |
|||
export const exportSupplierMoldCostMain = async (params) => { |
|||
if (params.isSearch) { |
|||
const data = {...params} |
|||
return await request.downloadPost({ url: `/wms/supplier-tool-apport-statement-main/export-excel-senior`, data }) |
|||
}else{ |
|||
return await request.download({ url: `/wms/supplier-tool-apport-statement-main/export-excel`, params }) |
|||
} |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/wms/supplier-tool-apport-statement-main/get-import-template' }) |
|||
} |
|||
// 导入客户对账单前校验是否有相同客户代码和年月的数据存在
|
|||
export const verifyDataExist = async (yearsMonthStr: String,supplierCode:String) => { |
|||
return await request.get({ url: `/wms/supplier-tool-apport-statement-main/verifyDataExist?yearsMonthStr=` + yearsMonthStr+'&supplierCode='+supplierCode }) |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
// 发布
|
|||
export const publish = async (id: number) => { |
|||
return await request.get({ url: `/wms/supplier-tool-apport-statement-main/publish?id=` + id }) |
|||
} |
|||
|
|||
// 废除
|
|||
export const nodeAbrogate = async (id: number) => { |
|||
return await request.get({ url: `/wms/supplier-tool-apport-statement-main/nodeAbrogate?id=` + id }) |
|||
} |
|||
|
|||
// 退回
|
|||
export const sendBack = async (id: number) => { |
|||
return await request.get({ url: `/wms/supplier-tool-apport-statement-main/sendBack?id=` + id }) |
|||
} |
@ -0,0 +1,467 @@ |
|||
<!-- 导入客户对账单组件 --> |
|||
<template> |
|||
<Dialog v-model="dialogVisible" :title="t('ts.导入')" width="600" :close-on-click-modal="false"> |
|||
<el-form |
|||
:inline="true" |
|||
:model="queryParams" |
|||
class="demo-form-inline" |
|||
style="margin-bottom: 10px" |
|||
label-width="70px" |
|||
> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<el-form-item label="客户代码"> |
|||
<el-select |
|||
v-model="queryParams.supplierCode" |
|||
placeholder="请选择客户代码" |
|||
clearable |
|||
> |
|||
<el-option v-for="(item) in customerList" :key="item.code" :label="item.name" :value="item.code" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="年月"> |
|||
<el-date-picker |
|||
v-model="queryParams.yearsMonthStr" |
|||
type="month" |
|||
placeholder="选择年月" |
|||
format="YYYY-MM" |
|||
value-format="YYYY-MM" |
|||
style="width: 100%" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<el-upload |
|||
ref="uploadRef" |
|||
v-model:file-list="fileList" |
|||
:action=" |
|||
importUrl + |
|||
'?yearsMonthStr=' + |
|||
queryParams.yearsMonthStr + |
|||
'&supplierCode=' + |
|||
queryParams.supplierCode + |
|||
'&file=' + |
|||
file + |
|||
'&updatePart=' + |
|||
updatePart + |
|||
'&outFile=' + |
|||
outFile + |
|||
'&extend=' + extend + |
|||
'&fromInventoryStatus=' + fromInventoryStatus + |
|||
'&toInventoryStatus=' + toInventoryStatus + |
|||
dataType |
|||
" |
|||
:auto-upload="false" |
|||
:disabled="formLoading" |
|||
:headers="uploadHeaders" |
|||
:limit="1" |
|||
:on-error="submitFormError" |
|||
:on-exceed="handleExceed" |
|||
:on-success="submitFormSuccess" |
|||
:accept="accept" |
|||
drag |
|||
style="width: 300px; margin: 0 auto" |
|||
v-loading="formLoading" |
|||
> |
|||
<Icon icon="ep:upload-filled" color="#c0c4cc" :size="60" /> |
|||
<div class="el-upload__text">{{t('ts.将文件拖到此处,或')}}<em>{{t('ts.点击上传')}}</em></div> |
|||
<!-- <template #tip> |
|||
<div class="el-upload__tip ml--126px mr--80px"> |
|||
<div class="flex" v-if="announcements&&announcements.length>0"> |
|||
<div |
|||
class="label h-32px ml-22px mr-26px color-#acaeb3 font-size-14px w-100px text-right mt-2px" |
|||
style="line-height: 32px;" |
|||
>{{t('ts.注意事项')}}</div |
|||
> |
|||
<div class=""> |
|||
<div class="notice color-#acaeb3 font-size-14px text-red"> |
|||
<div class="mt-2" v-for="item in announcements">{{ item }}</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="flex"> |
|||
<div |
|||
class="label h-32px mr-26px color-#acaeb3 font-size-14px w-100px text-right" |
|||
style="line-height: 32px" |
|||
>{{t('ts.导入模式')}}</div |
|||
> |
|||
<div class=""> |
|||
<div class="radio"> |
|||
<el-radio-group v-model="mode"> |
|||
<el-radio :label="1" v-show="updateIsShow" :disabled="updateIsDisable">{{ t('ts.更新')}}</el-radio> |
|||
<el-radio :label="2" v-show="appendIsShow" :disabled="appendIsDisable">{{ t('ts.追加') }}</el-radio> |
|||
<el-radio :label="3" v-show="coverIsShow" :disabled="coverIsDisable">{{ t('ts.覆盖') }}</el-radio> |
|||
</el-radio-group> |
|||
</div> |
|||
|
|||
<div class="tips color-#acaeb3 font-size-14px"> |
|||
<div class="mt-2">{{t('ts.更新:新增并修改')}}</div> |
|||
<div class="mt-2">{{ t('ts.追加:只新增,不修改') }}</div> |
|||
<div class="mt-2">{{ t('ts.覆盖:只修改不新增') }}</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="flex mt-16px"> |
|||
<div |
|||
class="label h-32px mr-26px color-#acaeb3 font-size-14px w-100px text-right" |
|||
style="line-height: 32px" |
|||
>{{ t('ts.部分保存') }}</div |
|||
> |
|||
<div class=""> |
|||
<div class="switch"> |
|||
<el-switch v-model="updatePart" /> |
|||
</div> |
|||
<div class="tips color-#acaeb3 font-size-14px"> |
|||
<div class="mt-2">{{ t('ts.部分保存:如存在错误数据,正确数据正常导入') }}</div> |
|||
<div class="mt-2">{{ t('ts.全部保存:全部数据正确,才能导入') }}</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="flex mt-16px" v-if="isShowOut"> |
|||
<div |
|||
class="label h-32px mr-26px color-#acaeb3 font-size-14px w-100px text-right" |
|||
style="line-height: 32px" |
|||
>是否外部资源</div |
|||
> |
|||
<div class=""> |
|||
<div class="switch"> |
|||
<el-switch v-model="outFile" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> --> |
|||
</el-upload> |
|||
<template #footer> |
|||
<div class="flex items-center"> |
|||
<div class="flex-1 text-left"> |
|||
<el-button type="primary" plain @click="importTemplate"> |
|||
<Icon icon="ep:download" /> |
|||
{{ t('ts.下载模板') }} |
|||
</el-button> |
|||
</div> |
|||
<el-button :disabled="formLoading" type="primary" @click="verifyData">{{ t('ts.确 定') }}</el-button> |
|||
<el-button @click="dialogVisible = false">{{ t('ts.取 消') }}</el-button> |
|||
</div> |
|||
</template> |
|||
</Dialog> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { getAccessToken, getTenantId } from '@/utils/auth' |
|||
import download from '@/utils/download' |
|||
import { getBaseUrl } from '@/utils/systemParam' |
|||
import * as CustomerApi from '@/api/wms/customer' |
|||
import * as SuppliperMoldCostMainApi from '@/api/wms/suppliperMoldCostMain' |
|||
defineOptions({ name: 'ImportSupplierMoldCostForm' }) |
|||
const { t } = useI18n() |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
|
|||
const dialogVisible = ref(false) // 弹窗的是否展示 |
|||
const formLoading = ref(false) // 表单的加载中 |
|||
const uploadRef = ref() |
|||
const uploadHeaders = ref() // 上传 Header 头 |
|||
const fileList = ref([]) // 文件列表 |
|||
const file = ref('') |
|||
|
|||
const props = defineProps({ |
|||
importTemplateData: { |
|||
type: Object, |
|||
required: true |
|||
}, |
|||
// 可以导入的文件类型 |
|||
accept: { |
|||
type: String, |
|||
required: false, |
|||
default: '.xlsx,.xls' |
|||
}, |
|||
// 是否更新已经存在的用户数据.默认值是1 |
|||
mode: { |
|||
type: Number, |
|||
required: false, |
|||
default: 1 |
|||
}, |
|||
// 更新是否禁用,默认值不禁用 |
|||
updateIsDisable: { |
|||
type: Boolean, |
|||
required: false, |
|||
default: false |
|||
}, |
|||
// 更新是否展示 |
|||
updateIsShow: { |
|||
type: Boolean, |
|||
required: false, |
|||
default: true |
|||
}, |
|||
// 追加是否禁用,默认值不禁用 |
|||
appendIsDisable: { |
|||
type: Boolean, |
|||
required: false, |
|||
default: false |
|||
}, |
|||
// 追加是否展示 |
|||
appendIsShow: { |
|||
type: Boolean, |
|||
required: false, |
|||
default: true |
|||
}, |
|||
// 覆盖是否禁用,默认值不禁用 |
|||
coverIsDisable: { |
|||
type: Boolean, |
|||
required: false, |
|||
default: false |
|||
}, |
|||
// 覆盖是否展示 |
|||
coverIsShow: { |
|||
type: Boolean, |
|||
required: false, |
|||
default: true |
|||
}, |
|||
// 是否部门保存,默认是 |
|||
updatePart: { |
|||
type: Boolean, |
|||
required: false, |
|||
default: false |
|||
}, |
|||
url: { |
|||
type: String, |
|||
required: false |
|||
}, |
|||
// 显示是否外部资源 |
|||
isShowOut: { |
|||
type: Boolean, |
|||
required: false, |
|||
default: false |
|||
}, |
|||
outFile: { |
|||
type: Boolean, |
|||
required: false, |
|||
default: false |
|||
}, |
|||
// 扩展额外属性 |
|||
extend: { |
|||
type: String, |
|||
required: false, |
|||
default: '' |
|||
}, |
|||
// 库存修改 扩展额外属性 TODO: 后续优化 业务限定属性应转为统一的额外扩展属性 此处不应该出现业务相关属性 cxm |
|||
fromInventoryStatus: { |
|||
type: String, |
|||
required: false, |
|||
default: '' |
|||
}, |
|||
// 库存修改 扩展额外属性 TODO: 后续优化 业务限定属性应转为统一的额外扩展属性 此处不应该出现业务相关属性 cxm |
|||
toInventoryStatus: { |
|||
type: String, |
|||
required: false, |
|||
default: '' |
|||
}, |
|||
announcements:{ |
|||
type: Array, |
|||
required: false, |
|||
default: [] |
|||
} |
|||
}) |
|||
const importTemplateData = ref(props.importTemplateData) |
|||
const dataType = ref('') |
|||
dataType.value = props.importTemplateData.dataType ?'&dataType=' + props.importTemplateData.dataType :'' |
|||
const accept = ref(props.accept) |
|||
const mode = ref(props.mode) //是否更新已经存在的用户数据.默认值是1 |
|||
const updateIsDisable = ref(props.updateIsDisable) //更新是否禁用,默认值不禁用 |
|||
const appendIsDisable = ref(props.appendIsDisable) //追加是否禁用,默认值不禁用 |
|||
const coverIsDisable = ref(props.coverIsDisable) //覆盖是否禁用,默认值不禁用 |
|||
const updatePart = ref(props.updatePart) //是否部门保存 |
|||
const outFile = ref(props.outFile) //是否引入外部资源 |
|||
|
|||
const importUrl = getBaseUrl() + import.meta.env.VITE_API_URL + props.url |
|||
|
|||
/** 打开弹窗 */ |
|||
const open = () => { |
|||
dialogVisible.value = true |
|||
resetForm() |
|||
getCustomerList();//获取客户列表 |
|||
} |
|||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗 |
|||
|
|||
/** 校验数据 */ |
|||
const verifyData = async () => { |
|||
if (queryParams.yearsMonthStr==''||queryParams.yearsMonthStr==null) { |
|||
message.error('请选择年月') |
|||
return |
|||
} |
|||
if (queryParams.supplierCode==''||queryParams.supplierCode==null) { |
|||
message.error('请选择供应商代码') |
|||
return |
|||
} |
|||
if (fileList.value.length == 0) { |
|||
message.error('请上传文件') |
|||
return |
|||
} |
|||
const data = await SuppliperMoldCostMainApi.verifyDataExist(queryParams.yearsMonthStr,queryParams.supplierCode); |
|||
console.log('data',data) |
|||
if(data.status==0){ |
|||
submitForm(); |
|||
}else if(data.status==2){ |
|||
try { |
|||
// 确认 |
|||
await message.confirm('已存在相同供应商编号及年月的模具费用,是否确认覆盖?') |
|||
//确定走的 |
|||
submitForm(); |
|||
// await PurchasepriceApi.deletePurchaseprice(id) |
|||
// tableObject.loading = false |
|||
// message.success(t('common.delSuccess')) |
|||
// // 刷新列表 |
|||
// buttonBaseClick('refresh',null) |
|||
} catch { |
|||
//取消走的 |
|||
} |
|||
}else if(data.status==3){ |
|||
await message.alertWarning('已存在相同供应商编号及年月的对账单,且已提交,无法导入。') |
|||
} |
|||
} |
|||
|
|||
/** 提交表单 */ |
|||
const submitForm = async () => { |
|||
if (fileList.value.length == 0) { |
|||
message.error('请上传文件') |
|||
return |
|||
} |
|||
file.value = fileList.value[0].name |
|||
// 提交请求 |
|||
uploadHeaders.value = { |
|||
Authorization: 'Bearer ' + getAccessToken(), |
|||
'tenant-id': getTenantId() |
|||
} |
|||
formLoading.value = true |
|||
uploadRef.value!.submit() |
|||
} |
|||
|
|||
/** 文件上传成功 */ |
|||
const emits = defineEmits(['success']) |
|||
const submitFormSuccess = (response: any) => { |
|||
formLoading.value = true |
|||
console.log(response) |
|||
if (response) { |
|||
if (response.code == 500) { |
|||
uploadRef.value!.clearFiles() |
|||
message.error('导入失败') |
|||
formLoading.value = false |
|||
return |
|||
} else if (response.code == 0) { |
|||
if (response.data.errorCount > 0) { |
|||
message.confirm('文件中有部分数据导入失败,是否下载失败数据?').then(() => { |
|||
// download.excel(file, 'file_' + new Date().getTime()) |
|||
// 通过url下载文件 |
|||
// const downloadElement = document.createElement('a') |
|||
// console.log(172, getBaseUrl() + import.meta.env.VITE_API_URL + '/' + response.data.errorFile) |
|||
// console.log(172, getBaseUrl() + '/admin-api/opt/profile/' + response.data.errorFile) |
|||
window.open( |
|||
getBaseUrl() + '/admin-api' + response.data.errorFile, |
|||
'222' |
|||
) |
|||
// downloadElement.setAttribute('href', getBaseUrl() + import.meta.env.VITE_API_URL + response.data.errorFile ) |
|||
// 点击下载 |
|||
// downloadElement.click() |
|||
}) |
|||
} else { |
|||
message.success('导入成功') |
|||
} |
|||
}else if(response.data == null){ |
|||
message.error(response.msg) |
|||
} |
|||
} |
|||
|
|||
// if (response.code !== 0) { |
|||
// message.error(response.msg) |
|||
// formLoading.value = false |
|||
// return |
|||
// } |
|||
// // 拼接提示语 |
|||
// const data = response.data |
|||
// const create = response.data.importResult[0] |
|||
// const update = response.data.importResult[1] |
|||
// const failure = response.data.importResult[2] |
|||
// let text = '上传成功数量:' + data[create].length + ';' |
|||
// for (let name of data[create]) { |
|||
// text += '< ' + name + ' >' |
|||
// } |
|||
// text += '更新成功数量:' + data[update].length + ';' |
|||
// for (const name of data[update]) { |
|||
// text += '< ' + name + ' >' |
|||
// } |
|||
// text += '更新失败数量:' + Object.keys(data[failure]).length + ';' |
|||
// for (const name in data[failure]) { |
|||
// text += '< ' + name + ': ' + data[failure][name] + ' >' |
|||
// } |
|||
// message.alert(text) |
|||
|
|||
// 发送操作成功的事件 |
|||
|
|||
formLoading.value = false |
|||
emits('success') |
|||
dialogVisible.value = false |
|||
} |
|||
/** 上传错误提示 */ |
|||
const submitFormError = (): void => { |
|||
message.error('上传失败,请您重新上传!') |
|||
formLoading.value = false |
|||
} |
|||
|
|||
/** 重置表单 */ |
|||
const resetForm = () => { |
|||
// 重置上传状态和文件 |
|||
formLoading.value = false |
|||
uploadRef.value?.clearFiles() |
|||
fileList.value = [] |
|||
} |
|||
|
|||
/** 文件数超出提示 */ |
|||
const handleExceed = (): void => { |
|||
message.error('最多只能上传一个文件!') |
|||
} |
|||
|
|||
/** 下载模板操作 */ |
|||
const importTemplate = () => { |
|||
const res = importTemplateData.value.templateUrl |
|||
download.excel(res, importTemplateData.value.templateTitle) |
|||
} |
|||
const customerList = ref(); |
|||
const queryParams = reactive({ |
|||
supplierCode: '', |
|||
yearsMonthStr: '', |
|||
}) |
|||
|
|||
const getCustomerList = async () => {//获取客户列表 |
|||
|
|||
const list = await SuppliperMoldCostMainApi.getCustomerList(); |
|||
customerList.value = list; |
|||
} |
|||
|
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
.text-red{ |
|||
color: var(--el-color-danger); |
|||
} |
|||
.tips { |
|||
div { |
|||
position: relative; |
|||
padding-left: 22px; |
|||
|
|||
&::before { |
|||
width: 4px; |
|||
height: 4px; |
|||
border-radius: 50%; |
|||
content: ''; |
|||
background: #c2c2c2; |
|||
position: absolute; |
|||
top: 50%; |
|||
margin-top: -2px; |
|||
left: 4px; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,348 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search ref="seachRef" |
|||
:schema="SupplierMoldCostMain.allSchemas.searchSchema" |
|||
@search="searchClick" |
|||
@reset="searchClick" |
|||
@onChange="onSearchChange" |
|||
/> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="SupplierMoldCostMain.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #number="{ row }"> |
|||
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|||
<span>{{ row.number }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row, $index }"> |
|||
<ButtonBase |
|||
:Butttondata="butttondata(row, $index)" |
|||
@button-base-click="buttonTableClick($event, row)" |
|||
/> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
<!-- 详情 --> |
|||
<Detail |
|||
ref="detailRef" |
|||
:isBasic="false" |
|||
:allSchemas="SupplierMoldCostMain.allSchemas" |
|||
:detailAllSchemas="SupplierMoldCostDetail.allSchemas" |
|||
:extendRowKeyValue = "[{ |
|||
key:'number', |
|||
value:'number' |
|||
}]" |
|||
:apiPage="SuppliperMoldCostDetailApi.getSupplierMoldCostDetailPage" |
|||
:detailButtonIsShowAdd="false" |
|||
:otherHeadButttonData = "[defaultButtons.defaultExportBtn({hasPermi:`wms:supplier-mold-cost-main:export` })]" |
|||
@buttonBaseClick="detailButtonBaseClick" |
|||
/> |
|||
<!-- 导入 --> |
|||
<ImportSupplierMoldCostForm |
|||
ref="importFormRef" |
|||
url="/wms/supplier-tool-apport-statement-main/import" |
|||
:importTemplateData="importTemplateData" |
|||
@success="importSuccess" |
|||
/> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { |
|||
SupplierMoldCostMain, |
|||
SupplierMoldCostDetail |
|||
} from './supplierMoldCostMain.data' |
|||
import * as SuppliperMoldCostMainApi from '@/api/wms/suppliperMoldCostMain' |
|||
import * as SuppliperMoldCostDetailApi from '@/api/wms/suppliperMoldCostDetail' |
|||
import ImportSupplierMoldCostForm from '@/components/ImportForm/src/ImportSupplierMoldCostForm.vue' |
|||
|
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|||
import Detail from '@/components/Detail/src/Detail.vue' |
|||
import { formatDate } from '@/utils/formatTime' |
|||
// 供应商模具费用 |
|||
defineOptions({ name: 'supplierMoldCostMain' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(SupplierMoldCostMain.allSchemas.tableColumns) |
|||
|
|||
const otherHeadButttonData = ref() |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: SuppliperMoldCostMainApi.getSupplierMoldCostMainPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
defaultButtons.defaultImportBtn({hasPermi:'wms:supplier-mold-cost-main:import'}), // 导入 |
|||
defaultButtons.defaultExportBtn({hasPermi:'wms:supplier-mold-cost-main:export'}), // 导出 |
|||
defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null) // 设置 |
|||
|
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'import') { |
|||
// 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { |
|||
// 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { |
|||
// 筛选 |
|||
} else { |
|||
// 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = (row, $index) => { |
|||
const findIndex = row['masterId'] |
|||
? tableObject.tableList.findIndex((item) => item['masterId'] == row['masterId']) |
|||
: -1 |
|||
if (findIndex > -1 && findIndex < $index) { |
|||
return [] |
|||
} |
|||
return [ |
|||
{ |
|||
label: t('ts.发布'), |
|||
name: 'publish', |
|||
hide: row.status!=0, |
|||
type: 'primary', |
|||
icon: '', |
|||
color: '', |
|||
hasPermi: '', |
|||
link: true // 文本展现按钮 |
|||
}, |
|||
{ |
|||
label: t('ts.作废'), |
|||
name: 'abrogate', |
|||
hide: row.isAbrogate!=1, |
|||
type: 'danger', |
|||
icon: '', |
|||
color: '', |
|||
hasPermi: '', |
|||
link: true // 文本展现按钮 |
|||
}, |
|||
{ |
|||
label: t('ts.退回'), |
|||
name: 'back', |
|||
hide: row.isBack!=1, |
|||
type: 'warning', |
|||
icon: '', |
|||
color: '', |
|||
hasPermi: '', |
|||
link: true // 文本展现按钮 |
|||
} |
|||
] |
|||
} |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if(val=='publish'){ |
|||
//发布 |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.confirm('确认发布吗?') |
|||
// 发起删除 |
|||
await SuppliperMoldCostMainApi.publish(row.id) |
|||
message.success('发布成功') |
|||
// 刷新列表 |
|||
buttonBaseClick('refresh') |
|||
} catch {} |
|||
}else if(val=='abrogate'){ |
|||
//作废 |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.confirm('确认作废吗?') |
|||
// 发起删除 |
|||
await SuppliperMoldCostMainApi.nodeAbrogate(row.id) |
|||
message.success('作废成功') |
|||
// 刷新列表 |
|||
buttonBaseClick('refresh') |
|||
} catch {} |
|||
}else if(val=='back'){ |
|||
//作废 |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.confirm('确认退回吗?') |
|||
// 发起删除 |
|||
await SuppliperMoldCostMainApi.sendBack(row.id) |
|||
message.success('退回成功') |
|||
// 刷新列表 |
|||
buttonBaseClick('refresh') |
|||
} catch {} |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const tableObjectExtend = ref([]) |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
tableObjectExtend.value = [{ |
|||
key: 'number', |
|||
value: row.number |
|||
}] |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicCustomerStatementMain') |
|||
} |
|||
|
|||
|
|||
|
|||
/** 导出按钮操作 */ |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await SuppliperMoldCostMainApi.exportSupplierMoldCostMain(tableObject.params) |
|||
download.excel(data, '供应商模具费用主表.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateTitle: '供应商模具费用导入模版.xlsx', |
|||
templateUrl : SuppliperMoldCostMainApi.importTemplate |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
|
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
const seachRef = ref() |
|||
const onSearchChange = (field, value)=>{ |
|||
if(field=='status'){ |
|||
// 状态 |
|||
if(value.length>0){ |
|||
if(value[value.length-1]==''){ |
|||
//全选 |
|||
seachRef.value.setFormValues({ |
|||
status:[''] |
|||
}) |
|||
}else{ |
|||
seachRef.value.setFormValues({ |
|||
status:value.filter(item=>item!='') |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
const searchClick = async (data)=>{ |
|||
console.log('查询',data) |
|||
setSearchParams({...data,status:data.status.filter(item=>item!='')}) |
|||
} |
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
}) |
|||
|
|||
|
|||
// 根据状态返回该按钮是否显示 |
|||
const isShowMainButton = (row, val) => { |
|||
if (val.indexOf(row.status) > -1) { |
|||
return false |
|||
} else { |
|||
return true |
|||
} |
|||
} |
|||
// 点击子表按钮事件 |
|||
const detailButtonBaseClick = async (val, item, detailTableObject) => { |
|||
console.log(val, item, detailTableObject) |
|||
if (val == 'export') { |
|||
// 子表导出明细 |
|||
handleExportDetail(detailTableObject) |
|||
} |
|||
} |
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
// 子表导出明细 |
|||
const handleExportDetail = async (detailTableObject) => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await SuppliperMoldCostDetailApi.exportSupplierMoldCostDetail( |
|||
detailTableObject.params |
|||
) |
|||
download.excel(data, `对账差异【${formatDate(new Date())}】.xlsx`) |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
|
|||
</script> |
|||
|
@ -0,0 +1,189 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter , dateFormatterYM } from '@/utils/formatTime' |
|||
import { validateTwoNum } from '@/utils/validator' |
|||
|
|||
|
|||
export const SupplierMoldCostMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
fixed: 'left', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '状态', |
|||
field: 'status', |
|||
sort: 'custom', |
|||
dictType: DICT_TYPE.SUPPLIER_TOOL_APPORT_STATEMENT_MAIN, |
|||
dictClass: 'string', |
|||
form: { |
|||
//value: '',//可以添加默认值 有无都可
|
|||
component: 'Select', |
|||
}, |
|||
isSearch: true, |
|||
search:{ |
|||
component:'Select', |
|||
componentProps: { |
|||
multiple:true, |
|||
} |
|||
|
|||
}, |
|||
}, |
|||
{ |
|||
label: '版本号', |
|||
field: 'versionNumber', |
|||
sort: 'custom', |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '供应商代码', |
|||
field: 'supplierCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isSearch: true |
|||
}, |
|||
{ |
|||
label: '供应商名称', |
|||
field: 'supplierName', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isSearch: true |
|||
}, |
|||
{ |
|||
label: '年月', |
|||
field: 'yearsMonth', |
|||
sort: 'custom', |
|||
formatter: dateFormatterYM, |
|||
isSearch: true, |
|||
search: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
valueFormat: 'YYYY-MM', |
|||
type: 'daterange', |
|||
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|||
} |
|||
}, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM' |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'YYYY-MM' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '创建者', |
|||
field: 'creator', |
|||
sort: 'custom', |
|||
isDetail:true, |
|||
isForm: false, |
|||
isTable:true |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
search: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
type: 'daterange', |
|||
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|||
} |
|||
}, |
|||
detail: { |
|||
dateFormat : 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
isTable:true, |
|||
isForm: false, |
|||
table:{ |
|||
width:180 |
|||
} |
|||
}, |
|||
{ |
|||
label: '更新者', |
|||
field: 'updater', |
|||
sort: 'custom', |
|||
isDetail:true, |
|||
isForm: false, |
|||
isTable:false |
|||
}, |
|||
{ |
|||
label: '更新时间', |
|||
field: 'updateTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
search: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
type: 'daterange', |
|||
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|||
} |
|||
}, |
|||
detail: { |
|||
dateFormat : 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
isTable:false, |
|||
isForm: false, |
|||
table:{ |
|||
width:180 |
|||
} |
|||
}, |
|||
{ |
|||
label: '操作', |
|||
field: 'action', |
|||
isForm: false, |
|||
isTable:true, |
|||
isDetail:false, |
|||
table: { |
|||
width: 180, |
|||
fixed: 'right' |
|||
} |
|||
} |
|||
])) |
|||
|
|||
|
|||
export const SupplierMoldCostDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '物料品号', |
|||
field: 'articleNumber', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '车型', |
|||
field: 'vehicleType', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '金额', |
|||
field: 'amount', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '状态', |
|||
field: 'status', |
|||
sort: 'custom', |
|||
dictType: DICT_TYPE.SUPPLIER_TOOL_APPORT_STATEMENT_DETAIL, |
|||
dictClass: 'string', |
|||
form: { |
|||
//value: '',//可以添加默认值 有无都可
|
|||
component: 'Select', |
|||
}, |
|||
}, |
|||
])) |
|||
|
|||
|
@ -0,0 +1,219 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const FinishedShipmentMainRules = reactive({ |
|||
orderNumber: [required], |
|||
shipmentRecordNumber: [required], |
|||
shipmentType: [required], |
|||
customerOrderNumber: [required], |
|||
available: [required], |
|||
concurrencyStamp: [required] |
|||
}) |
|||
|
|||
export const FinishedShipmentMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
|
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150, |
|||
}, |
|||
isSearch: true |
|||
}, |
|||
{ |
|||
label: '已发未结记录单号', |
|||
field: 'unfinishedNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150, |
|||
}, |
|||
}, |
|||
{ |
|||
label: '发货记录单号', |
|||
field: 'shipmentRecordNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150, |
|||
}, |
|||
isSearch: true |
|||
}, |
|||
{ |
|||
label: '发货类型', |
|||
field: 'shipmentType', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150, |
|||
}, |
|||
dictType: DICT_TYPE.DELIVER_METHOD, |
|||
dictClass: 'string', |
|||
form: { |
|||
component: 'SelectV2' |
|||
} |
|||
}, |
|||
{ |
|||
label: '客户订单号', |
|||
field: 'customerOrderNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150, |
|||
}, |
|||
isSearch: true |
|||
}, |
|||
{ |
|||
label: '操作', |
|||
field: 'action', |
|||
isForm: false, |
|||
isDetail: false, |
|||
isTable: false, |
|||
table: { |
|||
width: 150, |
|||
fixed: 'right' |
|||
} |
|||
} |
|||
])) |
|||
|
|||
|
|||
// 表单校验
|
|||
export const FinishedShipmentDetailRules = reactive({ |
|||
materialCode: [required], |
|||
materialName: [required], |
|||
backNumber: [required], |
|||
materialDescription: [required], |
|||
shipmentQuantity: [required], |
|||
unitPrice: [required], |
|||
lockedQuantity: [required], |
|||
available: [required], |
|||
concurrencyStamp: [required] |
|||
}) |
|||
|
|||
export const FinishedShipmentDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
|
|||
{ |
|||
label: '物料代码', |
|||
field: 'itemCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isSearch: true |
|||
}, |
|||
{ |
|||
label: '物料名称', |
|||
field: 'itemName', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isSearch: true |
|||
}, |
|||
{ |
|||
label: '背番', |
|||
field: 'backNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150, |
|||
}, |
|||
}, |
|||
{ |
|||
label: '物料描述', |
|||
field: 'itemDescription', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150, |
|||
}, |
|||
form: { |
|||
component: 'Editor', |
|||
componentProps: { |
|||
valueHtml: '', |
|||
height: 200 |
|||
} |
|||
} |
|||
}, |
|||
// {
|
|||
// label: '发货数量',
|
|||
// field: 'shipmentQuantity',
|
|||
// sort: 'custom',
|
|||
// table: {
|
|||
// width: 150,
|
|||
// },
|
|||
// form: {
|
|||
// component: 'InputNumber',
|
|||
// value: 0
|
|||
// }
|
|||
// },
|
|||
|
|||
// {
|
|||
// label: '锁定数量',
|
|||
// field: 'lockedQuantity',
|
|||
// sort: 'custom',
|
|||
// table: {
|
|||
// width: 150,
|
|||
// },
|
|||
// form: {
|
|||
// component: 'InputNumber',
|
|||
// value: 0
|
|||
// }
|
|||
// },
|
|||
{ |
|||
label: '已结数量', |
|||
field: 'qty', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150, |
|||
}, |
|||
form: { |
|||
component: 'InputNumber', |
|||
value: 0 |
|||
} |
|||
}, |
|||
{ |
|||
label: '销售单价', |
|||
field: 'unitPrice', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150, |
|||
}, |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
formatter: dateFormatter, |
|||
isSearch: true, |
|||
search: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
type: 'daterange', |
|||
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|||
} |
|||
}, |
|||
isForm: false, |
|||
hiddenInMain:true |
|||
}, |
|||
{ |
|||
label: '创建人', |
|||
field: 'creator', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isTable: true, |
|||
hiddenInMain:true |
|||
|
|||
}, |
|||
// {
|
|||
// label: '操作',
|
|||
// field: 'action',
|
|||
// isForm: false,
|
|||
// table: {
|
|||
// width: 150,
|
|||
// fixed: 'right'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -1,68 +0,0 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const UnfinishedShipmentMainRules = reactive({ |
|||
orderNumber: [required], |
|||
shipmentRecordNumber: [required], |
|||
shipmentType: [required], |
|||
customerOrderNumber: [required], |
|||
available: [required], |
|||
concurrencyStamp: [required] |
|||
}) |
|||
|
|||
export const UnfinishedShipmentMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
|
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150, |
|||
}, |
|||
isSearch: true |
|||
}, |
|||
{ |
|||
label: '发货记录单号', |
|||
field: 'shipmentRecordNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150, |
|||
}, |
|||
isSearch: true |
|||
}, |
|||
{ |
|||
label: '发货方式', |
|||
field: 'shipmentType', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
table: { |
|||
width: 150, |
|||
}, |
|||
dictType: DICT_TYPE.DELIVER_METHOD, |
|||
dictClass: 'string', |
|||
form: { |
|||
component: 'SelectV2' |
|||
} |
|||
}, |
|||
{ |
|||
label: '客户订单号', |
|||
field: 'customerOrderNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150, |
|||
}, |
|||
isSearch: true |
|||
}, |
|||
{ |
|||
label: '操作', |
|||
field: 'action', |
|||
isForm: false, |
|||
isDetail: false, |
|||
isTable: false, |
|||
table: { |
|||
width: 150, |
|||
fixed: 'right' |
|||
} |
|||
} |
|||
])) |
Loading…
Reference in new issue