| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- <template>
- <el-drawer
- :title="`关联订单(发票总价:¥${fp_info.money})`"
- size="60%"
- :append-to-body="false"
- :destroy-on-close="true"
- :visible="true"
- :modal-append-to-body="false"
- :before-close="handleClose"
- :wrapperClosable="false"
- ref="drawer_close">
- <div v-loading="loading" style="padding: 20px" class="block">
- <div style="display: flex;justify-content: space-between">
- <div></div>
- <el-button size="small" @click="g_order" type="primary">关联订单</el-button>
- </div>
- <el-table row-key="id" show-summary :data="list">
- <el-table-column prop="title" width="400px" label="订单名称">
- <template slot-scope="scope">
- <a :href="`/main/orders_detail/?id=${scope.row.order_no}`" style="color: #006eff" target="_blank">{{scope.row.product_title}}</a>
- </template>
- </el-table-column>
- <el-table-column prop="amount" label="订单金额">
- <template slot-scope="scope">
- <span>{{scope.row.amount}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="title" label="关联项目">
- <template slot-scope="scope">
- <a :href="scope.row.project_url" style="color: #006eff" target="_blank">{{scope.row.project_name}}</a>
- </template>
- </el-table-column>
- <el-table-column prop="title" label="订单编号">
- <template slot-scope="scope">
- <span>{{scope.row.order_no}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="title" width="100px" fixed="right" label="操作">
- <template slot-scope="scope">
- <el-button type="text" @click="qx_g_order(scope.row)">取消关联</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </el-drawer>
- </template>
- <script>
- export default {
- props: {
- action: {
- },
- pro: {
- },
- back:{
- type:Object
- },
- fp_info:{
- type:Object
- }
- },
- data() {
- return {
- search: {
- pagesize: 15,
- page:0,
- total:0,
- },
- loading:true,
- list: []
- };
- },
- computed: {},
- watch: {},
- created() {},
- mounted() {
- this.getList();
- },
- methods: {
- async qx_g_order(row) {
- this.$confirm('是否确认取消关联?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(async () => {
- this.loading = true;
- let res =await this.$post("/uapi/pub/info/order/user_order/qx_g_order",{order_no:row.order_no,invoice_id:this.pro});
- if (res.status == 1) {
- this.$message({
- type: 'success',
- message: '成功!'
- });
- await this.getList();
- }
- this.loading = false;
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- });
- },
- handleClose:function()
- {
- this.back.drawer_obj.order_settlement=false;
- this.back.drawer_obj.id="";
- },
- async g_order() {
- this.$prompt('请输入关联的订单编号', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- }).then(async ({ value }) => {
- this.loading = true;
- let res =await this.$post("/uapi/pub/info/order/user_order/bd_invoice_id",{id:this.pro,order_no:value});
- if (res.status == 1) {
- this.$message({
- type: 'success',
- message: '关联成功!'
- });
- await this.getList();
- }
- this.loading = false;
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消关联'
- });
- });
- },
- async getList() {
- this.loading = true;
- let res = await this.$post("/uapi/pub/info/order/user_order/invoice_order_list",{id:this.pro});
- this.loading = false;
- if (res.status == 1) {
- this.list = res.data.list;
- this.search.total = res.data.total;
- }
- },
- page_event(page) {
- this.search.page = page;
- this.getList();
- },
- }
- };
- </script>
- <style scoped>
- .el-tag {
- cursor: pointer;
- }
- </style>
|