| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <template>
- <scTable ref="table" :apiObj="list.apiObj" :params="searchKey" @selectionChange="selectionChange" row-key="id">
- <el-table-column type="selection" width="50" fixed="left"></el-table-column>
- <el-table-column label="订单编号" width="200" prop="id" fixed="left">
- <template #default="scope">
- {{ scope.row.order_no?scope.row.order_no:'-' }}
- </template>
- </el-table-column>
- <el-table-column label="上游订单号" width="200" prop="id">
- <template #default="scope">
- {{ scope.row.thri_no?scope.row.thri_no:'-' }}
- </template>
- </el-table-column>
- <el-table-column label="订单信息" prop="category_id" width="300">
- <template #default="scope">
- <div class="goods-img">
- <div class="name">
- <span>{{ scope.row.account?scope.row.account.advertiser_name:'-' }}</span>
- <span class="dec">{{ scope.row.account?scope.row.account.advertiser_id:'-' }}</span>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="归属账户" prop="category_id" width="300">
- <template #default="scope">
- <div class="goods-img">
- <div class="name">
- <span>{{ scope.row.account?scope.row.account.advertiser_name:'-' }}</span>
- <span class="dec">{{ scope.row.account?scope.row.account.advertiser_id:'-' }}</span>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="归属产品" prop="category_id" width="300">
- <template #default="scope">
- {{ scope.row.product?scope.row.product.name:'-' }}
- </template>
- </el-table-column>
- <el-table-column label="归属落地页" prop="category_id" width="180">
- <template #default="scope">
- {{ scope.row.pages?scope.row.pages.title:'-' }}
- </template>
- </el-table-column>
- <el-table-column label="办理状态" prop="enable" width="120" align="center">
- <template #default="scope">
- {{ scope.row.status_str?scope.row.status_str:'-' }}
- </template>
- </el-table-column>
- <el-table-column label="回传状态" prop="enable" width="120" align="center">
- <template #default="scope">
- <div class="status-success" v-if="scope.row.is_callback==1"><sc-status-indicator type="success"></sc-status-indicator> 已回传</div>
- <div class="status-danger" v-else><sc-status-indicator type="danger"></sc-status-indicator> 未回传</div>
- </template>
- </el-table-column>
- <el-table-column label="回传时间" prop="enable" width="180" align="center">
- <template #default="scope">
- {{ scope.row.callback_at?scope.row.callback_at:'-' }}
- </template>
- </el-table-column>
- <el-table-column label="回传方式" prop="enable" width="120" align="center">
- <template #default="scope">
- <div class="status-success" v-if="scope.row.is_auto==1"><sc-status-indicator type="success"></sc-status-indicator> 自动</div>
- <div class="status-danger" v-if="scope.row.is_auto==2"><sc-status-indicator type="danger"></sc-status-indicator> 手动</div>
- <div class="status-info" v-if="scope.row.is_auto==0"><sc-status-indicator type="info"></sc-status-indicator> 未回传</div>
- </template>
- </el-table-column>
- <el-table-column label="创建时间" prop="create_at" width="180"></el-table-column>
- <el-table-column label="操作" width="120" align="left" fixed="right">
- <template #default="scope">
- <el-button-group>
- <el-button type="danger" text size="small" @click="table_close(scope.row)">手动回传</el-button>
- </el-button-group>
- </template>
- </el-table-column>
- </scTable>
- </template>
- <script>
- export default {
- data(){
- return {
- list: {
- apiObj: this.$API.order.list
- },
- dataSelect:[],
- dataSelectFull:[],
- searchKey:{}
- }
- },
-
- methods: {
- table_close(data){
- this.$confirm(`手动回传后不影响自动回传的规则逻辑`, '提示', {
- type: 'warning'
- }).then(async ()=>{
- var loading = this.$loading()
- var resp = await this.$API.account.sync.post({"id":data.account_id});
- loading.close();
- if (resp.code == 0) {
- return this.$message.error(resp.msg);
- }
- this.$message.success(resp.msg);
- this.$emit("success");
- }).catch(()=>{})
- },
- refresh(){
- this.$refs.table.refresh()
- },
- upData(data){
- this.$refs.table.upData(data)
- },
- handleSuccess(){
- this.$refs.table.refresh()
- },
- sortChange(event){
- if (event.order) {
- var data = {
- "field":event.prop,
- "order":event.order
- }
- this.$refs.table.upData(data)
- } else {
- this.$refs.table.reload(this.searchKey)
- }
- return ;
- },
- selectionChange(event){
- this.dataSelect = [];
- var arr = [];
- var arrCompany = [];
- event.forEach(function(val,index){
- arr[index] = val.id;
- arrCompany[index] = val;
- });
- this.dataSelectFull = arrCompany;
- this.dataSelect = arr;
- this.$emit("success",this.dataSelect);
- this.$emit("successFull",this.dataSelectFull);
- },
- table_passwd(row){
- this.$nextTick(() => {
- this.$refs.userPasswd.open("edit").setData(row)
- })
- }
- }
- }
- </script>
- <style>
- .goods-img{display: flex;gap: 5px;}
- .goods-img .name span{display: block;}
- .goods-img .name span.dec{color: #999;font-size: 12px;}
- .goods-price,.price{display: flex;align-items: center;gap: 5px;font-size: 14px;}
- .goods-price .del{text-decoration: line-through;}
- .goods-price span{background-color: #fff !important;
- border: 1px solid #d3d9e0 !important;
- border-radius: 4px;
- box-sizing: border-box;
- color: #6c737a !important;
- display: inline-flex;
- flex: none;
- font-size: 12px;
- line-height: 18px !important;
- padding: 1px 6px !important;text-decoration: none;}
- .flex{display: flex;align-items: center;gap: 5px;}
- </style>
|