|
|
|
@ -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() |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped></style> |
|
|
|
|