| | |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | @click="handleDelete1" |
| | | v-hasPermi="['system:role:remove']" |
| | | >删除</el-button> |
| | | </el-col> |
| | |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate1(scope.row)" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['familymodel:economy:info']" |
| | | >修改</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | @click="handleDelete1(scope.row)" |
| | | v-hasPermi="['system:role:remove']" |
| | | >删除</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-d-arrow-right" @click="handleCheck1(scope.row)">查看详情</el-button> |
| | |
| | | <el-table-column label="购物" prop="shopping" sortable width="70px" /> |
| | | |
| | | |
| | | <el-table-column fixed label="操作" align="center" sortable width="180" > |
| | | <el-table-column label="操作" align="center" sortable width="180" > |
| | | <template slot-scope="scope" v-if="scope.row.roleId !== 1"> |
| | | <el-button |
| | | size="mini" |
| | |
| | | style="background: #FEF7FC;" |
| | | /> |
| | | |
| | | <!-- 添加或修改资产信息配置对话框 --> |
| | | |
| | | <!-- 新增旅游经历--> |
| | | <el-dialog :title="title" :visible.sync="dialog1Visible" width="800px" append-to-body> |
| | | <el-form ref="elForm2" :model="formDat4" :rules="rules2" size="medium" label-width="100px"> |
| | | |
| | |
| | | <el-button @click="cancelData">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- 新增每日行程内容--> |
| | | <el-dialog title="添加每日行程内容" :visible.sync="centerDialogVisible" width="60%" center append-to-body> |
| | | <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="100px"> |
| | | <h4 class="form-header">行程内容 </h4> |
| | |
| | | |
| | | |
| | | //在system/note/index.js中导入接口函数 --接好了 |
| | | import {listTravelPrice,enload,listTravelBase,delTravelPrice, addTravelPrice, uploadPic,updateTravelPrice,addTravelBase} from "@/api/travel/index"; |
| | | import { |
| | | listTravelPrice, |
| | | listTravelBase, |
| | | delTravelBase, |
| | | delTravelPrice, |
| | | addTravelPrice, |
| | | uploadPic, |
| | | updateTravelPrice, |
| | | addTravelBase, |
| | | getTravelBaseInfo, getTravelPriceInfo, |
| | | } from "@/api/travel/index"; |
| | | import {getSelfEconomyInfo} from "@/api/selfeconomy"; |
| | | |
| | | export default { |
| | | name: "Role", |
| | |
| | | total: 0, |
| | | // |
| | | travelpriceList: [], |
| | | target:[], |
| | | travelBase:[], |
| | | baseData:[], |
| | | detailList:[], |
| | |
| | | content: undefined, |
| | | }, |
| | | formDat2: { |
| | | id: undefined, |
| | | detailList: undefined, |
| | | }, |
| | | formDat7: { |
| | | id: undefined, |
| | | detailList: undefined, |
| | | }, |
| | |
| | | // alert(123) |
| | | // console.log(response.data) |
| | | this.travelpriceList = response.data.data; |
| | | // const targetId = row.id |
| | | // const detailList = filteredData.detailList; |
| | | // console.log("detailList" ); |
| | | // console.log(detailList); |
| | | // resolve(detailList); |
| | | // console.log(this.detailList) |
| | | // console.log(this.travelpriceList); |
| | | |
| | | this.total = response.data.total; |
| | | |
| | | for (let item of this.travelpriceList) { |
| | |
| | | // 找到了符合条件的数据 |
| | | const baseItem = baseData[key]; |
| | | delete item1.id; |
| | | delete item1.address; |
| | | const mergedItem = { ...baseItem, ...item1 }; |
| | | |
| | | this.$set(baseData, key, mergedItem); |
| | |
| | | |
| | | this.formDat2.detailList = []; |
| | | console.log("调试"); |
| | | // console.log(this.formDat2.detailList); |
| | | // await this.getList().then(detailList => { |
| | | // this.formDat2.detailList = detailList; |
| | | // console.log(this.formDat2.detailList); |
| | | // }); |
| | | |
| | | // async function getData() { |
| | | |
| | | // listTravelPrice(this.queryParams).then(async response => { |
| | | |
| | | // this.travelpriceList = response.data.data; |
| | | |
| | | // const filteredData = this.travelpriceList.filter(item => item.id === id); |
| | | // this.total = response.data.total; |
| | | // console.log( filteredData[0].detailList); |
| | | |
| | | |
| | | // // this.formDat2.detailList =filteredData[0].detailList |
| | | // this.formDat2.detailList = filteredData[0].detailList; |
| | | // // console.log(this.formDat2.detailList ); |
| | | // // console.log(this.formDat2.detailList); |
| | | // return this.formDat2 |
| | | // }).catch(error => { |
| | | // console.error("请求错误:", error); |
| | | // }); |
| | | // } |
| | | |
| | | async function getData() { |
| | | try { |
| | | const response = await listTravelPrice(this.queryParams); |
| | |
| | | this.centerDialogVisible = false; |
| | | this.getList(); |
| | | }); |
| | | |
| | | Object.keys(this.formDat).forEach(key => { |
| | | this.formDat[key] = ''; |
| | | }); |
| | | this.handleRemove(this.fileList[0]); |
| | | this.handleRemoveFile(this.fileListOther[0]); |
| | | } |
| | | }); |
| | | this.$refs["elForm1"].validate(valid => { |
| | |
| | | // this.$modal.msgSuccess("费用新增成功"); |
| | | this.centerDialogVisible = false; |
| | | }); |
| | | |
| | | Object.keys(this.formDat2).forEach(key => { |
| | | this.formDat2[key] = ''; |
| | | }); |
| | | this.handleRemove(this.fileList[0]); |
| | | this.handleRemoveFile(this.fileListOther[0]); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 删除按钮操作 */ |
| | | async handleDelete1(row) { |
| | | const id = row.id || this.ids; |
| | | console.log(id) |
| | | const feeid = row.feeId; |
| | | console.log(feeid) |
| | | const targetDay = row.happenTime |
| | | console.log(targetDay) |
| | | this.formDat7.detailList=[]; |
| | | async function getFilteredData() { |
| | | try { |
| | | const response = await listTravelPrice(this.queryParams); |
| | | this.travelpriceList = response.data.data; |
| | | |
| | | const filteredData = this.travelpriceList.filter(item => item.id === feeid); |
| | | console.log(filteredData[0].detailList); |
| | | this.change = filteredData[0].detailList.filter(item => item.happenTime !== targetDay); |
| | | console.log(this.change) |
| | | this.total = response.data.total; |
| | | |
| | | // return filteredData[0].detailList; |
| | | return this.change; |
| | | } catch (error) { |
| | | console.error("请求错误:", error); |
| | | } |
| | | } |
| | | |
| | | try { |
| | | this.formDat7.detailList = await getFilteredData(); |
| | | this.formDat7.id = feeid |
| | | console.log("打印formDat7") |
| | | console.log(this.formDat7) |
| | | } catch (error) { |
| | | console.error(error); |
| | | } |
| | | console.log(this.formDat7) |
| | | |
| | | this.$modal.confirm('是否确认删除所选数据项?').then(function() { |
| | | |
| | | return delTravelBase(id); |
| | | }).then(() => { |
| | | updateTravelPrice(this.formDat7).then(response => { |
| | | this.$modal.msgSuccess("费用修改成功"); |
| | | |
| | | }); |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | const Ids = this.ids; |