Compare commits

..

No commits in common. 'acdcc670de14dd247fe82eb53c74c59cfb3a0d82' and '9472c5ea56bd4f98b93ff0b579e53a57ba714b1f' have entirely different histories.

  1. 5
      src/api/clue/settle.js
  2. 10
      src/views/Clue/Order/Comp/DialogOrder.vue
  3. 69
      src/views/Clue/Order/Comp/MallSettle.vue
  4. 22
      src/views/Clue/Order/Comp/Reback.vue
  5. 69
      src/views/Clue/Order/Comp/SchoolSettle.vue

@ -24,8 +24,3 @@ export const getMallSettleDetail = async (id) => {
export const batchSaveSettle = async (data) => {
return await request.post({ url: '/admin-api/crm/sign-settlement/batch/save', data })
}
// 修改结算
export const updateSettle = async (data) => {
return await request.post({ url: '/admin-api/crm/sign-settlement/update/money', data })
}

@ -191,17 +191,11 @@ function getFields() {
})
getOrderFieldList().then((data) => {
const list = useCrudSchemas(data).allSchemas.detailSchema
const arr = []
list.forEach((it) => {
const arr = useCrudSchemas(data).allSchemas.detailSchema
arr.forEach((it) => {
if (it.label.includes('日期')) {
it.dateFormat = 'YYYY-MM-DD'
}
if (it.field == 'receivedMoney') {
checkPermi(['clue:order:return-list']) && arr.push(it)
} else {
arr.push(it)
}
})
if (arr.length % 2 != 0) {
arr.push({})

@ -157,38 +157,16 @@
<el-table-column prop="phone" label="联系方式" width="120px" />
<el-table-column prop="signUserName" label="登记人" min-width="90" />
<el-table-column prop="dealDate" label="成交日期" width="120px" :formatter="dateFormatter" />
<el-table-column prop="createTime" label="支出日期" width="140px">
<template #default="{ row, col }">
<el-date-picker
v-if="row.edit"
v-model="row.createTime"
type="date"
size="small"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
style="width: 110px"
:clearable="false"
placeholder="选择日期"
<el-table-column
prop="createTime"
label="支出日期"
width="120px"
:formatter="dateFormatter"
/>
<div v-else>{{ dateFormatter(row, col, row.createTime) }}</div>
</template>
</el-table-column>
<el-table-column prop="signProduct" label="成交产品" min-width="150px" />
<el-table-column prop="signSpecs" label="成交规格" min-width="150px" />
<el-table-column prop="supplier" label="供应商" min-width="150px" />
<el-table-column prop="settlementPrice" label="结算单价" min-width="150px">
<template #default="{ row }">
<el-input-number
v-if="row.edit"
v-model="row.settlementPrice"
size="small"
:min="0"
:controls="false"
style="width: 100%"
/>
<div v-else>{{ row.settlementPrice }}</div>
</template>
</el-table-column>
<el-table-column prop="settlementPrice" label="结算单价" min-width="150px" />
<el-table-column prop="settlementNum" label="结算数量" min-width="150px" />
<el-table-column prop="settlementMoney" label="结算金额" min-width="150px" />
<el-table-column label="费用备注" width="90px">
@ -221,19 +199,6 @@
</el-popover>
</template>
</el-table-column>
<el-table-column label="操作" width="100px" fixed="right">
<template #default="{ row }">
<el-button
v-if="row.settlementState == '待结算'"
type="primary"
text
v-hasPermi="['clue:order:settle-update']"
@click="handleUpdate(row)"
>
{{ row.edit ? '保存' : '修改' }}
</el-button>
</template>
</el-table-column>
</el-table>
<Pagination
v-model:limit="searchForm.pageSize"
@ -353,28 +318,6 @@ function getSummaries(param) {
return sums
}
async function handleUpdate(row) {
if (row.edit) {
//
await message.confirm('是否确认修改结算数据?')
//
SettleApi.updateSettle({
settlementId: row.settlementId,
settlementPrice: row.settlementPrice,
createTime: row.createTime
})
.then(() => {
message.success('修改成功')
getList()
})
.finally(() => {
row.edit = false
})
} else {
row.edit = true
}
}
const selectList = ref([])
function handleSelectionChange(val) {
selectList.value = [...val]

@ -218,24 +218,9 @@
<el-table-column
prop="applyTime"
label="申请时间"
min-width="140px"
min-width="120px"
:formatter="dateFormatter"
>
<template #default="{ row, col }">
<el-date-picker
v-if="row.edit"
v-model="row.applyTime"
type="date"
size="small"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
style="width: 110px"
:clearable="false"
placeholder="选择日期"
/>
<div v-else>{{ dateFormatter(row, col, row.applyTime) }}</div>
</template>
</el-table-column>
<el-table-column prop="checkUser" label="审核人" min-width="90" />
<el-table-column
prop="checkTime"
@ -312,7 +297,7 @@ import DialogBatchAudit from './DialogBatchAudit.vue'
import { removeNullField } from '@/utils'
import { useAppStore } from '@/store/modules/app'
import { dateFormatter, formatDate } from '@/utils/formatTime'
import { dateFormatter } from '@/utils/formatTime'
const userStore = useUserStore()
const message = useMessage() //
@ -453,8 +438,7 @@ async function handleUpdate(row) {
money: row.money,
companyProfit: row.companyProfit,
personProfit: row.personProfit,
isPayoff: row.isPayoffValue,
applyTime: formatDate(row.applyTime)
isPayoff: row.isPayoffValue
})
.then(() => {
message.success('修改成功')

@ -158,38 +158,16 @@
<el-table-column prop="phone" label="联系方式" width="120px" />
<el-table-column prop="signUserName" label="登记人" min-width="90" />
<el-table-column prop="dealDate" label="成交日期" width="120px" :formatter="dateFormatter" />
<el-table-column prop="createTime" label="支出日期" width="140px">
<template #default="{ row, col }">
<el-date-picker
v-if="row.edit"
v-model="row.createTime"
type="date"
size="small"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
style="width: 110px"
:clearable="false"
placeholder="选择日期"
<el-table-column
prop="createTime"
label="支出日期"
width="120px"
:formatter="dateFormatter"
/>
<div v-else>{{ dateFormatter(row, col, row.createTime) }}</div>
</template>
</el-table-column>
<el-table-column prop="signSchool" label="成交驾校" min-width="150px" />
<el-table-column prop="signPlace" label="成交场地" min-width="150px" />
<el-table-column prop="signClass" label="成交班型" min-width="150px" />
<el-table-column prop="settlementPrice" label="结算单价" min-width="150px">
<template #default="{ row }">
<el-input-number
v-if="row.edit"
v-model="row.settlementPrice"
size="small"
:min="0"
:controls="false"
style="width: 100%"
/>
<div v-else>{{ row.settlementPrice }}</div>
</template>
</el-table-column>
<el-table-column prop="settlementPrice" label="结算单价" min-width="150px" />
<el-table-column prop="settlementNum" label="结算数量" min-width="150px" />
<el-table-column prop="settlementMoney" label="结算金额" min-width="150px" />
<el-table-column label="费用备注" width="90px">
@ -222,19 +200,6 @@
</el-popover>
</template>
</el-table-column>
<el-table-column label="操作" width="100px" fixed="right">
<template #default="{ row }">
<el-button
v-if="row.settlementState == '待结算'"
type="primary"
text
v-hasPermi="['clue:order:settle-update']"
@click="handleUpdate(row)"
>
{{ row.edit ? '保存' : '修改' }}
</el-button>
</template>
</el-table-column>
</el-table>
<Pagination
v-model:limit="searchForm.pageSize"
@ -336,28 +301,6 @@ async function getList() {
}
}
async function handleUpdate(row) {
if (row.edit) {
//
await message.confirm('是否确认修改结算数据?')
//
SettleApi.updateSettle({
settlementId: row.settlementId,
settlementPrice: row.settlementPrice,
createTime: row.createTime
})
.then(() => {
message.success('修改成功')
getList()
})
.finally(() => {
row.edit = false
})
} else {
row.edit = true
}
}
function getSummaries(param) {
const { columns } = param
const sums = []

Loading…
Cancel
Save