diff --git a/src/api/business/master-order.js b/src/api/business/master-order.js index baa7938..2fe54e1 100644 --- a/src/api/business/master-order.js +++ b/src/api/business/master-order.js @@ -30,5 +30,10 @@ export const getProjectContracts = projectId => request({ url: '/blade-transport/contract-manage/list', method: 'get', - params: { current: 1, size: 9999, projectId }, + params: { + current: 1, + size: 9999, + projectId, + contractCategory: '客户合同', + }, }); diff --git a/src/api/settlement/formalSettlement.js b/src/api/settlement/formalSettlement.js index 593835a..42e47f3 100644 --- a/src/api/settlement/formalSettlement.js +++ b/src/api/settlement/formalSettlement.js @@ -11,8 +11,10 @@ export const getCandidates = (current, size, params) => method: 'get', params: { current, size, ...params }, }); -export const getContractOptions = keyword => - request({ url: `${baseUrl}/contract-options`, method: 'get', params: { keyword } }); +export const getContractOptions = (keyword, projectId) => + request({ url: `${baseUrl}/contract-options`, method: 'get', params: { keyword, projectId } }); +export const getNextNo = () => request({ url: `${baseUrl}/next-no`, method: 'get' }); +export const getFeeOptions = () => request({ url: `${baseUrl}/fee-options`, method: 'get' }); export const getCandidateDetails = (current, size, params) => request({ url: `${baseUrl}/candidate-details`, diff --git a/src/option/business/common-route.js b/src/option/business/common-route.js index 47db3de..3c57882 100644 --- a/src/option/business/common-route.js +++ b/src/option/business/common-route.js @@ -12,248 +12,284 @@ export const config = { export const option = { ...createCrudOption([ - { - label: '线路名称', - prop: 'routeName', - span: 12, - minWidth: 150, - overHidden: true, - rules: textRule('线路名称', 100, true), - }, - { - label: '线路编号', - prop: 'routeCode', - minWidth: 120, - addDisplay: false, - editDisabled: true, - }, - { - label: '发货地', - prop: 'departureName', - minWidth: 140, - addDisplay: false, - editDisplay: false, - }, - { - label: '发货地址', - prop: 'departureAddress', - formslot: true, - span: 24, - minWidth: 220, - overHidden: true, - rules: textRule('发货地址', 255, true), - }, - { - label: '发货经度', - prop: 'departureLongitude', - type: 'number', - precision: 6, - minWidth: 120, - hide: true, - addDisplay: false, - editDisplay: false, - }, - { - label: '发货纬度', - prop: 'departureLatitude', - type: 'number', - precision: 6, - minWidth: 120, - hide: true, - addDisplay: false, - editDisplay: false, - }, - { - label: '发货联系人', - prop: 'departureContact', - minWidth: 120, - rules: textRule('发货联系人', 50), - }, - { - label: '发货联系方式', - prop: 'departurePhone', - minWidth: 140, - rules: [phoneRule('发货联系方式'), ...textRule('发货联系方式', 50)], - }, - { - label: '收货地', - prop: 'arrivalName', - minWidth: 140, - addDisplay: false, - editDisplay: false, - }, - { - label: '收货地址', - prop: 'arrivalAddress', - formslot: true, - span: 24, - minWidth: 220, - overHidden: true, - rules: textRule('收货地址', 255, true), - }, - { - label: '收货经度', - prop: 'arrivalLongitude', - type: 'number', - precision: 6, - minWidth: 120, - hide: true, - addDisplay: false, - editDisplay: false, - }, - { - label: '收货纬度', - prop: 'arrivalLatitude', - type: 'number', - precision: 6, - minWidth: 120, - hide: true, - addDisplay: false, - editDisplay: false, - }, - { - label: '收货联系人', - prop: 'arrivalContact', - minWidth: 120, - rules: textRule('收货联系人', 50), - }, - { - label: '收货联系方式', - prop: 'arrivalPhone', - minWidth: 140, - rules: [phoneRule('收货联系方式'), ...textRule('收货联系方式', 50)], - }, - { - label: '备注', - prop: 'remark', - type: 'textarea', - minRows: 2, - span: 24, - minWidth: 180, - maxlength: 500, - showWordLimit: true, - rules: textRule('备注', 500), - }, - { - label: '组织', - prop: 'deptName', - minWidth: 150, - addDisplay: false, - editDisplay: false, - }, - // 搜索字段独立于表格和表单字段,避免筛选配置影响数据展示和编辑布局。 - { - label: '线路名称', - prop: 'searchRouteName', - searchProp: 'routeName', - search: true, - searchOrder: 7, - searchPlaceholder: '请输入', - hide: true, - display: false, - addDisplay: false, - editDisplay: false, - viewDisplay: false, - }, - { - label: '线路编号', - prop: 'searchRouteCode', - searchProp: 'routeCode', - search: true, - searchOrder: 6, - searchPlaceholder: '请输入', - hide: true, - display: false, - addDisplay: false, - editDisplay: false, - viewDisplay: false, - }, - { - label: '发货地', - prop: 'searchDepartureName', - searchProp: 'departureName', - search: true, - searchOrder: 5, - searchPlaceholder: '请输入', - hide: true, - display: false, - addDisplay: false, - editDisplay: false, - viewDisplay: false, - }, - { - label: '发货地址', - prop: 'searchDepartureAddress', - searchProp: 'departureAddress', - search: true, - searchOrder: 4, - searchPlaceholder: '请输入', - hide: true, - display: false, - addDisplay: false, - editDisplay: false, - viewDisplay: false, - }, - { - label: '收货地', - prop: 'searchArrivalName', - searchProp: 'arrivalName', - search: true, - searchOrder: 3, - searchPlaceholder: '请输入', - hide: true, - display: false, - addDisplay: false, - editDisplay: false, - viewDisplay: false, - }, - { - label: '收货地址', - prop: 'searchArrivalAddress', - searchProp: 'arrivalAddress', - search: true, - searchOrder: 2, - searchPlaceholder: '请输入', - hide: true, - display: false, - addDisplay: false, - editDisplay: false, - viewDisplay: false, - }, - { - label: '组织', - prop: 'searchDeptId', - searchProp: 'deptId', - search: true, - searchOrder: 1, - searchType: 'cascader', - searchPlaceholder: '请选择', - hide: true, - display: false, - addDisplay: false, - editDisplay: false, - viewDisplay: false, - dicData: [], - props: { - label: 'label', - value: 'value', - children: 'children', + { + label: '线路名称', + prop: 'routeName', + span: 12, + minWidth: 150, + overHidden: true, + rules: textRule('线路名称', 100, true), }, - checkStrictly: true, - emitPath: false, - showAllLevels: false, - filterable: true, - }, - ...auditColumns - .filter(column => column.prop !== 'createUserName') - .map(column => - ['createTime', 'updateTime'].includes(column.prop) ? { ...column, minWidth: 190 } : column - ) - .sort( - (first, second) => - ['updateUserName', 'updateTime', 'createTime'].indexOf(first.prop) - - ['updateUserName', 'updateTime', 'createTime'].indexOf(second.prop) - ), + { + label: '线路编号', + prop: 'routeCode', + minWidth: 120, + addDisplay: false, + editDisabled: true, + }, + { + label: '发货地', + prop: 'departureName', + minWidth: 140, + addDisplay: false, + editDisplay: false, + }, + { + label: '发货省ID', + prop: 'departureProvinceId', + hide: true, + display: false, + }, + { + label: '发货市ID', + prop: 'departureCityId', + hide: true, + display: false, + }, + { + label: '发货区ID', + prop: 'departureDistrictId', + hide: true, + display: false, + }, + { + label: '发货地址', + prop: 'departureAddress', + formslot: true, + span: 24, + minWidth: 220, + overHidden: true, + rules: textRule('发货地址', 255, true), + }, + { + label: '发货经度', + prop: 'departureLongitude', + type: 'number', + precision: 6, + minWidth: 120, + hide: true, + addDisplay: false, + editDisplay: false, + }, + { + label: '发货纬度', + prop: 'departureLatitude', + type: 'number', + precision: 6, + minWidth: 120, + hide: true, + addDisplay: false, + editDisplay: false, + }, + { + label: '发货联系人', + prop: 'departureContact', + minWidth: 120, + rules: textRule('发货联系人', 50), + }, + { + label: '发货联系方式', + prop: 'departurePhone', + minWidth: 140, + rules: [phoneRule('发货联系方式'), ...textRule('发货联系方式', 50)], + }, + { + label: '收货地', + prop: 'arrivalName', + minWidth: 140, + addDisplay: false, + editDisplay: false, + }, + { + label: '收货省ID', + prop: 'arrivalProvinceId', + hide: true, + display: false, + }, + { + label: '收货市ID', + prop: 'arrivalCityId', + hide: true, + display: false, + }, + { + label: '收货区ID', + prop: 'arrivalDistrictId', + hide: true, + display: false, + }, + { + label: '收货地址', + prop: 'arrivalAddress', + formslot: true, + span: 24, + minWidth: 220, + overHidden: true, + rules: textRule('收货地址', 255, true), + }, + { + label: '收货经度', + prop: 'arrivalLongitude', + type: 'number', + precision: 6, + minWidth: 120, + hide: true, + addDisplay: false, + editDisplay: false, + }, + { + label: '收货纬度', + prop: 'arrivalLatitude', + type: 'number', + precision: 6, + minWidth: 120, + hide: true, + addDisplay: false, + editDisplay: false, + }, + { + label: '收货联系人', + prop: 'arrivalContact', + minWidth: 120, + rules: textRule('收货联系人', 50), + }, + { + label: '收货联系方式', + prop: 'arrivalPhone', + minWidth: 140, + rules: [phoneRule('收货联系方式'), ...textRule('收货联系方式', 50)], + }, + { + label: '备注', + prop: 'remark', + type: 'textarea', + minRows: 2, + span: 24, + minWidth: 180, + maxlength: 500, + showWordLimit: true, + rules: textRule('备注', 500), + }, + { + label: '组织', + prop: 'deptName', + minWidth: 150, + addDisplay: false, + editDisplay: false, + }, + // 搜索字段独立于表格和表单字段,避免筛选配置影响数据展示和编辑布局。 + { + label: '线路名称', + prop: 'searchRouteName', + searchProp: 'routeName', + search: true, + searchOrder: 7, + searchPlaceholder: '请输入', + hide: true, + display: false, + addDisplay: false, + editDisplay: false, + viewDisplay: false, + }, + { + label: '线路编号', + prop: 'searchRouteCode', + searchProp: 'routeCode', + search: true, + searchOrder: 6, + searchPlaceholder: '请输入', + hide: true, + display: false, + addDisplay: false, + editDisplay: false, + viewDisplay: false, + }, + { + label: '发货地', + prop: 'searchDepartureName', + searchProp: 'departureName', + search: true, + searchOrder: 5, + searchPlaceholder: '请输入', + hide: true, + display: false, + addDisplay: false, + editDisplay: false, + viewDisplay: false, + }, + { + label: '发货地址', + prop: 'searchDepartureAddress', + searchProp: 'departureAddress', + search: true, + searchOrder: 4, + searchPlaceholder: '请输入', + hide: true, + display: false, + addDisplay: false, + editDisplay: false, + viewDisplay: false, + }, + { + label: '收货地', + prop: 'searchArrivalName', + searchProp: 'arrivalName', + search: true, + searchOrder: 3, + searchPlaceholder: '请输入', + hide: true, + display: false, + addDisplay: false, + editDisplay: false, + viewDisplay: false, + }, + { + label: '收货地址', + prop: 'searchArrivalAddress', + searchProp: 'arrivalAddress', + search: true, + searchOrder: 2, + searchPlaceholder: '请输入', + hide: true, + display: false, + addDisplay: false, + editDisplay: false, + viewDisplay: false, + }, + { + label: '组织', + prop: 'searchDeptId', + searchProp: 'deptId', + search: true, + searchOrder: 1, + searchType: 'cascader', + searchPlaceholder: '请选择', + hide: true, + display: false, + addDisplay: false, + editDisplay: false, + viewDisplay: false, + dicData: [], + props: { + label: 'label', + value: 'value', + children: 'children', + }, + checkStrictly: true, + emitPath: false, + showAllLevels: false, + filterable: true, + }, + ...auditColumns + .filter(column => column.prop !== 'createUserName') + .map(column => + ['createTime', 'updateTime'].includes(column.prop) ? { ...column, minWidth: 190 } : column + ) + .sort( + (first, second) => + ['updateUserName', 'updateTime', 'createTime'].indexOf(first.prop) - + ['updateUserName', 'updateTime', 'createTime'].indexOf(second.prop) + ), ]), dialogCustomClass: 'avue-dialog--common-route', }; diff --git a/src/option/settlement/formalSettlementForm.js b/src/option/settlement/formalSettlementForm.js index 07623d0..99674a2 100644 --- a/src/option/settlement/formalSettlementForm.js +++ b/src/option/settlement/formalSettlementForm.js @@ -1,6 +1,6 @@ export const formalSettlementFormFields = [ { label: '结算单号', prop: 'formalSettlementNo', readonly: true }, - { label: '项目名称', prop: 'projectName', readonly: true }, + { label: '项目名称', prop: 'projectId', type: 'project', required: true }, { label: '所属组织', prop: 'deptName', readonly: true }, { label: '合同编号', prop: 'contractNo', readonly: true }, { label: '合同名称', prop: 'contractId', type: 'contract', required: true }, @@ -18,6 +18,8 @@ export const formalSettlementFormFields = [ export const createFormalSettlementForm = () => ({ id: null, formalSettlementNo: '', + projectId: null, + projectName: '', contractId: null, contractName: '', settlementType: '', diff --git a/src/option/settlement/formalSettlementTable.js b/src/option/settlement/formalSettlementTable.js index fd0dcbb..dc8c79e 100644 --- a/src/option/settlement/formalSettlementTable.js +++ b/src/option/settlement/formalSettlementTable.js @@ -52,6 +52,15 @@ export const detailColumns = [ { label: '备注', prop: 'remark', minWidth: 180 }, ]; +export const summaryColumns = [ + { label: '费用类型', prop: 'feeType', minWidth: 150 }, + { label: '费用项', prop: 'feeItem', minWidth: 160 }, + { label: '原金额', prop: 'originalAmount', minWidth: 130 }, + { label: '调整金额', prop: 'adjustAmount', minWidth: 140 }, + { label: '结算金额', prop: 'settlementAmount', minWidth: 140 }, + { label: '备注', prop: 'remark', minWidth: 200 }, +]; + export const candidateColumns = [ { label: '预结算单号', prop: 'preSettlementNo', minWidth: 170 }, { label: '项目名称', prop: 'projectName', minWidth: 140 }, @@ -73,6 +82,8 @@ export const candidateDetailColumns = [ { label: '合同编号', prop: 'contractNo', minWidth: 150 }, { label: '合同名称', prop: 'contractName', minWidth: 170 }, { label: '来源', prop: 'sourceType', minWidth: 110 }, + { label: '预结算单号', prop: 'preSettlementNo', minWidth: 160 }, + { label: '正式结算单号', prop: 'formalSettlementNo', minWidth: 160 }, { label: '运单号', prop: 'waybillNo', minWidth: 150 }, { label: '车号', prop: 'vehicleNo', minWidth: 130 }, { label: '运输类型', prop: 'transportType', minWidth: 120 }, diff --git a/src/views/business/common-route.vue b/src/views/business/common-route.vue index 836a889..ba7e367 100644 --- a/src/views/business/common-route.vue +++ b/src/views/business/common-route.vue @@ -303,6 +303,7 @@ 确定 @@ -315,6 +316,7 @@