|
@@ -126,11 +126,9 @@
|
|
|
<el-tab-pane label="记录" name="record">
|
|
<el-tab-pane label="记录" name="record">
|
|
|
<el-table :data="assignRecords" border style="width: 100%" max-height="400">
|
|
<el-table :data="assignRecords" border style="width: 100%" max-height="400">
|
|
|
<el-table-column label="序号" type="index" width="80" align="center" />
|
|
<el-table-column label="序号" type="index" width="80" align="center" />
|
|
|
- <el-table-column label="分配时间" prop="assignTime" align="center" />
|
|
|
|
|
- <el-table-column label="分配人" prop="assignedBy" align="center" />
|
|
|
|
|
- <el-table-column label="分配目标" prop="assignTarget" align="center" />
|
|
|
|
|
- <el-table-column label="商品数量" prop="productCount" align="center" />
|
|
|
|
|
- <el-table-column label="备注" prop="remark" min-width="200" show-overflow-tooltip />
|
|
|
|
|
|
|
+ <el-table-column label="分配时间" prop="createTime" align="center" />
|
|
|
|
|
+ <el-table-column label="分配人" prop="createName" align="center" />
|
|
|
|
|
+ <el-table-column label="分配目标" prop="assigneeName" align="center" />
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
</el-tabs>
|
|
@@ -229,6 +227,7 @@
|
|
|
|
|
|
|
|
<script setup name="SplitAssignDialog" lang="ts">
|
|
<script setup name="SplitAssignDialog" lang="ts">
|
|
|
import { getOrderMain } from '@/api/order/orderMain';
|
|
import { getOrderMain } from '@/api/order/orderMain';
|
|
|
|
|
+import { listOrderAssignment } from '@/api/order/orderAssignmentLog';
|
|
|
import { addOrderSplitAssign, addOrderAssignment } from '@/api/order/orderAssignmentLog';
|
|
import { addOrderSplitAssign, addOrderAssignment } from '@/api/order/orderAssignmentLog';
|
|
|
import { OrderSplitAssignForm, OrderProductAssignRule, OrderAssignmentForm } from '@/api/order/orderAssignmentLog/types';
|
|
import { OrderSplitAssignForm, OrderProductAssignRule, OrderAssignmentForm } from '@/api/order/orderAssignmentLog/types';
|
|
|
|
|
|
|
@@ -335,22 +334,29 @@ const open = async (orderId: string | number) => {
|
|
|
assignedProducts.value = productList.filter((item: any) => item.assignmentStatus === '1');
|
|
assignedProducts.value = productList.filter((item: any) => item.assignmentStatus === '1');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 模拟分配记录
|
|
|
|
|
- assignRecords.value = [
|
|
|
|
|
- {
|
|
|
|
|
- assignTime: '2024-01-14 10:30:00',
|
|
|
|
|
- assignedBy: '张三',
|
|
|
|
|
- assignTarget: '供应商A',
|
|
|
|
|
- productCount: 2,
|
|
|
|
|
- remark: '紧急订单优先处理'
|
|
|
|
|
- }
|
|
|
|
|
- ];
|
|
|
|
|
|
|
+ // 加载分配记录
|
|
|
|
|
+ await loadAssignRecords(orderId);
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
proxy?.$modal.msgError('获取订单信息失败');
|
|
proxy?.$modal.msgError('获取订单信息失败');
|
|
|
drawer.visible = false;
|
|
drawer.visible = false;
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+/** 加载分配记录 */
|
|
|
|
|
+const loadAssignRecords = async (orderId: string | number) => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const res = await listOrderAssignment({
|
|
|
|
|
+ orderId: orderId,
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 100
|
|
|
|
|
+ });
|
|
|
|
|
+ assignRecords.value = res.rows || [];
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error('获取分配记录失败:', error);
|
|
|
|
|
+ assignRecords.value = [];
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
/** 表单重置 */
|
|
/** 表单重置 */
|
|
|
const reset = () => {
|
|
const reset = () => {
|
|
|
assignForm.targetType = '';
|
|
assignForm.targetType = '';
|