diff --git a/src/api/finance/MerchantDepositSlip.js b/src/api/finance/MerchantDepositSlip.js index a5305416..9b0b3c87 100644 --- a/src/api/finance/MerchantDepositSlip.js +++ b/src/api/finance/MerchantDepositSlip.js @@ -50,3 +50,31 @@ export const postFindOrderDetail = data => { data }); }; + +/** + * 查询订单详情列表 + * @param {*} data + * @returns + */ +export const postCancleOrderInfoBindReconcilitionOrder = data => { + return request({ + url: `/api/logpm-statisticsdata/merchantStatistics/cancleOrderInfoBindReconcilitionOrder`, + method: 'post', + data, + }); +}; + + +/** + * 对账单导出 + * @param {*} data + * @returns + */ +export const postReconciliationListExport = data => { + return request({ + url: `/api/logpm-statisticsdata/merchantStatistics/reconciliationListExport`, + method: 'post', + data, + responseType: 'blob' + }); +}; \ No newline at end of file diff --git a/src/option/distribution/TripartiteTransfer.js b/src/option/distribution/TripartiteTransfer.js index 540f5eb4..e726c371 100644 --- a/src/option/distribution/TripartiteTransfer.js +++ b/src/option/distribution/TripartiteTransfer.js @@ -628,6 +628,36 @@ export const detailsColumnList = [ fixed: false, sortable: true, }, + { + prop: 'customerName', + label: '最终收货人', + type: 1, + values: '', + width: '130', + checkarr: [], + fixed: false, + sortable: true, + }, + { + prop: 'customerTelephone', + label: '最终收货人电话', + type: 1, + values: '', + width: '130', + checkarr: [], + fixed: false, + sortable: true, + }, + { + prop: 'customerAddress', + label: '最终收货地址', + type: 1, + values: '', + width: '130', + checkarr: [], + fixed: false, + sortable: true, + }, { prop: 'signUserName', label: '签收人', diff --git a/src/option/finance/MerchantDepositSlip.js b/src/option/finance/MerchantDepositSlip.js index 77cd7c41..3ac69318 100644 --- a/src/option/finance/MerchantDepositSlip.js +++ b/src/option/finance/MerchantDepositSlip.js @@ -28,7 +28,7 @@ export const columnList = [ { prop: 'waybillNo', label: '运单号', - type: 1, + type: 2, values: '', width: '150', checkarr: [], @@ -39,7 +39,7 @@ export const columnList = [ { prop: 'orderCode', label: '订单编号', - type: 1, + type: 2, values: '', width: '150', checkarr: [], @@ -50,7 +50,7 @@ export const columnList = [ { prop: 'consignee', label: '收货单位', - type: 1, + type: 2, values: '', width: '150', checkarr: [], @@ -303,7 +303,7 @@ export const columnList = [ { prop: 'isAftersaleName', label: '是否售后', - type: 1, + type: 2, values: '', width: '150', checkarr: [ @@ -317,7 +317,7 @@ export const columnList = [ { prop: 'aftersaleOrder', label: '售后单号', - type: 1, + type: 2, values: '', width: '150', checkarr: [], @@ -350,7 +350,7 @@ export const columnList = [ { prop: 'createUserName', label: '对账单创建人', - type: 1, + type: 2, values: '', width: '150', checkarr: [], @@ -428,4 +428,88 @@ export const columnList = [ }, ]; +/** 对账单详情 -- 订单列表 */ +export const orderColumnList = [ + { + prop: '', + label: '复选框', + type: 0, + width: 55, + fixed: true, + }, + { + prop: '', + label: '序号', + type: 12, + values: '', + width: 55, + fixed: true, + }, + { + prop: 'orderCode', + label: '订单编号', + type: 1, + values: '', + width: '150', + checkarr: [], + fixed: true, + sortable: true, + head: false, + }, + { + prop: 'totalNum', + label: '总件数', + type: 1, + values: '', + width: '150', + checkarr: [], + fixed: false, + sortable: true, + head: false, + }, + { + prop: 'totalWeight', + label: '总重量', + type: 1, + values: '', + width: '150', + checkarr: [], + fixed: false, + sortable: true, + head: false, + }, + { + prop: 'totalVolume', + label: '总体积', + type: 1, + values: '', + width: '150', + checkarr: [], + fixed: false, + sortable: true, + head: false, + }, + { + prop: 'totalFee', + label: '总金额', + type: 1, + values: '', + width: '150', + checkarr: [], + fixed: false, + sortable: true, + head: false, + }, + { + prop: '', + label: '操作', + type: 6, + values: '', + width: '200', + checkarr: [], + fixed: 'right', + sortable: false, + }, +]; + export default columnList; diff --git a/src/option/waybill/TemporaryStorageList.js b/src/option/waybill/TemporaryStorageList.js index 5e8faf85..46f3d415 100644 --- a/src/option/waybill/TemporaryStorageList.js +++ b/src/option/waybill/TemporaryStorageList.js @@ -665,23 +665,23 @@ export const packageColumnList = [ sortable: true, head: false, }, - { - prop: 'costCategory', - label: '成本品类', - type: 6, - values: '', - width: '150', - checkarr: [], - fixed: 'right', - sortable: true, - head: false, - }, + // { + // prop: 'costCategory', + // label: '成本品类', + // type: 6, + // values: '', + // width: '150', + // checkarr: [], + // fixed: 'right', + // sortable: true, + // head: false, + // }, { prop: 'incomeCategory', label: '收入品类', type: 6, values: '', - width: '150', + width: '200', checkarr: [], fixed: 'right', sortable: true, diff --git a/src/option/waybill/WaybillOrderList.js b/src/option/waybill/WaybillOrderList.js index 9ca0c33e..deb4dfd7 100644 --- a/src/option/waybill/WaybillOrderList.js +++ b/src/option/waybill/WaybillOrderList.js @@ -696,19 +696,19 @@ export const columnList = [ isshowSummary: false, sortable: true, }, - /* { - prop: 'carrierName', - label: '审核状态', + { + prop: 'signNum', + label: '签收数量', type: 1, values: '', width: '130', checkarr: [], fixed: false, sortable: true, - }, */ - /* { - prop: 'carrierName', - label: '结算状态', + }, + { + prop: 'signUserName', + label: '签收人', type: 1, values: '', width: '130', @@ -716,7 +716,40 @@ export const columnList = [ fixed: false, isshowSummary: false, sortable: true, - }, */ + }, + { + prop: 'signTime', + label: '签收时间', + type: 1, + values: '', + width: '130', + checkarr: [], + fixed: false, + isshowSummary: false, + sortable: true, + }, + { + prop: 'signCheckUserName', + label: '签收审核人', + type: 1, + values: '', + width: '130', + checkarr: [], + fixed: false, + isshowSummary: false, + sortable: true, + }, + { + prop: 'signCheckTime', + label: '签收审核时间', + type: 1, + values: '', + width: '130', + checkarr: [], + fixed: false, + isshowSummary: false, + sortable: true, + }, { prop: 'remark', label: '备注', diff --git a/src/views/Pricesystem/Price/PriceBill.vue b/src/views/Pricesystem/Price/PriceBill.vue index ff5e8108..23fc613c 100644 --- a/src/views/Pricesystem/Price/PriceBill.vue +++ b/src/views/Pricesystem/Price/PriceBill.vue @@ -1152,7 +1152,8 @@ const initAssignmentForm = (data, isLine = true) => { details.form.sendOrg = data.sendOrgName; details.form.priceId = data.priceId; } - + details.form.startCity = []; + details.form.endCity = []; details.form.minCost = data.minCost || 0; details.form.additionalCost = data.additionalCost || 0; diff --git a/src/views/distribution/inventory/CreateOrder.vue b/src/views/distribution/inventory/CreateOrder.vue index a2482890..bb7cddfb 100644 --- a/src/views/distribution/inventory/CreateOrder.vue +++ b/src/views/distribution/inventory/CreateOrder.vue @@ -2329,21 +2329,21 @@ const onLoad = async (idsArr = []) => { element.MaintenanceOrNot = element.incomeCategoryName && element.costCategoryId ? '是' : '否'; - // 成本结算 + // 收入结算 element.confirmIncomeCategoryName = element.incomeCategoryName || '其它'; element.confirmIncomeCategoryId = element.incomeCategoryId || ''; element.incomeCategoryName = element.incomeCategoryName || '其它'; element.incomeCategory = element.incomeCategoryName || '其它'; element.incomeCategoryId = element.incomeCategoryId || ''; - - // 收入结算 + + // 成本结算 element.confirmCostCategoryName = element.costCategoryName || '其它'; element.confirmCostCategoryId = element.costCategoryId || ''; element.costCategoryName = element.costCategoryName || '其它'; element.costCategory = element.costCategoryName || '其它'; element.costCategoryId = element.costCategoryId || ''; - (!element.incomeCategoryId || !element.costCategoryId) && (_flag = true); + (!element.incomeCategoryId) && (_flag = true); } details.package.renderData = handleFilterData( @@ -2465,7 +2465,7 @@ const onEditLoad = async () => { val.freightPrice = isNumber(val.freightPrice) ? Number(val.freightPrice) : 0; val.deliveryPrice = isNumber(val.deliveryPrice) ? Number(val.deliveryPrice) : 0; val.pickupPrice = isNumber(val.pickupPrice) ? Number(val.pickupPrice) : 0; - val.subtotalFreight = Number(val.subtotalFreight); + val.subtotalFreight = isNumber(val.subtotalFreight) ? Number(val.pickupPrice) : 0; /** 系统维护 -- 干线计价方式 */ val.systemChargeType = 1; /** 系统维护 -- 配送计价方式 */ @@ -2505,15 +2505,15 @@ const onEditLoad = async () => { element.MaintenanceOrNot = element.incomeCategoryName && element.costCategoryId ? '是' : '否'; - // 成本结算 + // 收入结算 element.confirmIncomeCategoryName = element.incomeCategoryName || '其它'; element.confirmIncomeCategoryId = element.incomeCategoryId || ''; element.cloneIncomeCategoryId = element.incomeCategoryId || ''; // 编辑提交时, 跟据confirmIncomeCategoryId判断是否修改 element.incomeCategoryName = element.incomeCategoryName || '其它'; element.incomeCategory = element.incomeCategoryName || '其它'; element.incomeCategoryId = element.incomeCategoryId || ''; - - // 收入结算 + + // 成本结算 element.confirmCostCategoryName = element.costCategoryName || '其它'; element.confirmCostCategoryId = element.costCategoryId || ''; element.cloneCostCategoryId = element.costCategoryId || ''; // 编辑提交时, 跟据confirmCostCategoryId判断是否修改 @@ -2521,7 +2521,7 @@ const onEditLoad = async () => { element.costCategory = element.costCategoryName || '其它'; element.costCategoryId = element.costCategoryId || ''; - (!element.incomeCategoryId || !element.costCategoryId) && (_flag = true); + (!element.incomeCategoryId) && (_flag = true); } details.package.renderData = handleFilterData( @@ -2883,7 +2883,7 @@ const destinationWarehouseNameChange = val => { * row -- 行数据 * onlyComputedTrunline -- 是否只计算干线的价格 */ -const handleComputed = debounce((row: any, onlyComputedTrunline = false) => { +const handleComputed = (row: any, onlyComputedTrunline = false) => { const { template, trunkLine } = details.priceTemplate; if (Boolean(isDisabled.value && template && trunkLine)) @@ -2925,7 +2925,7 @@ const handleComputed = debounce((row: any, onlyComputedTrunline = false) => { } handlePrice(!onlyComputedTrunline, 'trunkline'); -}, 10); +}; /** 查询客户信息 */ const handleFindClientInfo = async (type, isClearId = 0) => { diff --git a/src/views/finance/MerchantDepositSlip.vue b/src/views/finance/MerchantDepositSlip.vue index a3fd993e..0aedf24a 100644 --- a/src/views/finance/MerchantDepositSlip.vue +++ b/src/views/finance/MerchantDepositSlip.vue @@ -77,11 +77,27 @@ + + + + + + + @@ -92,7 +108,13 @@ import dayjs from 'dayjs'; import { mapGetters } from 'vuex'; /** 获取字典 */ import { getDictionaryBiz } from '@/api/system/dict'; -import { postPageReconciliationList, postCheckBalance,postFindOrderDetail } from '@/api/finance/MerchantDepositSlip'; +import { + postPageReconciliationList, + postCheckBalance, + postFindOrderDetail, + postCancleOrderInfoBindReconcilitionOrder, + postReconciliationListExport + } from '@/api/finance/MerchantDepositSlip'; import { downloadXls, setNodeHeight, @@ -102,7 +124,7 @@ import { handleSelectQuery, handleTranslationDataSeclect, } from '@/utils/util'; -import { columnList } from '@/option/finance/MerchantDepositSlip'; +import { columnList, orderColumnList } from '@/option/finance/MerchantDepositSlip'; import { useRouter } from 'vue-router'; import { deepClone } from '@/utils/util'; import { ElMessage, ElMessageBox } from 'element-plus'; @@ -154,6 +176,7 @@ const details = reactive({ /** 列表加载loading */ list: false, pageLoading: false, + orderList: false }, /** 列表复选框选中的数据 */ selectionList: [], @@ -166,12 +189,19 @@ const details = reactive({ total: 0, }, form: {}, - /** 页面激活状态 : 1 -- toB; 2 -- toC */ - pageStatus: 1 as 1 | 2, + popUpShow: { + orderVisted: false + }, + orderInfo: { + reconciliationOrderId: '', + data: [], + query: {}, + columnList: deepClone(orderColumnList) + } }); const tableNodeRef1 = ref(); -const tableNodeRef2 = ref(); +const orderTableNodeRef = ref(); const { search, shortcuts, selectionList, drawerShow, page } = toRefs(details); @@ -182,9 +212,7 @@ console.log('permission :>> ', permission); onMounted(async () => { await nextTick(); - const node = details.pageStatus === 1 ? tableNodeRef1.value.$el : tableNodeRef2.value.$el; - - setNodeHeight(node, '', true); + setNodeHeight(tableNodeRef1.value.$el , '', true); }); /** 请求页面数据 */ @@ -304,7 +332,7 @@ const handleConfirm = () => { const value = details.selectionList[index]; if (Number(value.confirmStatisticsOrder) === 1) _errorArr.push(value.orderNo); - _arr.push(value.orderInfoId); + _arr.push(value.id); } if (_errorArr.length > 0) @@ -341,11 +369,24 @@ const handleExport = () => { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning', - }).then(() => { - ElMessage({ - type: 'success', - message: '导出成功!', - }); + }).then(async() => { + try { + details.loadingObj.pageLoading = true + + const submitData= {...details.query} + + const res = await postReconciliationListExport(submitData) + + const {status, data} = res + if (status !== 200) return + downloadXls(data, '对账单数据.xlsx') + + ElMessage.success('导出成功!'); + } catch (error) { + console.log('error :>> ', error); + }finally{ + details.loadingObj.pageLoading = false + } }); }; @@ -368,12 +409,53 @@ const ViewOrderList =async ({row})=>{ const {code, data} = res.data if (code !== 200) return + details.orderInfo.reconciliationOrderId = row.id + details.orderInfo.data = data || [] + details.popUpShow.orderVisted = true + + await nextTick() + setNodeHeight(orderTableNodeRef.value.$el, '60vh') } catch (error) { console.log('error :>> ', error); }finally{ details.loadingObj.pageLoading = false } } + +/** 移除订单 */ +const handleRemoveOrder = ({row}) => { + ElMessageBox.confirm('是否确认移除?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }).then(async() => { + try { + details.loadingObj.orderList = true + + const submitData= {reconciliationOrderId: details.orderInfo.reconciliationOrderId, orderInfoIds: [row.orderInfoId]} + + const res = await postCancleOrderInfoBindReconcilitionOrder(submitData) + + const {code, msg} = res.data + if (code !== 200) return + ElMessage.success(msg) + onLoad() + const resp = await postFindOrderDetail({ reconciliationOrderId: details.orderInfo.reconciliationOrderId }) + + const {code: code1,data: data1} = resp.data + if (code1 !== 200) return + details.orderInfo.data = data1 || [] + if (details.orderInfo.data.length === 0) details.popUpShow.orderVisted = false + + } catch (error) { + console.log('error :>> ', error); + } finally { + details.loadingObj.orderList = false + } + + + }); +}