From bf6b7af0fb6c230eb15dd09ceda3a04abf958141 Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期四, 09 一月 2025 18:36:22 +0800
Subject: [PATCH] add:发货
---
pages/order/list/index.vue | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 106 insertions(+), 3 deletions(-)
diff --git a/pages/order/list/index.vue b/pages/order/list/index.vue
index dc1cece..c7292c0 100644
--- a/pages/order/list/index.vue
+++ b/pages/order/list/index.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <el-bus-crud
+<!-- <el-bus-crud
ref="crud"
v-bind="tableConfig"
:extra-query="{ levelDown: checkedLevelDown }"
@@ -14,7 +14,11 @@
>未处理的质检异常订单</el-checkbox
>
</template>
- </el-bus-crud>
+ </el-bus-crud>-->
+ <el-bus-crud
+ ref="crud"
+ v-bind="tableConfig"
+ ></el-bus-crud>
<div id="print-container">
<print-list ref="printList" :order-list="orderList" />
</div>
@@ -61,6 +65,12 @@
statusComp.extraQuery = { ...params, statusBackend: '' }
statusComp.getOtherOptions()
}
+ const abnormalOrderStatusComp = searchForm.getComponentById('abnormalOrderStatus')
+ if (abnormalOrderStatusComp) {
+ // 组件内部不会修改这个prop直接修改可忽略警告
+ abnormalOrderStatusComp.extraQuery = { ...params, abnormalOrderStatus: '' }
+ abnormalOrderStatusComp.getOtherOptions()
+ }
}
},
beforeOpen: (row, isNew) => {
@@ -98,6 +108,7 @@
),
minWidth: 200,
},
+ { label: '快递号', prop: 'deliveryNo', minWidth: 120 },
],
searchFormAttrs: {
labelWidth: 'auto',
@@ -126,6 +137,41 @@
// code: 'ORDER_STATUS_BACKEND',
},
default: this.$route.query.statusBackend || '',
+ span: 24,
+ searchImmediately: true,
+ on: {
+ optionsChange: (e, updateForm, { currentComp }) => {
+ if (Array.isArray(e[0]) && e[0].length > 0) {
+ const totalCount = e[0].reduce((total, current) => {
+ return (total += current.orderCount)
+ }, 0)
+ // 组件内部不会修改这个prop直接修改可忽略警告
+ currentComp.props = {
+ allLabel: `不限(${totalCount})`,
+ }
+ }
+ },
+ },
+ },
+ {
+ label: '异常订单:',
+ id: 'abnormalOrderStatus',
+ type: 'bus-radio',
+ el: {
+ hasAll: true,
+ otherInterfaceUri: 'flower/api/order/abnormal/status/count',
+ childType: 'el-radio-button',
+ filterOptions: (list) => {
+ return list.map((item) => {
+ return {
+ ...item,
+ label: `${item.label}(${item.orderCount})`,
+ }
+ })
+ },
+ // code: 'ORDER_STATUS_BACKEND',
+ },
+ default: this.$route.query.abnormalOrderStatus || '',
span: 24,
searchImmediately: true,
on: {
@@ -315,6 +361,14 @@
],
extraButtons: [
{
+ text: '快递号',
+ show: (row) => !row.partnerName && row.statusBackend === 'SEND',
+ atClick: (row) => {
+ this.$refs.crud.$refs.extraDialog[1].show(row)
+ return false
+ },
+ },
+ {
text: '发货',
show: (row) => !row.partnerName && row.statusBackend === 'SEND',
atClick: (row) => {
@@ -351,9 +405,22 @@
hiddenReverseItems: [],
form: [
{
+ label: '物流公司:',
+ id: 'logisticsCompanyCode',
+ type: 'bus-select-dict',
+ readonly: true,
+ el: {
+ code: 'LOGISTICS_COMPANY_CODE',
+ style: 'width:100%',
+ },
+ str: true,
+ rules: {required: true, message: '物流公司'},
+ },
+ {
label: '快递号:',
id: 'deliveryNo',
- type: 'input',
+ type: 'text',
+ readonly: true,
rules: {
required: true,
message: '请输入快递号',
@@ -371,6 +438,42 @@
}
},
},
+ {
+ title: '快递号录入',
+ hiddenReverseItems: [],
+ form: [
+ {
+ label: '物流公司:',
+ id: 'logisticsCompanyCode',
+ type: 'bus-select-dict',
+ el: {
+ code: 'LOGISTICS_COMPANY_CODE',
+ style: 'width:100%',
+ },
+ str: true,
+ rules: {required: true, message: '物流公司'},
+ },
+ {
+ label: '快递号:',
+ id: 'deliveryNo',
+ type: 'input',
+ rules: {
+ required: true,
+ message: '请输入快递号',
+ trigger: 'blur',
+ },
+ },
+ ],
+ atConfirm: async (val) => {
+ const { code } = await this.$elBusHttp.request(
+ 'flower/api/order/list/saveDeliveryNo',
+ { method: 'post', data: val }
+ )
+ if (code === 0) {
+ this.$message.success('快递号录入成功')
+ }
+ },
+ },
],
},
}
--
Gitblit v1.9.3