diff --git a/src/api/wms/productreceiptRecordMain/index.ts b/src/api/wms/productreceiptRecordMain/index.ts index ed7e0d8a3..d0765e33a 100644 --- a/src/api/wms/productreceiptRecordMain/index.ts +++ b/src/api/wms/productreceiptRecordMain/index.ts @@ -86,14 +86,14 @@ export const deleteProductreceiptRecordMain = async (id: number) => { // 导出制品收货记录主 Excel export const exportProductreceiptRecordMain = async (params) => { - params.type = 'predict' + // params.type = 'predict' if (params.isSearch) { - const cmd = { - 'column':'type', - 'action':'==', - 'value':'predict' - } - params.filters.push(cmd) + // const cmd = { + // 'column':'type', + // 'action':'==', + // 'value':'predict' + // } + // params.filters.push(cmd) delete params.isSearch const data = {...params} return await request.downloadPost({ url: '/wms/productreceipt-record-main/export-excel-senior', data }) diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index fbc42f7d2..ab2bdf9bf 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -1148,6 +1148,8 @@ export default { '确 认':'Confirm', 请输入拒收原因:'Please enter the reason for rejection', 查看明细:'View details', + 未读:'unread', + 已读:'read', 全部已读:'All read', '申请发货数量不能大于 计划数量 - 已发货数量':'The requested quantity cannot be greater than the planned quantity - the quantity shipped', 不允许超发:'Oversend is not allowed', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index dce38d2f3..7c72bc20a 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -1151,6 +1151,8 @@ export default { '确 认':'确 认', 请输入拒收原因:'请输入拒收原因', 查看明细:'查看明细', + 未读:'未读', + 已读:'已读', 全部已读:'全部已读', '申请发货数量不能大于 计划数量 - 已发货数量':'申请发货数量不能大于 计划数量 - 已发货数量', 不允许超发:'不允许超发', diff --git a/src/views/qms/inspectionJob/addForm.vue b/src/views/qms/inspectionJob/addForm.vue index 79484f230..7741bcfd9 100644 --- a/src/views/qms/inspectionJob/addForm.vue +++ b/src/views/qms/inspectionJob/addForm.vue @@ -184,7 +184,7 @@ - + isTableForm: false, isForm: false }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - tableForm: { - disabled: false - }, - form: { - componentProps: { - disabled: true - } - } - }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:false, + // tableForm: { + // disabled: false + // }, + // form: { + // componentProps: { + // disabled: true + // } + // } + // }, { label: '创建时间', field: 'createTime', diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue b/src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue index 41632cb0e..61506a1e2 100644 --- a/src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue +++ b/src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue @@ -153,7 +153,7 @@ const butttondata = (row, $index) => { return [ // defaultButtons.mainListEditBtn({hasPermi:'wms:sale-shipment-main-record:update'}), // 编辑 // defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-record:delete'}), // 删除 - defaultButtons.mainListAbortBtn({hasPermi:'wms:sale-shipment-main-request:abort',hide:(row.revokeFlag=='TRUE'||row.relateRecordNumber != null ) }), // 撤销 + defaultButtons.mainListAbortBtn({hasPermi:'wms:sale-shipment-main-record:abort',hide:(row.revokeFlag=='TRUE') }), // 撤销 ] } diff --git a/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts index 38ceaab30..5c91579a9 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts @@ -400,14 +400,14 @@ export const ScrapJobMain = useCrudSchemas( width: 150 } }, - { - label: '部门', - field: 'departmentCode', - sort: 'custom', - table: { - width: 150 - } - }, + // { + // label: '部门', + // field: 'departmentCode', + // sort: 'custom', + // table: { + // width: 150 + // } + // }, { label: '通知单描述', field: 'noticeRemark', @@ -642,7 +642,7 @@ export const ScrapJobMain = useCrudSchemas( }, { label: '承接人', - field: 'acceptUserId', + field: 'acceptUserName', sort: 'custom', table: { width: 150 @@ -670,7 +670,7 @@ export const ScrapJobMain = useCrudSchemas( }, { label: '完成人', - field: 'completeUserId', + field: 'completeUserName', sort: 'custom', table: { width: 150 diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts index 69cbd2449..c7d9d4b39 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts @@ -381,14 +381,14 @@ export const ScrapRecordMain = useCrudSchemas( width: 150 } }, - { - label: '部门', - field: 'departmentCode', - sort: 'custom', - table: { - width: 150 - } - }, + // { + // label: '部门', + // field: 'departmentCode', + // sort: 'custom', + // table: { + // width: 150 + // } + // }, // { // label: '接口类型', // field: 'interfaceType', diff --git a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts index 702906bb6..45b562ff6 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts +++ b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts @@ -852,12 +852,18 @@ export const IssueRequestDetail = useCrudSchemas( value: 'TRUE', isMainValue: false }, - // ,{ - // key:'productionLineCode', - // value:'productionLineCode', - // message: '请填写生产线代码!', - // isMainValue: true - // }, + { + key:'workshopCode', + value:'workshopCode', + message: '请填写车间代码!', + isMainValue: true + }, + { + key:'productionLineCode', + value:'productionLineCode', + message: '请填写生产线代码!', + isMainValue: true + }, { key: 'businessTypeCode', value: 'Issue', diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index 9cb5a44f7..79d3b6643 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -43,7 +43,7 @@ @@ -88,7 +89,7 @@ :isShowButton="false" @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" - @searchTableSuccess="searchTableSuccess" + @searchTableSuccess="searchTableSuccessLabel" @submitForm="submitFormLabel" /> @@ -183,9 +184,28 @@ const isItemType = async (itemCode, labelTypeParams) => { if (!isType) labelType.value = labelTypeOld return isType } +const clearSearchInput = (formField) => { + if(formField=='workshopCode'){ + //车间 + formRef.value.formRef.setValues({ + productionLineCode:'',//生产线代码 + workStationCode:'',//工位代码 + fromLocationCode:'',//来源库位 + }) + tableData.value = [] + }else if(formField=='productionLineCode'){ + //生产线代码 + formRef.value.formRef.setValues({ + workStationCode:'',//工位代码 + fromLocationCode:'',//来源库位 + }) + tableData.value = [] + } +} // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { + console.log('searchTableSuccess',formRef.formModel) nextTick(async () => { if (type == 'tableForm') { // 明细查询页赋值 @@ -194,23 +214,37 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => message.warning(`物料${val[0]['itemCode']}已经存在`) return } - - const isType = await isItemType(val[0]['itemCode'], labelType.value) - if(!isType){ - message.warning('当前物料可制造与其他数据不一致,请重新选择!') - } else { - row['itemCode'] = val[0]['itemCode'] - row['uom'] = val[0]['uom'] - row['inventoryStatus'] = val[0]['inventoryStatus'] - row['qty'] = val[0]['qty'] + let enableBuy = val[0]['enableBuy'] + if(tableData.value.length>0){ + enableBuy = tableData.value[0]['enableBuy'] + } + //被过滤的数组 + let noList = val.filter(item=>item['enableBuy']!=enableBuy) + if(noList&&noList.length>0){ + let itemCodes = noList.map(item=>item['itemCode']) + console.log(itemCodes) + message.warning(`${itemCodes.join(',')}与其他数据制造类型不一致,被过滤!`) + } + val = val.filter(item=>item['enableBuy']==enableBuy) + + val.forEach(item=>{ + const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) + newRow['itemCode'] = item['itemCode'] + newRow['enableBuy'] = item['enableBuy'] + newRow['uom'] = item['uom'] + newRow['inventoryStatus'] = item['inventoryStatus'] + newRow['qty'] = item['qty'] // 如果有批次 赋值库存余额批次 无批次 赋值 000000 - if (val[0]['batch'] !== '') { - row['batch'] = val[0]['batch'] + if (item['batch'] !== '') { + newRow['batch'] = item['batch'] } else { - row['batch'] = '000000' + newRow['batch'] = '000000' } - row['packUnit'] = val[0]['packUnit'] - row['packQty'] = val[0]['packQty'] + newRow['packUnit'] = item['packUnit'] + newRow['packQty'] = item['packQty'] + tableData.value.push(newRow) + }) + // HL-4885 聂喜婷:@邱晨 @王宇飞 先把数量的校验拿掉 // 修改 tableform 属性 数量最大值设置为库存余额中数量 // TODO: tableFormColumns 修改属性目前只限于整个列 并不满足行要求 例如: 第一条数据最大10 第二条数据最大20 那么第一条数据会变成最大20限制 @@ -219,16 +253,17 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => // item.tableForm.max = val[0]['qty'] // } // }) - } - } else if(formField == 'workStationCode') { - // 明细查询页赋值 - val.forEach(item=>{ - const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) - newRow['workStationCode'] = item['code'] - newRow['fromLocationCode'] = item['rawLocationCode'] - tableData.value.push(newRow) - }) - } + // } + } + // else if(formField == 'workStationCode') { + // // 明细查询页赋值 + // val.forEach(item=>{ + // const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) + // newRow['workStationCode'] = item['code'] + // newRow['fromLocationCode'] = item['rawLocationCode'] + // tableData.value.push(newRow) + // }) + // } // else if(formField == 'packUnit') { // row['packUnit'] = val[0]['packUnit'] // row['packQty'] = val[0]['packQty'] @@ -239,11 +274,43 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } else { const setV = {} setV[formField] = val[0][searchField] + if(formField=='workshopCode'){ + //车间 + setV['productionLineCode'] = ''//生产线代码 + setV['workStationCode'] = ''//工位代码 + setV['fromLocationCode'] = ''//来源库位 + + tableData.value = [] + }else if(formField=='productionLineCode'){ + //生产线代码 + setV['workStationCode'] = ''//工位代码 + setV['fromLocationCode'] = ''//来源库位 + tableData.value = [] + } + if(formField == 'workStationCode') { + // 来源工位代码 + setV['workStationCode'] = val[0]['code'] + setV['fromLocationCode'] = val[0]['rawLocationCode'] + } tableData.value = [] // 重置明细数据 formRef.setValues(setV) } }) } +// 查询页面返回 +const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row ) => { + console.log('searchTableSuccessLabel',formField, searchField, val, formRef, type, row) + nextTick(async () => { + if (type == 'tableForm') { + // 明细查询页赋值 + row[formField] = val[0][searchField] + } else { + const setV = {} + setV[formField] = val[0][searchField] + formRef.setValues(setV) + } + }) +} // 查询页面返回——详情 const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { nextTick(async () => { @@ -654,6 +721,10 @@ const submitForm = async (formType, submitData) => { if(data.masterId){ data.id = data.masterId } + tableData.value.forEach((item:any)=>{ + item['workStationCode'] = data.workStationCode + item['fromLocationCode'] = data.fromLocationCode + }) data.subList = tableData.value // 拼接子表数据参数 let isZC = true // 数量和标包数量 是否整除 data.subList.forEach(item => { diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts index 995d146a5..a3e6bc720 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts @@ -24,7 +24,8 @@ import * as SupplieritemApi from '@/api/wms/supplieritem' import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data' import * as LocationApi from '@/api/wms/location' import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' - +import { Warehouse } from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data"; +import * as WarehouseApi from "@/api/wms/warehouse"; const { t } = useI18n() // 国际化 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 @@ -116,7 +117,7 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive }, }, { - label: '生产线代码', + label: '生产线', field: 'productionLineCode', sort: 'custom', table: { @@ -171,6 +172,155 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive }] }, }, + { + label: '工位', + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择工位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '工位信息', // 查询弹窗标题 + searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 + searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'workshopCode', + value: 'workshopCode', + message: '请选择车间信息!', + isMainValue: true + },{ + key: 'productionLineCode', + value: 'productionLineCode', + message: '请选择生产线信息!', + isMainValue: true, + isOptional:true, // isMainValue=true情况,添加参数可选可空的判断 + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + + } + }, + tableForm:{ + multiple:true, + disabled:true, + // isInpuFocusShow: true, + searchListPlaceholder: '请选择工位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '工位信息', // 查询弹窗标题 + searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 + searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false + }, + { + key: 'workshopCode', + value: 'workshopCode', + message: '请选择车间信息!', + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false, // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 + isFormModel:true, // filters中添加筛选的数据--取于formModel + required:true, // 前置添加必有,和isFormModel结合使用 + }, + { + key: 'productionLineCode', // 查询列表中字段 + value: 'productionLineCode', // 指查询具体值 + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false, // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 + isFormModel:true, // filters中添加筛选的数据--取于formModel + required:false, // 前置添加必有,和isFormModel结合使用 + }, + ], + verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法 + isShowTableFormSearch: true, + isRepeat: true,//是否可以重复添加该条数据 + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + }, + }, + { + label: '来源库位', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + }, + isDetail:false, + isTable:true, + isTableForm: true, + isForm: true, + }, + { + label: '到仓库', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150, + }, + isForm:true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, + searchListPlaceholder: '请选择仓库代码', + searchField: 'code', + searchTitle: '仓库信息', + searchAllSchemas: Warehouse.allSchemas, + searchPage: WarehouseApi.getWarehousePage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } + } + }, { label: '申请时间', field: 'requestTime', @@ -524,6 +674,12 @@ export const ProductionreturnRequestMainRules = reactive({ // productionLineCode: [ // { required: true, message: '请选择生产线代码', trigger: 'change' } // ], + workStationCode: [ + { required: true, message: '请选择工位代码', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库', trigger: 'change' } + ], }) /** @@ -579,161 +735,161 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive { //表单校验 export const ProductionreturnRequestDetailRules = reactive({ - workStationCode: [ - { required: true, message: '请选择工位代码', trigger: 'change' } - ], - toLocationCode: [ - { required: true, message: '请选择目标库位', trigger: 'change' } - ], + + // toLocationCode: [ + // { required: true, message: '请选择目标库位', trigger: 'change' } + // ], productionLineCode: [ { required: true, message: '请选择生产线代码', trigger: 'change' } ], diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue index 1515e519a..bb512fad1 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue @@ -101,7 +101,7 @@ + + \ No newline at end of file diff --git a/src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/purchaseDiscreteOrderMain.data.ts b/src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/purchaseDiscreteOrderMain.data.ts new file mode 100644 index 000000000..8f183fe28 --- /dev/null +++ b/src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/purchaseDiscreteOrderMain.data.ts @@ -0,0 +1,1864 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import { accountantFormart } from '@/utils/formatter' + +/** + * @returns {Array} 供应商发票记录主表 + */ +export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ + { + label: '单据号', + field:'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isSearch: false + }, + { + label: '发票申请单号', + field:'requestNumber', + sort: 'custom', + table: { + width: 180, + }, + sortSearchDefault:1, + sortTableDefault:1, + isSearch: true + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:1, + isSearch: true + }, + { + label: '供应商名称', + field: 'supplierName', + sort: 'custom', + table: { + width: 180, + }, + sortTableDefault:2, + isForm: false, + isSearch:true + }, + { + label: '税率', + field: 'taxRate', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:3, + form: { + component: 'InputNumber', + } + }, + + { + label: '价差合计', + field: 'differencePriceTotalMain', + formatter: accountantFormart, + table: { + width: 100 + }, + sortTableDefault: 3, + isForm: false, + isTable: true, + isSearch: false, + isDetail: true, + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.SUPPLIERINVOICE_REQUEST_STATUS, + dictClass: 'string', + isTable: true, + sortTableDefault:7, + isForm:false, + sort: 'custom', + table: { + width: 150 + }, + search: { + componentProps: { + multiple: true, + collapseTags: true, + collapseTagsTooltip: true, + } + }, + isSearch: true, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, + { + label: '已读状态', + field: 'status', + dictType: DICT_TYPE.SUPPLIERINVOICE_REQUEST_STATUS, + dictClass: 'string', + isTable: true, + sortTableDefault:7, + isForm:false, + sort: 'custom', + table: { + width: 150 + }, + search: { + componentProps: { + multiple: true, + collapseTags: true, + collapseTagsTooltip: true, + } + }, + isSearch: true, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, + + // { + // label: '申请单号', + // field: 'requestNumber', + // sort: 'custom', + // table: { + // width: 180, + // }, + // isTable: false, + // isSearch: true + // }, + { + label: '订单号', + field: 'poNumber', + sort: 'custom', + isTable:false, + table: { + width: 150 + }, + }, + { + label: '金税票号',//金税票号 + field: 'goldenTaxInvoiceNumber', + sort: 'custom', + table: { + width: 200 + }, + sortTableDefault:5, + isSearch: true + }, + { + label: '未税尾差', + field: 'beforeTaxDiffAmount', + formatter: accountantFormart, + table: { + width: 150 + }, + sortTableDefault:5, + isForm:false, + isTableForm:false + }, + { + label: '税额尾差', + field: 'taxAmountDiff', + formatter: accountantFormart, + table: { + width: 150 + }, + sortTableDefault:5, + isForm:false, + isTableForm:false + }, + { + label: '价税合计尾差', + field: 'totalTaxDiffAmount', + formatter: accountantFormart, + table: { + width: 150 + }, + sortTableDefault:5, + isForm:false, + isTableForm:false + }, + + { + label: '供应商维护税额', + field: 'taxAmount', + formatter: accountantFormart, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:8, + form: { + component: 'InputNumber', + } + }, + { + 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: 'balanceStatementStatus', + dictType: DICT_TYPE.INVOICE_BALANCE_STATEMENT_STATUS, + dictClass: 'string', + isTable: true, + isForm:false, + isSearch:false, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:3, + }, + + { + label: '价差说明', + field: 'balanceStatement', + isTable: false, + isForm:false, + isSearch:false, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:5, + }, + { + label: '供应商维护价税合计',//税后金额 + field: 'afterTaxAmount', + formatter: accountantFormart, + sort: 'custom', + table: { + width: 160 + }, + sortTableDefault:9, + form: { + component: 'InputNumber', + } + }, + + { + label: '价差',//总差额 + field: 'totalDifference', + table: { + width: 150 + }, + isTable: false, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6, + } + }, + + { + label: '供应商维护未税金额', + field: 'amount', + formatter: accountantFormart, + sort: 'custom', + table: { + width: 160 + }, + sortTableDefault:8, + form: { + component: 'InputNumber', + } + }, + + + + { + label: '索赔金额', + field: 'claimAmount', + formatter: accountantFormart, + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + form: { + component: 'InputNumber', + } + }, + { + label: '调整价差', + field: 'discountAmount', + formatter: accountantFormart, + sort: 'custom', + table: { + width: 150 + }, + isDetail:false, + isTable: false, + form: { + component: 'InputNumber', + } + }, + { + label: '调整税额', + field: 'adjustingTaxAmount', + formatter: accountantFormart, + sort: 'custom', + isDetail:false, + table: { + width: 150 + }, + isTable: false, + form: { + component: 'InputNumber', + } + }, + + { + label: '未税差额', + field: 'untaxedDifference', + formatter: accountantFormart, + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, + } + }, + isTable: false, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6, + } + }, + { + label: '含税差额', + field: 'taxInclusiveDifference', + formatter: accountantFormart, + table: { + width: 150 + }, + isTable: false, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6, + } + }, + { + label: '快递单号', + field: 'expressTrackingNumber', + sort: 'custom', + isTable:false, + isForm:false, + isSearch:false, + table: { + width: 150 + }, + }, + { + label: '开票日期', + field: 'invoiceTime', + isTable: true, + 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',//数据转成时间戳 + } + }, + sortTableDefault:4, + sort: 'custom', + table: { + width: 180 + }, + }, + // { + // label: '采购审批人', + // field: 'procurementCreatorName', + // sort: 'custom', + // table: { + // width: 180 + // }, + // isTable:true, + // isDetail: true, + // isTableForm: false, + // isForm:false, + // isSearch:false, + // sortTableDefault:10 + // }, + { + 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',//数据转成时间戳 + } + }, + isTable: true, + sortTableDefault:6, + sort: 'custom', + table: { + width: 180 + }, + isSearch: true, + search: { + value:[], + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + dateFormat: 'YYYY-MM-DD', + type: 'daterange', + defaultTime: [new Date('1 '), new Date('1 ')] + } + }, + }, + //子表数据,仅是查询条件 + { + label: '货运单号', + field: 'asnBillNum', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isTableForm:false, + isTable:false, + isDetail:false, + isSearch: true, + isForm: false, + }, + { + label: '财务凭证号', + field: 'voucherNumber', + sort: 'custom', + table: { + width: 200, + }, + 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, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '生效日期', + field: 'activeDate', + isTable:false, + isTableForm:false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '申请时间', + field: 'requestTime', + isTable:false, + isTableForm:false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '截止时间', + field: 'dueTime', + isTable:false, + isTableForm:false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '部门', + field: 'departmentCode', + isTable:false, + isTableForm:false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '代码', + field: 'code', + isTable:false, + isTableForm:false, + isDetail:false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable:false, + isDetail:false, + isTableForm:false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + isTable:false, + isTableForm:false, + dictClass: 'string', + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + sortTableDefault:1000, + isTable: false, + table: { + width: 150 + }, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isForm: false, + isDetail: false, + isTableForm: false, + isTable: true, + 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: 'requestTime', + isTable: true, + sortTableDefault:1001, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + }, + // { + // label: '采购审批人', + // field: 'procurementCreatorName', + // sort: 'custom', + // table: { + // width: 180 + // }, + // isTable:true, + // isDetail: true, + // isTableForm: false, + // isForm:false, + // isSearch:false, + // sortTableDefault:10 + // }, + // { + // label: '采购审批人代码', + // field: 'procurementCreator', + // sortTableDefault:1002, + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false, + // isForm: false, + // }, + + { + label: '回转日期', + field: 'reversepostingdate', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:11, + }, + { + label: '说明',//回转说明 + field: 'tcCInvoiceRemark', + sortTableDefault:11, + table: { + width: 150 + }, + }, + { + label: '回转凭证号', + field: 'transferNumber', + sort: 'custom', + table: { + width: 200, + }, + sortTableDefault:11, + isTable:true, + isForm: false + }, + // { + // label: '冲销日记帐', + // field: 'reverseInvoiceJournal', + // sortTableDefault:11, + // table: { + // width: 150 + // }, + // }, + // { + // label: '调整账代码', + // field: 'adjustmentJournal', + // sortTableDefault:11, + // table: { + // width: 150 + // }, + // }, + + { + label: '采购审批时间', + field: 'procurementCreateTime', + sortTableDefault:11, + isTable: true, + 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: 180 + }, + isForm: false, + }, + { + label: '采购价格审批人', + field: 'procurementCreatorName', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:12, + isForm: false, + }, + { + label: '财务审批人', + field: 'financialCreatorName', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:12, + isForm: false, + }, + + { + label: '财务审批时间', + field: 'financialCreateTime', + sortTableDefault:13, + isTable: true, + 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: 180 + }, + 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', + sort: 'custom', + isTable:false, + isTableForm:false, + table: { + width: 150 + }, + isForm: false, + }, + { + label: '供应商审批时间', + field: 'supplierCreateTime', + isTable:false, + isTableForm:false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isForm: false, + }, + { + label: '凭证描述', + field: 'voucherNumberRemark', + isTable:true, + isTableForm:false, + sort: 'custom', + table: { + width: 180 + }, + isForm: false, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 200, + fixed: 'right' + }, + } +])) +/** + * @returns {Array} 供应商发票在详情展示的主表字段 + */ +export const SupplierinvoiceRecordDetailMain = useCrudSchemas(reactive([ + { + label: '汇总信息', + field: '', + sort: 'custom', + isForm: false, + isSearch: false, + isTable: false, + isDetail: true, + }, + { + label: '供应商信息', + field: '', + sort: 'custom', + isForm: false, + isSearch: false, + isTable: false, + isDetail: true, + }, + { + label: '价差', + field: '', + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: 'SCP系统数据', + field: '', + sort: 'custom', + isForm: false, + isSearch: false, + isTable: false, + isDetail: false, + }, + + { + label: '单据号', + field: 'number', + sort: 'custom', + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '系统未税金额', + field: 'purchaseAmountTotalMain', + formatter: accountantFormart, + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '财务凭证号', + field: 'voucherNumber', + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '供应商名称', + field: 'supplierName', + sort: 'custom', + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '价差合计', + field: 'differencePriceTotalMain', + formatter: accountantFormart, + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '供应商创建时间', + field: 'requestTime', + sort: 'custom', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '订单类型', + field: 'orderType', + dictType: DICT_TYPE.PURCHASE_INVOICE_ORDER_TYPE, + dictClass: 'string', + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '', + field: '', + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.SUPPLIERINVOICE_REQUEST_STATUS, + dictClass: 'string', + sort: 'custom', + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '发票号码', + field: 'goldenTaxInvoiceNumber', + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + // { + // label: '尾差', + // field: 'totalDifference', + // sortTableDefault: 6, + // isForm: false, + // isTable: false, + // isSearch: false, + // isDetail: false, + // }, + { + label: '尾差', + field: '', + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + + { + label: '采购价格审批人', + field: 'procurementCreatorName', + sortTableDefault: 1003, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '开票日期', + field: 'invoiceTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '供应商维护价税合计', + field: 'afterTaxAmount', + formatter: accountantFormart, + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '采购价格审批时间', + field: 'procurementCreateTime', + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sortTableDefault: 1003, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '税率(%)', + field: 'taxRate', + dictType: DICT_TYPE.TAX_RATE_DICT, + dictClass: 'string', + sortTableDefault: 3, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '供应商维护未税金额', + field: 'amount', + formatter: accountantFormart, + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '价差通过说明', + field: 'balanceStatement', + sort: 'custom', + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '发票价税合计', + field: 'adTaxAmount', + formatter: accountantFormart, + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '供应商维护税额', + field: 'taxAmount', + formatter: accountantFormart, + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '财务审批人', + field: 'financialCreatorName', + sort: 'custom', + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '发票未税金额', + field: 'beforeTaxAmount', + formatter: accountantFormart, + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '', + field: '', + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '财务审批时间', + field: 'financialCreateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '发票税额', + field: 'totalTaxAmount', + formatter: accountantFormart, + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '价税合计尾差', + field: 'totalTaxDiffAmount', + formatter: accountantFormart, + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + detail:{ + slotFilter: true + } + }, + { + label: '财务过账日期', + field: 'postingDate', + isTable: true, + sortTableDefault: 15, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + + }, + { + label: '返利未税金额',//折扣金额 + field: 'discountAmount1', + formatter: accountantFormart, + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '未税尾差', + field: 'beforeTaxDiffAmount', + formatter: accountantFormart, + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + detail:{ + slotFilter: true + } + }, + { + label: '回转凭证号', + field: 'transferNumber', + sort: 'custom', + }, + { + label: '工厂地点', + field: 'siteId', + sort: 'custom', + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '税额尾差', + field: 'taxAmountDiff', + formatter: accountantFormart, + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + detail:{ + slotFilter: true + } + }, + + { + label: '回转日期', + field: 'reversepostingdate', + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + }, + { + label: '', + field: '', + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '', + field: '', + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '说明', //回转说明 + field: 'tcCInvoiceRemark', + }, + { + label: '', + field: '', + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '', + field: '', + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '参考凭证描述', + field: 'voucherNumberRemark', + sort: 'custom', + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + // detail:{ + // span:2 + // } + }, + { + label: '', + field: '', + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '', + field: '', + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + + +])) +//表单校验 +export const SupplierinvoiceRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + supplierCode: [ + { required: true, message: '请选择供应商代码', trigger: 'change' } + ], + outTransaction: [ + { required: true, 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' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + interfaceType: [ + { required: true, message: '请选择接口类型', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + requestTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 供应商发票记录子表 + */ +export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive([ + { + label: '项目编号', + field: 'projectCode', + isTable:false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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 + }, + sortTableDefault:7, + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '待开票单据号', + field: 'recvBillNum', + table: { + width: 150 + }, + sortTableDefault:9, + form: { + componentProps: { + disabled: true + } + }, + tableForm:{ + disabled: true + } + }, + { + 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, + table: { + width: 150 + }, + }, + { + label: '物料描述', + field: 'itemDesc', + table: { + width: 150 + }, + sortTableDefault:4, + isForm:false, + isTableForm:false, + isDetail: false, + isTable: true, + }, + { + label: '到货时间', + field: 'planArriveTime', + table: { + width: 150 + }, + formatter: dateFormatter2, + sortTableDefault:5, + isForm:false, + isTableForm:false, + isDetail: false, + isTable: true, + }, + { + label: '到货数量', + field: 'arrivalQty', + table: { + width: 150 + }, + sortTableDefault:6, + isForm:false, + isTableForm:false, + isDetail: false, + isTable: true, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '货币', + field: 'currency', + sort: 'custom', + dictType: DICT_TYPE.CURRENCY, + dictClass: 'string', + table: { + width: 150 + }, + tableForm:{ + type:'Select', + disabled: true + } + }, + { + label: '合同价格', + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '采购价格', + field: 'purchasePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '合同金额', + field: 'contractAmountTotal', + table: { + width: 150 + }, + isForm:false, + tableForm:{ + disabled: true + } + }, + { + label: '采购金额', + field: 'purchaseAmontTotal', + table: { + width: 150 + }, + isForm:false, + tableForm:{ + disabled: true + } + }, + { + label: '总差额', + field: 'differencePriceTotal', + table: { + width: 150 + }, + isForm:false, + tableForm:{ + disabled: true + } + }, + { + label: '单价差额', + field: 'differencePrice', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm:{ + type: 'slot', + disabled: true + } + }, + // { + // label: '未税差额', + // field: 'untaxedDifference', + // formatter: accountantFormart, + // table: { + // width: 150 + // }, + // form: { + // component: 'InputNumber', + // componentProps: { + // min: 0, + // precision: 6, + // } + // }, + // tableForm: { + // type: 'InputNumber', + // min: 0, + // precision: 6, + // } + // }, + // { + // label: '含税差额', + // field: 'taxInclusiveDifference', + // formatter: accountantFormart, + // table: { + // width: 150 + // }, + // form: { + // component: 'InputNumber', + // componentProps: { + // min: 0, + // precision: 6, + // } + // }, + // tableForm: { + // type: 'InputNumber', + // min: 0, + // precision: 6, + // } + // }, + { + label: '收货日期', + field: 'deliveryDate', + isTable: true, + 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', + } + } + }, + { + label: '开票数量', + field: 'invoicableQuantity', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '财务凭证号', + field: 'voucherNumber', + sort: 'custom', + table: { + width: 200 + } + }, + { + label: '参考凭证描述', + field: 'voucherNumberRemark', + sort: 'custom', + table: { + width: 150 + }, + }, +])) + +//表单校验 +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' } + ], + requestTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + + +// 发票回转 +export const SupplierinvoiceRecordMainTransfer = useCrudSchemas(reactive([ + { + label: '冲销日记帐', + field: 'reverseInvoiceJournal', + form: { + componentProps: { + value:'APINVCOR', + disabled: true, + } + }, + }, + { + label: '调整账代码', + field: 'adjustmentJournal', + form: { + componentProps: { + value:'APADJ', + disabled: true, + } + }, + }, + { + label: '回转日期', + field: 'reversepostingdate', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault:11, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '说明', + field: 'tcCInvoiceRemark', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: true, + isDetail:false, + form: { + componentProps: { + type:"textarea", + maxlength:50, + showWordLimit:true + } + } + } +])) + + +//表单校验 +export const SupplierinvoiceRecordMainTransferRules = reactive({ + reversepostingdate: [ + { required: true, message: '请选择过账日期', trigger: 'change' } + ] +}) +