diff --git a/.env.base b/.env.base index a8c77b2..1c695ec 100644 --- a/.env.base +++ b/.env.base @@ -4,8 +4,8 @@ VITE_NODE_ENV=development VITE_DEV=true # 请求路径 -VITE_BASE_URL='http://47.98.161.246:48080' -# VITE_BASE_URL='http://114.215.207.150:48080' +# VITE_BASE_URL='http://47.98.161.246:48080' +VITE_BASE_URL='http://114.215.207.150:48080' # 高德地图key密钥 # 1寻驾 diff --git a/src/components/DictTag/src/DictTag.vue b/src/components/DictTag/src/DictTag.vue index 606229f..7b0090e 100644 --- a/src/components/DictTag/src/DictTag.vue +++ b/src/components/DictTag/src/DictTag.vue @@ -50,7 +50,7 @@ export default defineComponent({ } disableTransitions={true} > - {dictData.value?.label} + {dictData.value?.label || '未知'} ) } diff --git a/src/components/SSTable/index.vue b/src/components/SSTable/index.vue index b3e9532..33ca068 100644 --- a/src/components/SSTable/index.vue +++ b/src/components/SSTable/index.vue @@ -5,6 +5,8 @@ :data="tableObject.tableList" :row-key="rowkey" :expand-row-keys="expandRowKeys" + :show-summary="showSummary" + :summary-method="summaryMethod" border style="flex: 1" @selection-change="handleSelectionChange" @@ -62,7 +64,9 @@ const props = defineProps({ tableObject: { type: Object, default: () => ({ tableList: [] }) }, tableColumns: { type: Array, default: () => [] }, rowkey: { type: String, default: 'id' }, - expandRowKeys: { type: Array, default: () => [] } + expandRowKeys: { type: Array, default: () => [] }, + showSummary: { type: Boolean, default: false }, + summaryMethod: { type: Function, default: null } }) const emit = defineEmits(['update:tableObject', 'getList', 'getCheckedColumns', 'selection-change']) diff --git a/src/views/Clue/Order/Comp/MallOrderList.vue b/src/views/Clue/Order/Comp/MallOrderList.vue index 7d5848a..65fe9b9 100644 --- a/src/views/Clue/Order/Comp/MallOrderList.vue +++ b/src/views/Clue/Order/Comp/MallOrderList.vue @@ -30,6 +30,8 @@ :tableColumns="allSchemas.tableColumns.filter((it) => it.paramLevel == 1)" rowkey="signOrderId" :expandRowKeys="expendRows" + :showSummary="true" + :summaryMethod="summaryMethod" @get-list="getTableList" @get-checked-columns="getCheckedColumns" @selection-change="handleSelectionChange" @@ -170,8 +172,6 @@ import DialogOrderProduct from './DialogOrderProduct.vue' import { removeNullField } from '@/utils' import { formatDate } from '@/utils/formatTime' import { ElMessageBox, ElOption, ElSelect } from 'element-plus' -// import { VueDraggable } from 'vue-draggable-plus' -// import { checkPermi } from '@/utils/permission' const userOptions = ref([]) const allUserOptions = ref([]) @@ -194,7 +194,12 @@ const tableObject = ref({ loading: false, total: 1, pageSize: 20, - pageNo: 1 + pageNo: 1, + totalData: { + totalReceivedMoney: 0, + totalSignPrice: 0, + totalPayAmount: 0 + } }) function resetQuery() { @@ -226,6 +231,7 @@ async function getTableList() { const data = await SignApi.getSignPage(removeNullField(params)) tableObject.value.tableList = data.list.map((it) => ({ ...it, ...it.orderDiyParams })) tableObject.value.total = data.total + tableObject.value.totalData = data.totalData } finally { tableObject.value.loading = false } @@ -366,51 +372,27 @@ function openProduct(row) { orderProductDialog.value.open(row.signId) } -// async function handleRemoveProduct(row) { -// try { -// // 修改状态的二次确认 -// await message.confirm(`确认要删除${row.productName}吗?`) -// // 发起修改状态 -// await SignApi.removeOrderProduct(row.id) -// message.success('删除成功') -// // 刷新列表 -// getTableList() -// } catch {} -// } - -// async function handleChangeProdoce(row) { -// try { -// // 修改状态的二次确认 -// await message.confirm('确认要修改生产状态吗?') -// // 发起修改状态 -// await SignApi.updateProduceStatus({ -// signId: row.signId, -// id: row.id, -// isProduced: row.isProduced -// }) -// message.success('修改成功') -// // 刷新列表 -// // getTableList() -// } catch { -// // 取消后,进行恢复按钮 -// row.isProduced = !row.isProduced -// } -// } +function summaryMethod({ columns }) { + const sums = [] + columns.forEach((column, index) => { + if (index === 0) { + sums[index] = '合计' + return + } + if (column.property == 'payTotalAmount') { + sums[index] = tableObject.value.totalData?.totalPayAmount || 0 + } else if (column.property == 'signTotalPrice') { + sums[index] = tableObject.value.totalData?.totalSignPrice || 0 + } else if (column.property == 'receivedMoney') { + sums[index] = tableObject.value.totalData?.totalReceivedMoney || 0 + } else { + sums[index] = '' + } + }) + return sums +} const expendRows = ref([]) -// async function onDragEnd(ev) { -// try { -// expendRows.value = [ev.data.signId] -// const list = tableObject.value.tableList.find((it) => it.signId == ev.data.signId).signProducts -// await SignApi.updateProduceSort(list.map((it) => it.id)) -// message.success('修改成功') -// // 刷新列表 -// getTableList() -// } catch (error) { -// console.log(error) -// getTableList() -// } -// } diff --git a/src/views/Clue/Pool/Comp/DrawerClue.vue b/src/views/Clue/Pool/Comp/DrawerClue.vue index 62b6093..9b44815 100644 --- a/src/views/Clue/Pool/Comp/DrawerClue.vue +++ b/src/views/Clue/Pool/Comp/DrawerClue.vue @@ -16,7 +16,8 @@
{{ info.name }}
{{ info.phone }}
- {{ info.intentionStateName }} + +
@@ -64,8 +65,11 @@ >
-
- {{ item.operateUserName }} +
+ + {{ item.operateUserName }} + +
{{ item.content }}