diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts
index 70665df76..b11c59122 100644
--- a/src/locales/en-US.ts
+++ b/src/locales/en-US.ts
@@ -1152,6 +1152,8 @@ export default {
'要货预测-供应商':'Demand forecast-Supplier',
全选:'All',
计划员:'Planner',
+ 最小值:'Min',
+ 最大值:'Max',
},
diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts
index 9e6733363..35e3cd8fa 100644
--- a/src/locales/zh-CN.ts
+++ b/src/locales/zh-CN.ts
@@ -1152,6 +1152,8 @@ export default {
'要货预测-供应商':'要货预测-供应商',
全选:'全选',
计划员:'计划员',
+ 最小值:'最小值',
+ 最大值:'最大值',
},
diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMainDifference/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMainDifference/index.vue
deleted file mode 100644
index 2e12c467d..000000000
--- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMainDifference/index.vue
+++ /dev/null
@@ -1,325 +0,0 @@
-
-
-
-
-
-
-
- {{' 到 '}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ row.number }}
-
-
-
- {{ row.differencePrice }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ row.differencePrice }}
-
-
-
-
-
-
diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/index.vue
new file mode 100644
index 000000000..13e1a4e07
--- /dev/null
+++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/index.vue
@@ -0,0 +1,468 @@
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.number }}
+
+
+
+ {{ Number(row.differencePrice).toFixed(2) }}
+
+
+
+
+
+
+
+
+ {{ row.differencePrice }}
+
+
+
+
+
+
+
+
+./supplierinvoiceRequestMainDifference.data
\ No newline at end of file
diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMainDifference/supplierinvoiceRecordMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts
similarity index 53%
rename from src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMainDifference/supplierinvoiceRecordMain.data.ts
rename to src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts
index 750b54375..652c04092 100644
--- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMainDifference/supplierinvoiceRecordMain.data.ts
+++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts
@@ -2,32 +2,159 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import { accountantFormart } from '@/utils/formatter'
+import * as SupplierApi from '@/api/wms/supplier'
+import * as SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain'
+import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
+const { t } = useI18n() // 国际化
+
+import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
+import * as supplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail'
+
+// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
+const queryParams = {
+ pageSize: 10,
+ pageNo: 1,
+ code: 'PurchaseInvoiceRequest'
+}
+const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
+const requestsettingData = data?.list[0] || {}
+
+ // 获取当前操作人的部门
+ import { useUserStore } from '@/store/modules/user'
+ import { TableColumn } from '@/types/table'
+ const userStore = useUserStore()
+ const userDept = userStore.userSelfInfo.dept
+ // id 转str 否则form回显匹配不到
+ userDept.id = userDept.id.toString()
+ const userDeptArray:any = [userDept]
+
+const procurementCreators = await SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode({ roleCode: 'purchase',pageSize: 1000,pageNo: 1,sort: '',by: 'ASC' })
/**
- * @returns {Array} 供应商发票记录主表
+ * @returns {Array} 采购员列表
*/
-export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([
+export const PurchaseMemberInfo = useCrudSchemas(reactive([
{
- label: '单据号',
- field:'number',
+ label: '用户编号',
+ field: 'id',
+ table: {
+ width: 180,
+ },
+ },
+ {
+ label: '用户名称',
+ field: 'username',
+ table: {
+ width: 180,
+ },
+ },
+ {
+ label: '用户昵称',
+ field: 'nickname',
+ table: {
+ width: 180,
+ },
+ }
+]))
+
+/**
+ * @returns {Array} 采购订单或者采购退货单
+ */
+export const PurchaseReceiptOrReturnRecordDetail = useCrudSchemas(reactive([
+ {
+ label: '单据类型',
+ field: 'billType'
+ },
+ {
+ label: '收货日期',
+ field: 'deliveryDate',
sort: 'custom',
+ isDetail:false,
+ isTable: true,
+ isForm:false,
+ isTableForm:false,
+ isSearch:true,
+ formatter: dateFormatter2,
+ search: {
+ component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD',
+ type: 'daterange',
+ defaultTime: [new Date('1 '), new Date('1 ')]
+ }
+ },
+ },
+ {
+ label: '待开票单据号',
+ field: 'recvBillNum',
+ table: {
+ width: 180,
+ },
+ },
+ {
+ label: '供应商发货单号',
+ field: 'asnBillNum',
table: {
width: 180,
- fixed: 'left'
},
- isSearch: false
},
{
- label: '发票申请单号',
- field:'requestNumber',
+ label: '供应商代码',
+ field: 'supplierCode'
+ },
+ {
+ label: '订单号',
+ field: 'poNumber'
+ },
+ {
+ label: '订单行',
+ field: 'poLine'
+ },
+ {
+ label: '采购价格',
+ field: 'purchasePrice'
+ },
+ {
+ label: '可开票数量',
+ field: 'invoicableQuantity'
+ },
+ {
+ label: '货币',
+ field: 'currency',
+ },
+ {
+ label: '物料代码',
+ field: 'itemCode'
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ isTable: true,
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ isTableForm: false,
+ isForm: false
+ }
+]))
+
+
+/**
+ * @returns {Array} 供应商发票申请主表
+ */
+export const SupplierinvoiceRequestMain = useCrudSchemas(reactive([
+ {
+ label: '单据号',
+ field: 'number',
sort: 'custom',
table: {
width: 180,
fixed: 'left'
},
- sortSearchDefault:1,
- sortTableDefault:1,
- isSearch: true
+ isSearch: true,
+ isForm: false
},
+
{
label: '供应商代码',
field: 'supplierCode',
@@ -36,45 +163,54 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([
width: 150
},
sortTableDefault:1,
- isSearch: true
+ isSearch: true,
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ enterSearch:true,
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '供应商信息', // 查询弹窗标题
+ searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
+ searchPage: SupplierApi.getSupplierPageSCP // 查询弹窗所需分页方法
+ }
+ }
},
{
- label: '供应商名称',
- field: 'supplierName',
+ label: '订单类型',
+ field: 'orderType',
+ dictType: DICT_TYPE.PURCHASE_INVOICE_ORDER_TYPE,
+ dictClass: 'string',
+ isTable: false,
sort: 'custom',
table: {
- width: 180,
+ width: 150
},
- sortTableDefault:2,
- isForm: false,
- isSearch: true
},
{
- label: '税率',
- field: 'taxRate',
+ label: '供应商名称',
+ field: 'supplierName',
sort: 'custom',
table: {
- width: 150
+ width: 180,
},
- sortTableDefault:3,
- form: {
- component: 'InputNumber',
- }
+ sortTableDefault:2,
+ isSearch: true,
+ isForm: false
},
-
-
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.SUPPLIERINVOICE_REQUEST_STATUS,
dictClass: 'string',
isTable: true,
- sortTableDefault:7,
isForm:false,
sort: 'custom',
table: {
width: 150
},
+ sortTableDefault:9,
isSearch: true,
form: {
value: '1',
@@ -83,81 +219,210 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([
}
}
},
-
- // {
- // label: '申请单号',
- // field: 'requestNumber',
- // sort: 'custom',
- // table: {
- // width: 180,
- // },
- // isTable: false,
- // isSearch: true
- // },
+ //子表数据,仅是查询条件
{
- label: '订单号',
- field: 'poNumber',
+ label: '货运单号',
+ field: 'asnBillNum',
sort: 'custom',
+ table: {
+ width: 180,
+ fixed: 'left'
+ },
+ isTableForm:false,
isTable:false,
+ isDetail:false,
+ isSearch: true,
+ isForm: false,
+ },
+ {
+ label: '系统未税金额',
+ field: 'amount',
+ formatter: accountantFormart,
table: {
width: 150
},
+ sortTableDefault:8,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ precision: 2,
+ disabled: true,
+ }
+ },
+ tableForm: {
+ type: 'InputNumber',
+ precision: 2,
+ }
},
{
- label: '金税票号',//金税票号
- field: 'goldenTaxInvoiceNumber',
+ label: '税率(%)',
+ field: 'taxRate',
+ dictType: DICT_TYPE.TAX_RATE_DICT,
+ dictClass: 'string',
+ sortTableDefault:3,
+ isTable: true,
sort: 'custom',
table: {
width: 150
},
- sortTableDefault:5,
- isSearch: true
},
+
+ // {
+ // label: '未税金额',
+ // field: 'beforeTaxAmount',
+ // formatter: accountantFormart,
+ // table: {
+ // width: 150
+ // },
+ // sortTableDefault:3,
+ // isForm:false,
+ // isTableForm:false
+ // },
+ // {
+ // label: '税额',
+ // field: 'totalTaxAmount',
+ // formatter: accountantFormart,
+ // table: {
+ // width: 150
+ // },
+ // sortTableDefault:3,
+ // isForm:false,
+ // isTableForm:false
+ // },
+ // {
+ // label: '价税合计金额',
+ // field: 'adTaxAmount',
+ // formatter: accountantFormart,
+ // table: {
+ // width: 150
+ // },
+ // sortTableDefault:3,
+ // isForm:false,
+ // isTableForm:false
+ // },
{
- label: '未税差额',
- field: 'beforeTaxDiffAmount',
+ label: '系统税额',
+ field: 'taxAmount',
formatter: accountantFormart,
table: {
width: 150
},
- sortTableDefault:5,
- isForm:false,
- isTableForm:false
+ sortTableDefault:6,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ precision: 2,
+ disabled: true,
+ }
+ },
+ tableForm: {
+ type: 'InputNumber',
+ precision: 2,
+ }
},
{
- label: '税额差异',
- field: 'taxAmountDiff',
+ label: '系统价税合计',
+ field: 'afterTaxAmount',
formatter: accountantFormart,
table: {
width: 150
},
- sortTableDefault:5,
- isForm:false,
- isTableForm:false
+ sortTableDefault:7,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ precision: 2,
+ disabled: true,
+ }
+ },
+ tableForm: {
+ type: 'InputNumber',
+ min: 0,
+ precision: 2,
+ disabled: true,
+ }
},
{
- label: '价税合计差额',
- field: 'totalTaxDiffAmount',
+ label: '索赔金额',
+ field: 'claimAmount',
formatter: accountantFormart,
table: {
width: 150
},
- sortTableDefault:5,
+ isTable:false,
+ isTableForm:false,
isForm:false,
- isTableForm:false
+ isDetail:false,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 0,
+ precision: 2,
+ }
+ },
+ tableForm: {
+ type: 'InputNumber',
+ min: 0,
+ precision: 2,
+ }
},
-
+ // {
+ // label: '调整价差',
+ // field: 'discountAmount',
+ // formatter: accountantFormart,
+ // table: {
+ // width: 150
+ // },
+ // isTable:false,
+ // form: {
+ // component: 'InputNumber',
+ // componentProps: {
+ // precision: 2,
+ // }
+ // },
+ // tableForm: {
+ // type: 'InputNumber',
+ // min: 0,
+ // precision: 2,
+ // }
+ // },
+ // {
+ // label: '调整税额',
+ // field: 'adjustingTaxAmount',
+ // table: {
+ // width: 150
+ // },
+ // isTable:false,
+ // form: {
+ // component: 'InputNumber',
+ // componentProps: {
+ // precision: 2,
+ // }
+ // },
+ // tableForm: {
+ // type: 'InputNumber',
+ // min: 0,
+ // precision: 2,
+ // }
+ // },
{
- label: '系统税额',
- field: 'taxAmount',
+ label: '折扣金额',
+ field: 'discountAmount1',
formatter: accountantFormart,
- sort: 'custom',
table: {
width: 150
},
- sortTableDefault:8,
+ isTable:false,
form: {
component: 'InputNumber',
+ componentProps: {
+ precision: 2,
+ }
+ },
+ tableForm: {
+ type: 'InputNumber',
+ min: 0,
+ precision: 2,
}
},
{
@@ -168,8 +433,14 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([
width: 150
},
sortTableDefault:3,
- isForm:false,
- isTableForm:false
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ precision: 2,
+ disabled: true,
+ }
+ },
+ isTableForm:false,
},
{
label: '税额',
@@ -178,9 +449,15 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([
table: {
width: 150
},
- sortTableDefault:3,
- isForm:false,
- isTableForm:false
+ sortTableDefault:4,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ precision: 2,
+ disabled: true,
+ }
+ },
+ isTableForm:false,
},
{
label: '价税合计金额',
@@ -189,9 +466,15 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([
table: {
width: 150
},
- sortTableDefault:3,
- isForm:false,
- isTableForm:false
+ sortTableDefault:5,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ precision: 2,
+ disabled: true,
+ }
+ },
+ isTableForm:false,
},
{
label: '是否有价差',
@@ -205,7 +488,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([
table: {
width: 150
},
- sortTableDefault:3,
+ sortTableDefault:5,
},
{
label: '价差说明',
@@ -220,147 +503,96 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([
sortTableDefault:5,
},
{
- label: '系统价税合计',//税后金额
- field: 'afterTaxAmount',
+ label: '未税差额',
+ field: 'beforeTaxDiffAmount',
formatter: accountantFormart,
- sort: 'custom',
table: {
width: 150
},
- sortTableDefault:9,
- form: {
- component: 'InputNumber',
- }
- },
-
- {
- label: '价差',//总差额
- field: 'totalDifference',
- table: {
- width: 150
- },
- isTable: false,
+ sortTableDefault:5,
form: {
component: 'InputNumber',
componentProps: {
- min: 0,
- precision: 6,
+ precision: 2,
+ disabled: true,
}
},
- tableForm: {
- type: 'InputNumber',
- min: 0,
- precision: 6,
- }
- },
-
- {
- label: '系统未税金额',
- field: 'amount',
- formatter: accountantFormart,
- sort: 'custom',
- table: {
- width: 150
- },
- sortTableDefault:8,
- form: {
- component: 'InputNumber',
- }
- },
-
-
-
- {
- label: '索赔金额',
- field: 'claimAmount',
- formatter: accountantFormart,
- sort: 'custom',
- table: {
- width: 150
- },
- isTable: false,
- form: {
- component: 'InputNumber',
- }
+ isTableForm:false,
},
{
- label: '调整价差',
- field: 'discountAmount',
+ label: '税额差异',
+ field: 'taxAmountDiff',
formatter: accountantFormart,
- sort: 'custom',
table: {
width: 150
},
- isDetail:false,
- isTable: false,
+ sortTableDefault:5,
form: {
component: 'InputNumber',
- }
- },
- {
- label: '调整税额',
- field: 'adjustingTaxAmount',
- formatter: accountantFormart,
- sort: 'custom',
- isDetail:false,
- table: {
- width: 150
+ componentProps: {
+ precision: 2,
+ disabled: true,
+ }
},
- isTable: false,
- form: {
- component: 'InputNumber',
- }
+ isTableForm:false,
},
-
{
- label: '未税差额',
- field: 'untaxedDifference',
+ label: '价税合计差额',
+ field: 'totalTaxDiffAmount',
formatter: accountantFormart,
table: {
width: 150
},
+ sortTableDefault:5,
+ isTableForm:false,
form: {
component: 'InputNumber',
componentProps: {
- min: 0,
- precision: 6,
+ precision: 2,
+ disabled: true,
}
},
- isTable: false,
- tableForm: {
- type: 'InputNumber',
- min: 0,
- precision: 6,
- }
},
+
+ // {
+ // label: '总差额',
+ // field: 'totalDifference',
+ // formatter: accountantFormart,
+ // table: {
+ // width: 150
+ // },
+ // isTable:false,
+ // form: {
+ // component: 'InputNumber',
+ // componentProps: {
+ // precision: 2,
+ // }
+ // },
+ // tableForm: {
+ // type: 'InputNumber',
+ // min: 0,
+ // precision: 2,
+ // }
+ // },
{
- label: '含税差额',
- field: 'taxInclusiveDifference',
- formatter: accountantFormart,
+ label: '金税票号',
+ field: 'goldenTaxInvoiceNumber',
table: {
- width: 150
+ width: 150,
},
- isTable: false,
- form: {
- component: 'InputNumber',
+ sortTableDefault:10,
+ form:{
componentProps: {
- min: 0,
- precision: 6,
+ maxlength:23,
+ showWordLimit:true
}
- },
- tableForm: {
- type: 'InputNumber',
- min: 0,
- precision: 6,
}
},
{
label: '快递单号',
field: 'expressTrackingNumber',
- sort: 'custom',
isTable:false,
isForm:false,
- isSearch:false,
table: {
width: 150
},
@@ -368,25 +600,24 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([
{
label: '开票日期',
field: 'invoiceTime',
- isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
- form:{
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ sortTableDefault:11,
+ form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
- dateFormat: 'YYYY-MM-DD',//YYYY-MM-DD
- valueFormat: 'x',//数据转成时间戳
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
}
},
- sortTableDefault:4,
- sort: 'custom',
- table: {
- width: 180
- },
},
// {
// label: '采购审批人',
@@ -400,89 +631,89 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([
// isTableForm: false,
// isForm:false,
// isSearch:false,
- // sortTableDefault:10
+ // sortTableDefault:12
// },
{
label: '过账日期',
field: 'postingDate',
- formatter: dateFormatter,
- detail: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
- },
- form:{
- component: 'DatePicker',
- componentProps: {
- style: {width:'100%'},
- type: 'datetime',
- dateFormat: 'YYYY-MM-DD',//YYYY-MM-DD
- valueFormat: 'x',//数据转成时间戳
- }
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
- isTable: true,
- sortTableDefault:6,
sort: 'custom',
table: {
width: 180
},
- isSearch: true,
- search: {
- value:[],
+ isTable:false,
+ isDetail:false,
+ form: {
component: 'DatePicker',
componentProps: {
- valueFormat: 'YYYY-MM-DD HH:mm:ss',
- dateFormat: 'YYYY-MM-DD',
- type: 'daterange',
- defaultTime: [new Date('1 '), new Date('1 ')]
+ disabled: true,
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
}
},
},
+
{
- label: '创建日期',
- field: 'createTime',
+ label: '申请时间',
+ field: 'requestTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
- form:{
- component: 'DatePicker',
- componentProps: {
- style: {width:'100%'},
- type: 'datetime',
- dateFormat: 'YYYY-MM-DD',//YYYY-MM-DD
- valueFormat: 'x',//数据转成时间戳
- }
- },
- isTable: true,
- sortTableDefault:6,
sort: 'custom',
table: {
width: 180
},
- isSearch: true,
- search: {
- value:[],
+ isTable:false,
+ isForm:false,
+ form: {
component: 'DatePicker',
componentProps: {
- valueFormat: 'YYYY-MM-DD HH:mm:ss',
- dateFormat: 'YYYY-MM-DD',
- type: 'daterange',
- defaultTime: [new Date('1 '), new Date('1 ')]
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
}
},
},
- //子表数据,仅是查询条件
{
- label: '货运单号',
- field: 'asnBillNum',
+ label: '部门',
+ field: 'departmentCode',
sort: 'custom',
table: {
- width: 180,
- fixed: 'left'
+ width: 150
},
+ isTable:false,
isTableForm:false,
+ isForm:false,
+ formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
+ return userDeptArray.find((account) => account.id == cellValue)?.name
+ },
+ form: {
+ value: userDept.id,
+ component: 'Select',
+ api: () => userDeptArray,
+ componentProps: {
+ disabled: true,
+ optionsAlias: {
+ labelField: 'name',
+ valueField: 'id'
+ }
+ }
+ }
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ table: {
+ width: 150
+ },
isTable:false,
- isDetail:false,
- isSearch: true,
+ sortTableDefault:1001,
isForm: false,
},
{
@@ -500,55 +731,11 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([
isForm: false,
},
{
- label: '财务凭证号',
- field: 'voucherNumber',
- sort: 'custom',
- table: {
- width: 180,
- },
+ label: '创建时间',
+ field: 'createTime',
isTable:true,
- sortTableDefault:6,
- isForm: false
- },
- {
- label: '业务类型',
- field:'businessType',
- sort: 'custom',
- isTable:false,
- isTableForm:false,
- isDetail:false,
- table: {
- width: 150
- },
- },
- {
- label: '出库事务类型',
- field: 'outTransactionType',
- sort: 'custom',
- isTable:false,
- isTableForm:false,
- isDetail:false,
- table: {
- width: 150
- },
- },
- {
- label: '入库事务类型',
- field: 'inTransactionType',
- isTable:false,
- isTableForm:false,
- isDetail:false,
- sort: 'custom',
- table: {
- width: 150
- },
- },
- {
- label: '执行时间',
- field: 'executeTime',
- isTable:false,
- isTableForm:false,
formatter: dateFormatter,
+ sortTableDefault:1000,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
@@ -556,40 +743,42 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([
table: {
width: 180
},
- },
- {
- label: '生效日期',
- field: 'activeDate',
- isTable:false,
- isTableForm:false,
- formatter: dateFormatter,
- detail: {
- dateFormat: 'YYYY-MM-DD'
+ isForm: false,
+ isSearch: true,
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetimerange',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
},
- sort: 'custom',
- table: {
- width: 180
+ search: {
+ value:[],
+ component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ type: 'datetimerange',
+ defaultTime: [new Date('1 '), new Date('1 ')]
+ }
},
},
{
- label: '申请时间',
- field: 'requestTime',
- isTable:false,
- isTableForm:false,
- formatter: dateFormatter,
- detail: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
- },
+ label: '最后更新者',
+ field: 'updater',
sort: 'custom',
table: {
- width: 180
+ width: 150
},
+ isTable:false,
+ isForm: false,
},
{
- label: '截止时间',
- field: 'dueTime',
- isTable:false,
- isTableForm:false,
+ label: '最后更新时间',
+ field: 'updateTime',
+ isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@@ -598,103 +787,153 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([
table: {
width: 180
},
+ isForm: false,
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ type: 'datetime',
+
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
},
{
- label: '部门',
- field: 'departmentCode',
- isTable:false,
- isTableForm:false,
- sort: 'custom',
+ label: '采购价格审批人',
+ field: 'procurementCreator',
table: {
width: 150
},
- },
- {
- label: '代码',
- field: 'code',
+ sortTableDefault:14,
+ isForm: true,
isTable:false,
- isTableForm:false,
isDetail:false,
- sort: 'custom',
+ form: {
+ component: 'Select',
+ api: () => procurementCreators.list,
+ componentProps: {
+ optionsAlias: {
+ labelField: 'nickname',
+ valueField: 'id'
+ }
+ },
+ // labelMessage: '信息提示说明!!!',
+ // componentProps: {
+ // isSearchList: true, // 开启查询弹窗
+ // hiddenFilterButton:true,//是否隐藏筛选按钮
+ // dialogWidth:'665px',//搜索出来弹窗的宽度
+ // searchListPlaceholder: '请选择采购员', // 输入框占位文本
+ // searchField: 'id', // 查询弹窗赋值字段
+ // searchTitle: '采购员信息', // 查询弹窗标题
+ // searchAllSchemas: PurchaseMemberInfo.allSchemas, // 查询弹窗所需类
+ // searchPage: SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode, // 查询弹窗所需分页方法
+ // searchCondition: [{
+ // key: 'roleCode', // 查询列表中字段
+ // value: 'purchase', // 指查询具体值
+ // isMainValue: false // 表示查询条件不是主表的字段的值
+ // }]
+ // }
+ }
+ },
+ {
+ label: '采购价格审批人',
+ field: 'procurementCreatorName',
table: {
width: 150
},
+ sortTableDefault:14,
+ isForm: false,
+ isTable:true,
+ isDetail:false,
+ form: {
+ component: 'Select',
+ api: () => procurementCreators.list,
+ componentProps: {
+ optionsAlias: {
+ labelField: 'nickname',
+ valueField: 'id'
+ }
+ },
+ }
},
+ // {
+ // label: '采购审批人',
+ // field: 'procurementCreatorName',
+ // sort: 'custom',
+ // table: {
+ // width: 180
+ // },
+ // isTable:true,
+ // isDetail: true,
+ // isTableForm: false,
+ // isForm:false,
+ // isSearch:false,
+ // sortTableDefault:12
+ // },
+
{
- label: '接口类型',
- field: 'interfaceType',
- dictType: DICT_TYPE.INTERFACE_TYPE,
- dictClass: 'string',
- isTable:false,
- isDetail:false,
- isTableForm:false,
+ label: '采购审批时间',
+ field: 'procurementCreateTime',
+ isTable: true,
+ sortTableDefault:13,
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ form:{
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',//YYYY-MM-DD
+ valueFormat: 'x',//数据转成时间戳
+ }
+ },
sort: 'custom',
table: {
- width: 150
+ width: 180
},
+ isForm: false,
},
{
- label: '是否可用',
- field: 'available',
- dictType: DICT_TYPE.TRUE_FALSE,
- isTable:false,
- isTableForm:false,
- dictClass: 'string',
- },
- {
- label: '创建者',
- field: 'creator',
+ label: '财务审批人',
+ field: 'financialCreatorName',
sort: 'custom',
- sortTableDefault:1000,
- isTable: false,
table: {
width: 150
},
+ sortTableDefault:14,
+ isForm: false,
},
{
- label: '创建时间',
- field: 'createTime',
- isTable: false,
- sortTableDefault:1001,
- formatter: dateFormatter,
- detail: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
- },
- sort: 'custom',
+ label: '采购驳回原因',
+ field: 'purchaseRejectCause',
table: {
width: 180
},
+ sortTableDefault:16,
+ isTable: true,
+ isSearch: false,
+ isForm: false,
+ isDetail:false,
},
{
- label: '采购审批人',
- field: 'procurementCreatorName',
- sort: 'custom',
+ label: '财务驳回原因',
+ field: 'financeRejectCause',
table: {
width: 180
- },
- isTable:true,
- isDetail: true,
- isTableForm: false,
- isForm:false,
- isSearch:false,
- sortTableDefault:10
+ },
+ sortTableDefault:17,
+ isTable: true,
+ isSearch: false,
+ isForm: false,
+ isDetail:false,
},
- // {
- // label: '采购审批人代码',
- // field: 'procurementCreator',
- // sortTableDefault:1002,
- // sort: 'custom',
- // table: {
- // width: 150
- // },
- // isTable: false,
- // isForm: false,
- // },
{
- label: '采购审批时间',
- field: 'procurementCreateTime',
- sortTableDefault:11,
+ label: '财务审批时间',
+ field: 'financialCreateTime',
isTable: true,
+ sortTableDefault:15,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@@ -715,20 +954,33 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([
isForm: false,
},
{
- label: '财务审批人',
- field: 'financialCreatorName',
+ label: '供应商审批人',
+ field: 'supplierCreator',
sort: 'custom',
+ isTable:false,
+ isDetail:false,
+ sortTableDefault:1006,
table: {
- width: 150
+ width: 180
},
- sortTableDefault:12,
isForm: false,
},
{
- label: '财务审批时间',
- field: 'financialCreateTime',
- sortTableDefault:13,
- isTable: true,
+ label: '供应商审批人',
+ field: 'supplierCreatorName',
+ sort: 'custom',
+ isTable:false,
+ isDetail:true,
+ sortTableDefault:1006,
+ table: {
+ width: 180
+ },
+ isForm: false,
+ },
+ {
+ label: '供应商审批时间',
+ field: 'supplierCreateTime',
+ isTable:false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@@ -748,82 +1000,113 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([
},
isForm: false,
},
- // {
- // label: '采购驳回原因',
- // field: 'purchaseRejectCause',
- // table: {
- // width: 180
- // },
- // sortTableDefault:14,
- // isTable: true,
- // isSearch: false,
- // isForm: false,
- // isDetail:false,
- // },
- // {
- // label: '财务驳回原因',
- // field: 'financeRejectCause',
- // table: {
- // width: 180
- // },
- // sortTableDefault:15,
- // isTable: true,
- // isSearch: false,
- // isForm: false,
- // isDetail:false,
- // },
{
- label: '供应商审批人',
- field: 'supplierCreatorName',
+ label: '备注',
+ field: 'remark',
sort: 'custom',
- isTable:false,
- isTableForm:false,
table: {
width: 150
},
- isForm: false,
+ isForm:false,
+ isTable: false,
},
{
- label: '供应商审批时间',
- field: 'supplierCreateTime',
- isTable:false,
+ label: '自动提交',
+ field: 'autoCommit',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: false,
+ isForm:false,
isTableForm:false,
- formatter: dateFormatter,
- detail: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ isDetail:false,
+ sort: 'custom',
+ table: {
+ width: 150
},
+ form: {
+ component: 'Switch',
+ value: requestsettingData.autoCommit,
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE',
+ disabled: true,
+ }
+ }
+ },
+ {
+ label: '自动通过',
+ field: 'autoAgree',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: false,
+ isForm:false,
+ isTableForm:false,
+ isDetail:false,
sort: 'custom',
table: {
- width: 180
+ width: 150
},
- isForm: false,
+ form: {
+ component: 'Switch',
+ value: requestsettingData.autoAgree,
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE',
+ disabled: true,
+ }
+ }
},
{
- label: '凭证描述',
- field: 'voucherNumberRemark',
- isTable:true,
+ label: '自动执行',
+ field: 'autoExecute',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: false,
+ isForm:false,
isTableForm:false,
+ isDetail:false,
sort: 'custom',
table: {
- width: 180
+ width: 150
},
- isForm: false,
+ form: {
+ component: 'Switch',
+ value: requestsettingData.autoExecute,
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE',
+ disabled: true,
+ }
+ }
},
{
- label: '操作',
- field: 'action',
- isDetail: false,
- isForm: false,
+ label: '跳过任务生成记录',
+ field: 'directCreateRecord',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: false,
+ isForm:false,
+ isTableForm:false,
+ isDetail:false,
+ sort: 'custom',
table: {
- width: 150,
- fixed: 'right'
+ width: 150
},
+ form: {
+ component: 'Switch',
+ value: requestsettingData.directCreateRecord,
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE',
+ disabled: true,
+ }
+ }
}
]))
/**
* @returns {Array} 供应商发票在详情展示的主表字段
*/
-export const SupplierinvoiceRecordDetailMain = useCrudSchemas(reactive([
+export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive([
{
label: '汇总信息',
field: '',
@@ -899,7 +1182,6 @@ export const SupplierinvoiceRecordDetailMain = useCrudSchemas(reactive {
+ cellValue= Number(cellValue).toFixed(2)
+ cellValue = cellValue + '' || ''
+
+ let x = cellValue.split('.')
+ let x1 = x[0]
+ let x2 = x.length > 1 ? '.' + x[1] : ''
+ const reg = /(\d+)(\d{3})/
+ while(reg.test(x1)){
+ x1 = x1.replace(reg, '$1,$2')
+ }
+ return x1+x2
+}
+
+function validateTaxRate(rule, value, callback) {
+ if (value>0) {
+ callback()
+ }else{
+ callback(new Error('税率必须大于0'))
+ }
+}
+
//表单校验
-export const SupplierinvoiceRecordMainRules = reactive({
- requestNumber: [
- { required: true, message: '请选择申请单号', trigger: 'change' }
+export const SupplierinvoiceRequestMainRules = reactive({
+ taxRate: [
+ required,
+ { validator:validateTaxRate, message: '税率必须大于0', trigger: 'blur'}
],
supplierCode: [
{ required: true, message: '请选择供应商代码', trigger: 'change' }
],
- outTransaction: [
- { required: true, message: '请输入出库事务类型', trigger: 'blur' }
+ invoiceTime:[
+ { required: false, message: '请选择发票日期', trigger: 'blur' }
],
- inTransaction: [
- { required: true, message: '请输入入库事务类型', trigger: 'blur' }
- ],
- executeTime: [
- { required: true, message: '请输入执行时间', trigger: 'blur' }
- ],
- activeDate: [
- { required: true, message: '请输入生效日期', trigger: 'blur' }
- ],
- available: [
- { required: true, message: '请输入是否可用', trigger: 'blur' }
+ goldenTaxInvoiceNumber:[
+ { required: false, message: '请输入金税票号', trigger: 'blur' }
],
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
- interfaceType: [
- { required: true, message: '请选择接口类型', trigger: 'change' }
+ autoCommit: [
+ { required: true, message: '请选择是否自动提交', trigger: 'change' }
+ ],
+ autoAgree: [
+ { required: true, message: '请选择是否自动通过', trigger: 'change' }
],
- number: [
- { required: true, message: '请输入单据号', trigger: 'blur' }
+ autoExecute: [
+ { required: true, message: '请选择是否自动执行', trigger: 'change' }
+ ],
+ directCreateRecord: [
+ { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],
- createTime: [
- { required: true, message: '请输入创建时间', trigger: 'blur' }
+ remark: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' }
+ ],
+ procurementCreator: [
+ { required: true, message: '请选择采购员', trigger: 'change' }
],
- creator: [
- { required: true, message: '请输入创建者', trigger: 'blur' }
+ beforeTaxAmount: [
+ { required: true, message: '请输入未税金额', trigger: 'change' }
+ ],
+ totalTaxAmount: [
+ { required: true, message: '请输入税额', trigger: 'change' }
],
})
-/**
- * @returns {Array} 供应商发票记录子表
- */
-export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive([
+export const SupplierinvoiceRequestFinance = useCrudSchemas(reactive([
{
- label: '项目编号',
- field: 'projectCode',
- isTable:false,
- sort: 'custom',
- table: {
- width: 150
+ label: '过账日期',
+ field: 'postingDate',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
- },
- {
- label: '采购收货记录单号',
- field: 'qadNumber',
sort: 'custom',
table: {
width: 180
},
- },
- {
- label: '单据类型',
- field: 'billType',
- dictType: DICT_TYPE.BILL_TYPE,
- dictClass: 'string',
- sort: 'custom',
- table: {
- width: 150
- },
- },
- {
- label: '订单号',
- field: 'poNumber',
- sort: 'custom',
- table: {
- width: 150
+ isTable:false,
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
},
- sortTableDefault:7,
},
{
- label: '订单行',
- field: 'poLine',
+ label: '凭证描述',
+ field: 'voucherNumberRemark',
sort: 'custom',
- table: {
- width: 150
+ isTable:false,
+ form: {
+ component: 'Input',
+ componentProps:{
+ type: 'textarea'
+ }
},
},
+]))
+
+export const SupplierinvoiceRequestFinanceRules = reactive({
+ postingDate: [
+ { required: true, message: '请选择过账日期', trigger: 'change' }
+ ],
+ // voucherNumberRemark: [
+ // { max: 50, message: '不得超过40个字符', trigger: 'blur' }
+ // ],
+})
+/**
+ * @returns {Array} 供应商发票申请子表
+ */
+export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive([
{
- label: '待开票单据号',
- field: 'recvBillNum',
+ label: '物料代码',
+ field: 'itemCode',
table: {
width: 150
},
- sortTableDefault:9,
form: {
componentProps: {
disabled: true
@@ -1303,39 +1630,19 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive
}
},
{
- label: '单据号',
- field: 'number',
- hiddenInMain:true,
- sort: 'custom',
- table: {
- width: 180
- },
- },
- {
- label: '供应商发货单号',
- field: 'asnBillNum',
- sort: 'custom',
- table: {
- width: 180
- },
- sortTableDefault:8,
- },
- {
- label: '供应商代码',
- field: 'supplierCode',
- sort: 'custom',
- table: {
- width: 180
- },
- },
- {
- label: '物料代码',
- field: 'itemCode',
- sort: 'custom',
- sortTableDefault:3,
+ label: '物料名称',
+ field: 'itemName',
table: {
width: 150
},
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ },
+ tableForm:{
+ disabled: true
+ }
},
{
label: '物料描述',
@@ -1343,215 +1650,408 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive
table: {
width: 150
},
- sortTableDefault:4,
isForm:false,
isTableForm:false,
isDetail: false,
isTable: true,
},
- {
- label: '到货时间',
- field: 'planArriveTime',
- table: {
- width: 150
- },
- formatter: dateFormatter2,
- sortTableDefault:5,
+
+ //仅是主列表页面的筛选搜索条件
+ {
+ label: '收货日期',
+ field: 'deliveryDate',
+ sort: 'custom',
+ isDetail:false,
+ isTable: false,
isForm:false,
isTableForm:false,
- isDetail: false,
- isTable: true,
+ isSearch:true,
+ formatter: dateFormatter,
+ search: {
+ value:[],
+ component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD',
+ type: 'daterange',
+ defaultTime: [new Date('1 '), new Date('1 ')]
+ }
+ },
},
{
- label: '到货数量',
- field: 'arrivalQty',
+ label: '收货日期',
+ field: 'deliveryDate',
table: {
width: 150
},
- sortTableDefault:6,
+ formatter: dateFormatter2,
isForm:false,
- isTableForm:false,
+ isTableForm:true,
isDetail: false,
isTable: true,
+ tableForm:{
+ disabled:true
+ }
},
{
- label: '物料名称',
- field: 'itemName',
- sort: 'custom',
+ label: '可开票数量',
+ field: 'invoicableQuantity',
table: {
width: 150
},
- },
- {
- label: '货币',
- field: 'currency',
- sort: 'custom',
- table: {
- width: 150
+ form: {
+ componentProps: {
+ disabled: true
+ }
},
+ tableForm:{
+ disabled: true
+ }
},
{
label: '合同价格',
field: 'singlePrice',
- sort: 'custom',
+ formatter: singlePriceFormart,
table: {
width: 150
},
form: {
component: 'InputNumber',
+ componentProps: {
+ min: 0,
+ precision: 2,
+ }
+ },
+ tableForm: {
+ type: 'InputNumber',
+ min: 0,
+ precision: 2,
}
},
{
label: '采购价格',
field: 'purchasePrice',
- sort: 'custom',
+ formatter: singlePriceFormart,
table: {
width: 150
},
form: {
component: 'InputNumber',
+ componentProps: {
+ disabled: true,
+ min: 0,
+ precision: 2,
+ }
+ },
+ tableForm:{
+ type: 'InputNumber',
+ disabled: true,
+ min: 0,
+ precision: 2,
}
},
{
- label: '差额',
+ label: '单价差额',
field: 'differencePrice',
+ formatter: singlePriceFormart,
table: {
width: 150
},
form: {
componentProps: {
- disabled: true
+ disabled: true,
+ min: 0,
+ precision: 2,
}
},
tableForm:{
type: 'slot',
+ disabled: true,
+ min: 0,
+ precision: 2,
+ }
+ },
+ {
+ label: '到货数量',
+ field: 'arrivalQty',
+ table: {
+ width: 150
+ },
+ isForm:false,
+ isTableForm:true,
+ isDetail: false,
+ isTable: true,
+ tableForm:{
+ disabled:true
+ }
+ },
+ {
+ label: '订单号',
+ field: 'poNumber',
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ },
+ table: {
+ width: 150
+ },
+ tableForm:{
disabled: true
}
},
{
- label: '未税差额',
- field: 'untaxedDifference',
- formatter: accountantFormart,
+ label: '订单行',
+ field: 'poLine',
table: {
width: 150
},
form: {
- component: 'InputNumber',
+ // labelMessage: '信息提示说明!!!',
componentProps: {
- min: 0,
- precision: 6,
+ multiple:true,//多选
+ isSearchList: true,
+ searchListPlaceholder: '请选择订单行',
+ searchField: 'poLine',
+ searchTitle: '待开票列表',
+ searchAllSchemas: PurchaseReceiptOrReturnRecordDetail.allSchemas,
+ searchPage: supplierinvoiceRequestDetailApi.getPoNumberPoLineInfo,
+ searchCondition: [
+ {
+ key: 'supplierCode',
+ value: 'supplierCode',
+ message: '请填供应商信息!',
+ isMainValue: true
+ },{
+ key: 'orderType',
+ value: 'orderType',
+ message: '请填订单类型!',
+ isMainValue: true
+ }
+ ]
}
},
tableForm: {
- type: 'InputNumber',
- min: 0,
- precision: 6,
+ multiple:true,//多选
+ isInpuFocusShow: true,
+ searchListPlaceholder: '请选择订单行',
+ searchField: 'poLine',
+ searchTitle: '待开票列表',
+ searchAllSchemas: PurchaseReceiptOrReturnRecordDetail.allSchemas,
+ searchPage: supplierinvoiceRequestDetailApi.getPoNumberPoLineInfo,
+ searchCondition: [
+ {
+ key: 'supplierCode',
+ value: 'supplierCode',
+ message: '请填供应商信息!',
+ isMainValue: true
+ },
+ {
+ key: 'orderType',
+ value: 'orderType',
+ message: '请填订单类型!',
+ isMainValue: true
+ }
+ ]
}
},
{
- label: '含税差额',
- field: 'taxInclusiveDifference',
- formatter: accountantFormart,
+ label: '待开票单据号',
+ field: 'recvBillNum',
table: {
width: 150
},
form: {
- component: 'InputNumber',
componentProps: {
- min: 0,
- precision: 6,
+ disabled: true
}
},
- tableForm: {
- type: 'InputNumber',
- min: 0,
- precision: 6,
+ tableForm:{
+ disabled: true
}
},
{
- label: '收货日期',
- field: 'deliveryDate',
- isTable: true,
- formatter: dateFormatter,
- detail: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ label: '单据类型',
+ field: 'billType',
+ dictType: DICT_TYPE.BILL_TYPE,
+ dictClass: 'string',
+ table: {
+ width: 150
},
- sort: 'custom',
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ },
+ tableForm:{
+ disabled: true
+ }
+ },
+ {
+ label: '供应商发货单号',
+ field: 'asnBillNum',
table: {
- width: 180
+ width: 150
},
form: {
- component: 'DatePicker',
componentProps: {
- style: {width:'100%'},
- type: 'datetime',
- dateFormat: 'YYYY-MM-DD HH:mm:ss',
- valueFormat: 'x',
+ disabled: true
}
+ },
+ tableForm:{
+ disabled: true
}
},
{
- label: '开票数量',
- field: 'invoicableQuantity',
- sort: 'custom',
+ label: '供应商代码',
+ field: 'supplierCode',
+ hiddenInMain:true,
table: {
width: 150
},
form: {
- component: 'InputNumber',
+ componentProps: {
+ disabled: true
+ }
+ },
+ tableForm:{
+ disabled: true
}
},
+
+ // {
+ // label: '未税差额',//子表数据
+ // field: 'untaxedDifference',
+ // formatter: accountantFormart,
+ // table: {
+ // width: 150
+ // },
+ // form: {
+ // component: 'InputNumber',
+ // componentProps: {
+ // precision: 2,
+ // }
+ // },
+ // tableForm: {
+ // type: 'InputNumber',
+ // min: 0,
+ // precision: 2,
+ // }
+ // },
+ // {
+ // label: '含税差额',
+ // field: 'taxInclusiveDifference',
+ // formatter: accountantFormart,
+ // table: {
+ // width: 150
+ // },
+ // form: {
+ // component: 'InputNumber',
+ // componentProps: {
+ // precision: 2,
+ // }
+ // },
+ // tableForm: {
+ // type: 'InputNumber',
+ // min: 0,
+ // precision: 2,
+ // }
+ // },
+
{
- label: '财务凭证号',
- field: 'voucherNumber',
- sort: 'custom',
+ label: '货币',
+ field: 'currency',
table: {
width: 150
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ },
+ tableForm:{
+ disabled: true
}
},
{
label: '备注',
field: 'remark',
- sort: 'custom',
+ hiddenInMain:true,
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ hiddenInMain:true,
+ isTable: false,
+ table: {
+ width: 150
+ },
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ hiddenInMain:true,
+ isTableForm: false,
+ isTable:false,
+ isForm: false,
table: {
width: 150
},
},
+ {
+ label: '操作',
+ field: 'action',
+ isDetail: false,
+ isForm: false,
+ table: {
+ width: 250,
+ fixed: 'right'
+ },
+ hiddenInMain:true,
+ isTableForm: false,
+ }
]))
-
+// 批次校验
+const validateSinglePrice = (rule: any, value: any, callback: any) => {
+ if (Number(value)>0) {
+ callback();
+ } else {
+ callback(new Error('请输入合同价格'));
+ }
+}
//表单校验
-export const SupplierinvoiceRecordDetailRules = reactive({
- packingNumber: [
- { required: true, message: '请输入包装号', trigger: 'blur' }
- ],
- batch: [
- { required: true, message: '请输入批次', trigger: 'blur' }
- ],
- poNumber: [
- { required: true, message: '请输入订单号', trigger: 'blur' }
- ],
- poLine: [
- { required: true, message: '请输入订单行', trigger: 'blur' }
- ],
- packQty: [
- { required: true, message: '请输入包装数量', trigger: 'blur' }
- ],
- packUnit: [
- { required: true, message: '请输入包装规格', trigger: 'blur' }
- ],
- convertRate: [
- { required: true, message: '请输入转换率', trigger: 'blur' }
- ],
- number: [
- { required: true, message: '请输入单据号', trigger: 'blur' }
- ],
- itemCode: [
- { required: true, message: '请输入物料代码', trigger: 'blur' }
+export const SupplierinvoiceRequestDetailRules = reactive({
+ singlePrice: [
+ { required: true, message: '请输入合同价格', trigger: 'change' },
+ { validator: validateSinglePrice, trigger: 'change' }
],
- createTime: [
- { required: true, message: '请输入创建时间', trigger: 'blur' }
- ],
- creator: [
- { required: true, message: '请输入创建者', trigger: 'blur' }
+})
+// 采购通过
+export const PurchasePass = useCrudSchemas(reactive([
+ {
+ label: '价差通过说明',
+ field: 'balanceStatement',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isTable:false,
+ form: {
+ componentProps:{
+ type:'textarea'
+ }
+ },
+ },
+]))
+//表单校验
+export const PurchasePassRules = reactive({
+ balanceStatement: [
+ { required: true, message: '请输入价差通过说明', trigger: 'blur'},
+ { max: 100, message: '最多100字符', trigger: 'blur'}
],
})