|
|
@@ -210,6 +210,67 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
|
|
|
+ <div class="block-title">
|
|
|
+ 添加分账子景点
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div class="btn-wrap-left">
|
|
|
+ <el-button
|
|
|
+ plain
|
|
|
+ class="add-btn"
|
|
|
+ type="primary"
|
|
|
+ @click="handleAddScenicSplit">
|
|
|
+ 添加
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <div class="table-box">
|
|
|
+ <el-table
|
|
|
+ border
|
|
|
+ stripe
|
|
|
+ :data="form.otaTicketTypeScenicSplitRequests">
|
|
|
+ <el-table-column
|
|
|
+ label="适用景点">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.scenicId">
|
|
|
+ <el-option
|
|
|
+ v-for="item in scenicList"
|
|
|
+ :key="item.scenicId"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.scenicId"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="应分金额"
|
|
|
+ min-width="90">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input-number
|
|
|
+ controls-position="right"
|
|
|
+ :min="0"
|
|
|
+ v-model="scope.row.price"
|
|
|
+ ></el-input-number>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ width="90"
|
|
|
+ class-name="align-item"
|
|
|
+ label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span
|
|
|
+ class="el-button el-button--primary el-button--small"
|
|
|
+ @click="delScenicSplit(scope.$index)">
|
|
|
+ <i class="el-icon-delete"></i>
|
|
|
+ 删除
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
<div class="dialog-btn-wrap">
|
|
|
<el-button @click="reset">重置</el-button>
|
|
|
@@ -221,7 +282,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { addOTATicketSale, updateOTATicketSale } from '@/api/otaTicketSale'
|
|
|
+import { addOTATicketSale, updateOTATicketSale, getScenicList } from '@/api/otaTicketSale'
|
|
|
import moment from 'moment'
|
|
|
import { CategoryDict } from '@/const'
|
|
|
|
|
|
@@ -274,6 +335,7 @@ export default {
|
|
|
seatAreaList: [],
|
|
|
seatAreas: [],
|
|
|
batches: [],
|
|
|
+ scenicList: [],
|
|
|
projectName: localStorage.getItem('otaProject'),
|
|
|
dateOption: {
|
|
|
disabledDate (theTime) {
|
|
|
@@ -295,7 +357,8 @@ export default {
|
|
|
useDateStart: moment().format('YYYY-MM-DD'),
|
|
|
useDateEnd: moment().add(30, 'years').endOf('year').format('YYYY-MM-DD'),
|
|
|
totalStock: -1, // -1代表不限库存
|
|
|
- xcRealNameType: ''
|
|
|
+ xcRealNameType: '',
|
|
|
+ otaTicketTypeScenicSplitRequests: []
|
|
|
},
|
|
|
showDeletedOption: false,
|
|
|
deletedOption: {
|
|
|
@@ -310,7 +373,9 @@ export default {
|
|
|
watch: {
|
|
|
visible (val) {
|
|
|
this.reset()
|
|
|
+
|
|
|
if (val) {
|
|
|
+ this.getScenicList()
|
|
|
this.showDeletedOption = false
|
|
|
if (this.dialogType === 'edit' && this.currentItem) {
|
|
|
this.form = Object.assign({}, this.form, this.currentItem)
|
|
|
@@ -333,12 +398,26 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ getScenicList () {
|
|
|
+ getScenicList().then(res => {
|
|
|
+ this.scenicList = res.data || []
|
|
|
+ })
|
|
|
+ },
|
|
|
handleClose () {
|
|
|
this.$parent.handleClose()
|
|
|
},
|
|
|
reset () {
|
|
|
this.$refs.form.resetFields()
|
|
|
},
|
|
|
+ handleAddScenicSplit () {
|
|
|
+ this.form.otaTicketTypeScenicSplitRequests.push({
|
|
|
+ scenicId: '',
|
|
|
+ price: 0
|
|
|
+ })
|
|
|
+ },
|
|
|
+ delScenicSplit (index) {
|
|
|
+ this.form.otaTicketTypeScenicSplitRequests.splice(index, 1)
|
|
|
+ },
|
|
|
submit () {
|
|
|
this.$refs.form.validate((valid) => {
|
|
|
if (valid) {
|
|
|
@@ -395,4 +474,11 @@ export default {
|
|
|
width: 90px;
|
|
|
}
|
|
|
}
|
|
|
+.table-box {
|
|
|
+ width: 100%;
|
|
|
+
|
|
|
+ table {
|
|
|
+ width: 100% !important;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|