|
|
@@ -160,19 +160,11 @@
|
|
|
label="票种"
|
|
|
prop="ticketTypeIdList"
|
|
|
>
|
|
|
- <el-select
|
|
|
+ <TicketTypeSelect
|
|
|
v-model="form.ticketTypeIdList"
|
|
|
- placeholder="请选择"
|
|
|
- multiple
|
|
|
- clearable
|
|
|
- filterable>
|
|
|
- <el-option
|
|
|
- v-for="item in ticketTypeList"
|
|
|
- :key="item.id"
|
|
|
- :value="item.id"
|
|
|
- :label="item.name">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ :options="ticketTypeList"
|
|
|
+ placeholder="请选择">
|
|
|
+ </TicketTypeSelect>
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
|
label="景点"
|
|
|
@@ -1195,12 +1187,12 @@
|
|
|
controls-position="right"
|
|
|
size="small"
|
|
|
:min="1"
|
|
|
- :max="scope.row.checkNum"
|
|
|
+ :max="scope.row.checkNum - (scope.row.cancelCheckNum || 0)"
|
|
|
:precision="0"
|
|
|
- v-model="scope.row.cancelCheckNum"
|
|
|
+ v-model="scope.row.thisCancelCheckNum"
|
|
|
@change="handlePartRefundCheckNumChange(scope.row)"
|
|
|
></el-input-number>
|
|
|
- <span v-else>{{ scope.row.cancelCheckNum }}</span>
|
|
|
+ <span v-else>{{ scope.row.thisCancelCheckNum }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column width="200" label="退票金额(¥)">
|
|
|
@@ -1210,9 +1202,9 @@
|
|
|
controls-position="right"
|
|
|
size="small"
|
|
|
:min="0"
|
|
|
- :max="scope.row.price"
|
|
|
+ :max="scope.row.price - (scope.row.cancelPrice || 0)"
|
|
|
:precision="2"
|
|
|
- v-model="scope.row.cancelPrice"
|
|
|
+ v-model="scope.row.thisCancelPrice"
|
|
|
></el-input-number>
|
|
|
<el-input-number
|
|
|
v-else
|
|
|
@@ -1221,7 +1213,7 @@
|
|
|
:min="0.01"
|
|
|
:max="scope.row.price"
|
|
|
:precision="2"
|
|
|
- v-model="scope.row.cancelPrice"
|
|
|
+ v-model="scope.row.thisCancelPrice"
|
|
|
></el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -1778,6 +1770,7 @@ import { orderStatusDic, ticketStatusDic, channelList, papersType, orderCategori
|
|
|
import { getPayStatus } from '@/utils/index'
|
|
|
// import Ellipsis from '@/components/Ellipsis'
|
|
|
import ReaderInput from '@/components/ReaderInput'
|
|
|
+import TicketTypeSelect from '@/components/TicketTypeSelect'
|
|
|
import moment from 'moment'
|
|
|
import { payPOS } from '@/api/pay'
|
|
|
import { getTeamList, getGuideList } from '@/api/checker'
|
|
|
@@ -1834,7 +1827,8 @@ const COLUMN_SCHEMA = [
|
|
|
{ key: 'cancelPrice', label: '退款金额', group: '退款', column: 'extra', apiKey: 'cancelPrice' },
|
|
|
{ key: 'cancelAdminName', label: '退款操作人', group: '退款', column: 'extra', apiKey: 'cancelAdminName' },
|
|
|
{ key: 'cancelCompleteTime', label: '退款完成时间', group: '退款', column: 'extra', apiKey: 'cancelCompleteTime' },
|
|
|
- { key: 'isForceCancel', label: '是否强制取消', group: '退款', column: 'extra', apiKey: 'isForceCancel' }
|
|
|
+ { key: 'isForceCancel', label: '是否强制取消', group: '退款', column: 'extra', apiKey: 'isForceCancel' },
|
|
|
+ { key: 'cancelCheckNum', label: '取消票人数', group: '退款', column: 'extra', apiKey: 'cancelCheckNum' }
|
|
|
]
|
|
|
|
|
|
const API_KEY_TO_FIELD = COLUMN_SCHEMA.reduce((acc, item) => {
|
|
|
@@ -1901,7 +1895,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
- ReaderInput
|
|
|
+ ReaderInput,
|
|
|
+ TicketTypeSelect
|
|
|
// Ellipsis
|
|
|
},
|
|
|
data () {
|
|
|
@@ -2355,8 +2350,8 @@ export default {
|
|
|
// 初始化部分退单票列表,添加可编辑字段
|
|
|
this.partRefundTicketList = (this.currentOrder.ticketList || []).map(v => ({
|
|
|
...v,
|
|
|
- cancelCheckNum: v.checkNum || 1,
|
|
|
- cancelPrice: v.price
|
|
|
+ thisCancelCheckNum: v.checkNum || 1,
|
|
|
+ thisCancelPrice: v.price
|
|
|
}))
|
|
|
this.partRefundSelection = []
|
|
|
},
|
|
|
@@ -2366,7 +2361,7 @@ export default {
|
|
|
handlePartRefundCheckNumChange (row) {
|
|
|
// 一码多人:根据退票人数自动计算退票金额
|
|
|
const unitPrice = row.price / row.checkNum
|
|
|
- row.cancelPrice = Math.round(unitPrice * row.cancelCheckNum * 100) / 100
|
|
|
+ row.thisCancelPrice = Math.round(unitPrice * row.thisCancelCheckNum * 100) / 100
|
|
|
},
|
|
|
submitPartRefundOrder () {
|
|
|
if (!this.partRefundSelection?.length) {
|
|
|
@@ -2375,8 +2370,8 @@ export default {
|
|
|
|
|
|
this.partRefundOrderInfo.ticketCancelRequestList = this.partRefundSelection.map(v => ({
|
|
|
ticketId: v.id,
|
|
|
- cancelCheckNum: v.cancelCheckNum,
|
|
|
- cancelPrice: v.cancelPrice
|
|
|
+ cancelCheckNum: v.thisCancelCheckNum,
|
|
|
+ cancelPrice: v.thisCancelPrice
|
|
|
}))
|
|
|
|
|
|
this.$confirm('确定要部分退单吗?', '提示', {
|