qsh 3 months ago
commit 7665389a8d
  1. 5
      src/api/clue/settle.js
  2. 69
      src/views/Clue/Order/Comp/MallSettle.vue
  3. 20
      src/views/Clue/Order/Comp/Reback.vue
  4. 69
      src/views/Clue/Order/Comp/SchoolSettle.vue

@ -24,3 +24,8 @@ 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 })
}

@ -157,16 +157,38 @@
<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="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="选择日期"
/>
<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" />
<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="settlementNum" label="结算数量" min-width="150px" />
<el-table-column prop="settlementMoney" label="结算金额" min-width="150px" />
<el-table-column label="费用备注" width="90px">
@ -199,6 +221,19 @@
</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"
@ -318,6 +353,28 @@ 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,9 +218,24 @@
<el-table-column
prop="applyTime"
label="申请时间"
min-width="120px"
min-width="140px"
: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"
@ -438,7 +453,8 @@ async function handleUpdate(row) {
money: row.money,
companyProfit: row.companyProfit,
personProfit: row.personProfit,
isPayoff: row.isPayoffValue
isPayoff: row.isPayoffValue,
applyTime: row.applyTime
})
.then(() => {
message.success('修改成功')

@ -158,16 +158,38 @@
<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="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="选择日期"
/>
<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" />
<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="settlementNum" label="结算数量" min-width="150px" />
<el-table-column prop="settlementMoney" label="结算金额" min-width="150px" />
<el-table-column label="费用备注" width="90px">
@ -200,6 +222,19 @@
</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"
@ -301,6 +336,28 @@ 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