From 701aa5c47d11bb4b5d564692351db495ff9be504 Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Mon, 21 Oct 2024 15:00:19 +0800
Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E7=B4=A2=E8=B5=94=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../purchaseClaimRequest/index.vue | 250 +++++--------
.../invoicingcalendar.data.ts | 117 ++++++
.../purchaseClaimRequestMain.data.ts | 332 ------------------
3 files changed, 201 insertions(+), 498 deletions(-)
create mode 100644 src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/invoicingcalendar.data.ts
delete mode 100644 src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/purchaseClaimRequestMain.data.ts
diff --git a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue
index ee6472517..700eeb1b5 100644
--- a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue
+++ b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -11,12 +11,12 @@
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
- :allSchemas="PurchaseClaimRequestMain.allSchemas"
+ :allSchemas="Invoicingcalendar.allSchemas"
/>
-
-
-
- {{ row.number }}
+
+
+ {{ row.code }}
-
-
+
+
-
+
-
+
diff --git a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/invoicingcalendar.data.ts b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/invoicingcalendar.data.ts
new file mode 100644
index 000000000..6884ce35f
--- /dev/null
+++ b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/invoicingcalendar.data.ts
@@ -0,0 +1,117 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+import { fa } from 'element-plus/es/locale'
+
+// 表单校验
+export const InvoicingcalendarRules = reactive({
+ beginDay: [required],
+ endDay: [required],
+ concurrencyStamp: [required],
+})
+
+export const Invoicingcalendar = useCrudSchemas(reactive([
+ {
+ label: 'id',
+ field: 'id',
+ sort: 'custom',
+ isForm: false,
+ isTable: false
+ },
+ {
+ label: '开始日期',
+ field: 'beginDay',
+ sort: 'custom',
+ dictType: DICT_TYPE.SYSTEM_DAY,
+ dictClass: 'string',
+ },
+ {
+ label: '结束日期',
+ field: 'endDay',
+ sort: 'custom',
+ dictType: DICT_TYPE.SYSTEM_DAY,
+ dictClass: 'string',
+ },
+ {
+ label: '描述',
+ field: 'descriiption',
+ sort: 'custom',
+ },
+ {
+ label: '是否可用',
+ field: 'available',
+ sort: 'custom',
+ isSearch: true,
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ form: {
+ component: 'Switch',
+ value: 'TRUE',
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE'
+ }
+ },
+ },
+ {
+ label: '备注',
+ field: 'remark',
+ sort: 'custom',
+ },
+ {
+ label: '扩展属性',
+ field: 'extraProperties',
+ sort: 'custom',
+ isTable: false,
+ isForm:false,
+ },
+ {
+ label: '并发乐观锁',
+ field: 'concurrencyStamp',
+ sort: 'custom',
+ isTable: false,
+ isForm:false,
+ form: {
+ component: 'InputNumber',
+ value: 0
+ },
+ },
+ {
+ label: '地点ID',
+ field: 'siteId',
+ sort: 'custom',
+ isTable: false,
+ isForm:false,
+ },
+ {
+ 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')]
+ }
+ },
+ isForm: false,
+ isTable: true,
+ },
+ {
+ label: '创建人',
+ field: 'creator',
+ sort: 'custom',
+ isTable: true,
+ isForm:false,
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isForm: false,
+ table: {
+ width: 150,
+ fixed: 'right'
+ }
+ }
+]))
diff --git a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/purchaseClaimRequestMain.data.ts b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/purchaseClaimRequestMain.data.ts
deleted file mode 100644
index 66e1effc6..000000000
--- a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/purchaseClaimRequestMain.data.ts
+++ /dev/null
@@ -1,332 +0,0 @@
-import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
-import { TableColumn } from '@/types/table'
-
-import { dateFormatter } from '@/utils/formatTime'
-import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
-
-const { t } = useI18n() // 国际化
-
-// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
-const queryParams = {
- pageSize:10,
- pageNo:1,
- code:'PurchaseClaimRequest'
-}
- const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
- const requestsettingData =data?.list[0]||{}
-
- // 获取当前操作人的部门
-import { useUserStore } from '@/store/modules/user'
-const userStore = useUserStore()
-const userDept = userStore.userSelfInfo.dept
- // id 转str 否则form回显匹配不到
- userDept.id = userDept.id.toString()
-const userDeptArray:any = [userDept]
-
-/**
- * @returns {Array} 采购索赔申请主表
- */
-export const PurchaseClaimRequestMain = useCrudSchemas(([
- {
- label: '单据号',
- field: 'number',
- sort: 'custom',
- isSearch: true,
- },
- {
- label: '供应商代码',
- field: 'supplierCode',
- sort: 'custom',
- isSearch: true,
- },
- {
- label: '索赔时间',
- field: 'claimTime',
- sort: 'custom',
- 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')]
- }
- },
- form: {
- component: 'DatePicker',
- componentProps: {
- type: 'datetime',
- valueFormat: 'x'
- }
- },
- },
- //0:新增1:已关闭2:审批中3:审批驳回4:审批通过5:开票中6:已完成
- {
- label: '状态',
- field: 'status',
- sort: 'custom',
- isSearch: true,
- form: {
- component: 'Radio'
- },
- },
- {
- label: '供应商发票申请单号',
- field: 'supplierinvoiceNumber',
- sort: 'custom',
- isSearch: true,
- },
- {
- label: '备注',
- field: 'remark',
- sort: 'custom',
- isSearch: true,
- },
- {
- label: '创建时间',
- field: 'createTime',
- formatter: dateFormatter,
- detail: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
- },
- sort: 'custom',
- table: {
- width: 180
- },
- form: {
- component: 'DatePicker',
- componentProps: {
- style: {width:'100%'},
- type: 'datetime',
- dateFormat: 'YYYY-MM-DD HH:mm:ss',
- valueFormat: 'x',
- }
- },
- isForm: false,
- 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')]
- },
- },
- },
- {
- label: '创建者',
- field: 'creator',
- sort: 'custom',
- table: {
- width: 150
- },
- isForm: false
- },
- {
- label: '操作',
- field: 'action',
- isDetail: false,
- isForm: false,
- table: {
- width: 300,
- fixed: 'right'
- },
- }
-]))
-
-//表单校验
-export const PurchaseClaimRequestMainRules = reactive({
- // requestNumber: [
- // { required: true, message: '请选择申请单号', trigger: 'change' }
- // ],
- departmentCode: [
- { required: true, message: '请输入部门', trigger: 'blur' }
- ],
- autoCommit: [
- { required: true, message: '请选择是否自动提交', trigger: 'change' }
- ],
- autoAgree: [
- { required: true, message: '请选择是否自动通过', trigger: 'change' }
- ],
- autoExecute: [
- { required: true, message: '请选择是否自动执行', trigger: 'change' }
- ],
- directCreateRecord: [
- { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
- ],
- // businessType: [
- // { required: true, message: '请输入业务类型', trigger: 'blur' }
- // ],
-})
-
-/**
- * @returns {Array} 采购索赔申请子表
- */
-export const PurchaseClaimRequestDetail = useCrudSchemas(reactive([
- {
- label: '单据号',
- field: 'number',
- sort: 'custom',
- table: {
- width: 180
- },
- isTableForm: false,
- form: {
- componentProps: {
- disabled: true
- }
- }
- },
- {
- label: '物料代码',
- field: 'itemCode',
- sort: 'custom',
- table: {
- width: 150
- },
- },
- {
- label: '物料名称',
- field: 'itemName',
- sort: 'custom',
- table: {
- width: 150
- },
- isTableForm: false,
- isForm: false,
- },
- {
- label: '计量单位',
- field: 'uom',
- dictType: DICT_TYPE.UOM,
- dictClass: 'string',
- isTable: true,
- sort: 'custom',
- table: {
- width: 150
- },
- tableForm: {
- type: 'Select'
- }
- },
- {
- label: '索赔数量',
- field: 'claimQty',
- sort: 'custom',
- table: {
- width: 150
- },
- form: {
- component: 'InputNumber',
- componentProps: {
- min: 1,
- precision: 6
- }
- },
- tableForm: {
- type: 'InputNumber',
- min: 1,
- precision: 6
- }
- },
- {
- label: '索赔金额',
- field: 'claimAmount',
- sort: 'custom',
- table: {
- width: 150
- },
- form: {
- component: 'InputNumber',
- componentProps: {
- min: 1,
- precision: 6
- }
- },
- tableForm: {
- type: 'InputNumber',
- min: 1,
- precision: 6
- }
- },
- {
- label: '创建时间',
- field: 'createTime',
- formatter: dateFormatter,
- detail: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
- },
- sort: 'custom',
- table: {
- width: 180
- },
- form: {
- component: 'DatePicker',
- componentProps: {
- style: {width:'100%'},
- type: 'datetime',
- dateFormat: 'YYYY-MM-DD HH:mm:ss',
- valueFormat: 'x',
- }
- },
- isTableForm: false,
- isForm: false
- },
- {
- label: '创建者',
- field: 'creator',
- sort: 'custom',
- table: {
- width: 150
- },
- isTableForm: false,
- isForm: false
- },
- {
- label: '操作',
- field: 'action',
- isDetail: false,
- isForm: false ,
- isTable:false,
- table: {
- width: 150,
- fixed: 'right'
- },
- isTableForm:false,
- }
-]))
-
-//表单校验
-export const PurchaseClaimRequestDetailRules = reactive({
- countDetailNumber: [
- { required: true, message: '请输入盘点明细号', trigger: 'blur' }
- ],
- packingNumber: [
- { required: true, message: '请选择包装号', trigger: 'change' }
- ],
- batch: [
- { required: true, message: '请输入批次', trigger: 'blur' }
- ],
- locationCode: [
- { required: true, message: '请选择库位代码', trigger: 'change' }
- ],
- inventoryStatus: [
- { required: true, message: '请选择库存状态', trigger: 'change' }
- ],
- inventoryQty: [
- { required: true, message: '请输入库存数量', trigger: 'blur' }
- ],
- countQty: [
- { required: true, message: '请输入盘点数量', trigger: 'blur' }
- ],
- adjustQty: [
- { required: true, message: '请输入调整数量', trigger: 'blur' }
- ],
- // number: [
- // { required: true, message: '请输入单据号', trigger: 'blur' }
- // ],
- itemCode: [
- { required: true, message: '请选择物料代码', trigger: 'change' }
- ],
-})