index.vue 18.4 KB
Newer Older
我在何方's avatar
我在何方 committed
1 2 3 4 5 6
<template>
  <div class="app-container">
    <!-- 搜索工作栏 -->
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
      <el-row>
        <el-form-item >
我在何方's avatar
我在何方 committed
7
          <el-select v-model="queryParams.dateType" style="width: 172px;" clearable>
我在何方's avatar
我在何方 committed
8 9
             <el-option :label="$t('入仓时间')" value="1"/>
             <el-option :label="$t('处理时间')" value="2"/>
我在何方's avatar
我在何方 committed
10
          </el-select>
我在何方's avatar
我在何方 committed
11
          <el-date-picker clearable v-model="queryParams.beginCreateTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" type="datetime" :placeholder="$t('请选择开始日期')" />
我在何方's avatar
我在何方 committed
12
         <span style="margin: 0 8px;">{{$t('')}}</span>
我在何方's avatar
我在何方 committed
13
          <el-date-picker clearable v-model="queryParams.endCreateTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" type="datetime" :placeholder="$t('请选择结束日期')" />
我在何方's avatar
我在何方 committed
14
        </el-form-item>
我在何方's avatar
我在何方 committed
15 16
       <el-form-item :label="$t('始发仓')" prop="destinationId">
          <el-select v-model="queryParams.originId" :placeholder="$t('请选择始发仓')" clearable>
我在何方's avatar
我在何方 committed
17 18 19
            <el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
          </el-select>
        </el-form-item>
我在何方's avatar
我在何方 committed
20 21
        <el-form-item :label="$t('目的仓')" prop="destinationId">
          <el-select v-model="queryParams.destinationId" :placeholder="$t('请选择目的仓')" clearable>
我在何方's avatar
我在何方 committed
22 23 24
            <el-option v-for="item in importWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
          </el-select>
        </el-form-item>
我在何方's avatar
我在何方 committed
25
<!--       <el-form-item :label="$t('始发地')+':'">
我在何方's avatar
我在何方 committed
26
            <el-select v-model="queryParams.originId" :placeholder="$t('请选择始发地')" clearable>
我在何方's avatar
我在何方 committed
27
                <el-option v-for="item in expoerCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
我在何方's avatar
我在何方 committed
28 29
            </el-select>
        </el-form-item>
我在何方's avatar
我在何方 committed
30
        <el-form-item :label="$t('目的地')+':'" >
我在何方's avatar
我在何方 committed
31
            <el-select v-model="queryParams.destinationId" :placeholder="$t('请选择目的地')" clearable>
我在何方's avatar
我在何方 committed
32
             <el-option v-for="item in importCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id" ></el-option>
我在何方's avatar
我在何方 committed
33
            </el-select>
我在何方's avatar
我在何方 committed
34
        </el-form-item> -->
我在何方's avatar
我在何方 committed
35
        <el-form-item :label="$t('运输方式')+':'" >
我在何方's avatar
我在何方 committed
36
            <dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :clearable="true" v-model="queryParams.transportId" />
我在何方's avatar
我在何方 committed
37 38 39
        </el-form-item>
      </el-row>
      <el-row>
我在何方's avatar
我在何方 committed
40
        <el-form-item :label="$t('控货')+':'">
我在何方's avatar
我在何方 committed
41
             <dict-selector :type="DICT_TYPE.ECW_YESNO" :clearable="true" v-model="queryParams.isCargoControl" @keyup.enter.native="handleQuery"/>
我在何方's avatar
我在何方 committed
42
        </el-form-item>
我在何方's avatar
我在何方 committed
43
        <el-form-item :label="$t('异常状态')+':'">
我在何方's avatar
我在何方 committed
44
             <dict-selector :type="DICT_TYPE.ORDER_EXCEPTION_STATUS" :clearable="true" v-model="queryParams.orderExceptionStatus" @keyup.enter.native="handleQuery"/>
我在何方's avatar
我在何方 committed
45
        </el-form-item>
我在何方's avatar
我在何方 committed
46
        <el-form-item :label="$t('异常类型')+':'">
我在何方's avatar
我在何方 committed
47
            <dict-selector :type="DICT_TYPE.ORDER_ERROR_TYPE" :clearable="true" v-model="queryParams.orderExceptionType" @keyup.enter.native="handleQuery"/>
我在何方's avatar
我在何方 committed
48
        </el-form-item>
我在何方's avatar
我在何方 committed
49
        <el-form-item :label="$t('订单号')+':'">
我在何方's avatar
我在何方 committed
50
          <el-input v-model="queryParams.orderNo" :placeholder="$t('请输入订单号')" clearable @keyup.enter.native="handleQuery"/>
我在何方's avatar
我在何方 committed
51 52 53
        </el-form-item>
      </el-row>
      <el-row>
54 55 56
<!--        <el-form-item :label="$t('发货人')+':'">
            <customer-selector v-model="queryParams.consignor" :clearable="true" @change="consignor = $event" />
        </el-form-item>
我在何方's avatar
我在何方 committed
57
        <el-form-item :label="$t('发货人')+':'">
我在何方's avatar
我在何方 committed
58
            <customer-selector v-model="queryParams.consignor" :clearable="true" @change="consignor = $event" />
59 60
        </el-form-item> -->
        <el-form-item :label="$t('发货人')" prop="consignorText">
我在何方's avatar
我在何方 committed
61
          <el-input v-model="queryParams.consignorText" :placeholder="$t('发货人')" clearable @keyup.enter.native="handleQuery" />
62 63
        </el-form-item>
        <el-form-item :label="$t('收货人')" prop="consigneeText">
我在何方's avatar
我在何方 committed
64
          <el-input v-model="queryParams.consigneeText" :placeholder="$t('收货人')" clearable @keyup.enter.native="handleQuery" />
我在何方's avatar
我在何方 committed
65
        </el-form-item>
我在何方's avatar
我在何方 committed
66
        <el-form-item :label="$t('唛头')+':'">
我在何方's avatar
我在何方 committed
67
          <el-input v-model="queryParams.marks" :placeholder="$t('请输入唛头')" clearable @keyup.enter.native="handleQuery"/>
我在何方's avatar
我在何方 committed
68
        </el-form-item>
我在何方's avatar
我在何方 committed
69
        <el-form-item :label="$t('品名')+':'">
我在何方's avatar
我在何方 committed
70
          <product-selector v-model="queryParams.goodsName" :clearable="true" @keyup.enter.native="handleQuery" />
我在何方's avatar
我在何方 committed
71
        </el-form-item>
72 73
      </el-row>
      <el-row>
我在何方's avatar
我在何方 committed
74
        <el-form-item :label="$t('备案')+':'">
我在何方's avatar
我在何方 committed
75
             <dict-selector :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :clearable="true" v-model="queryParams.productRecord" @keyup.enter.native="handleQuery"/>
我在何方's avatar
我在何方 committed
76
        </el-form-item>
dragondean@qq.com's avatar
dragondean@qq.com committed
77
        <el-form-item :label="$t('客户经理')+':'">
我在何方's avatar
我在何方 committed
78
         <el-select v-model="queryParams.salesmanId" :placeholder="$t('请选择跟进业务')" clearable>
我在何方's avatar
我在何方 committed
79 80 81
          <el-option v-for="item in creatorData" :key="item.id" :label="item.nickname" :value="item.id"/>
          </el-select>
        </el-form-item>
dragondean@qq.com's avatar
dragondean@qq.com committed
82 83 84 85 86 87
        <el-form-item :label="$t('外部仓')" prop="number">
          <el-select v-model="queryParams.isExternalWarehouse" :placeholder="$t('请选择')" clearable @change="handleQuery">
            <el-option :label="$t('外部仓')" :value="1"></el-option>
            <el-option :label="$t('自有仓')" :value="0"></el-option>
          </el-select>
        </el-form-item>
我在何方's avatar
我在何方 committed
88
        <el-form-item>
我在何方's avatar
我在何方 committed
89
          <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
Marcus's avatar
Marcus committed
90
          <!-- <el-button icon="el-icon-refresh" @click="reset">{{ $t('重置') }}</el-button> -->
我在何方's avatar
我在何方 committed
91 92 93 94 95 96 97
        </el-form-item>
      </el-row>
    </el-form>


    <!-- 操作工具栏 -->
    <el-row :gutter="10" class="mb8">
98 99 100 101
      <el-col :span="12">
        <el-button type="primary" size="mini" @click="exportSearch" v-hasPermi="['ecw:exception:export']">导出</el-button>
      </el-col>
      <el-col :span="12"><right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar></el-col>
我在何方's avatar
我在何方 committed
102 103 104 105
    </el-row>

    <!-- 列表 -->
    <el-table v-loading="loading" border :data="list">
我在何方's avatar
我在何方 committed
106
      <el-table-column :label="$t('序号')" align="center" prop="id" type="index">
我在何方's avatar
我在何方 committed
107 108 109 110
        <template slot-scope="scope">
            <span>{{scope.$index + 1}}</span>
        </template>
      </el-table-column>
我在何方's avatar
我在何方 committed
111
      <el-table-column :label="$t('订单号')" align="center">
我在何方's avatar
我在何方 committed
112
        <template slot-scope="scope">
我在何方's avatar
我在何方 committed
113 114 115
         <router-link :to="{path: '/order/detail',query: {orderId: scope.row.orderId}}" class="link-type">
           <span>{{ scope.row.orderNo }}</span>
         </router-link>
我在何方's avatar
我在何方 committed
116 117 118
             <span>{{specialNeedTag(scope.row.specialNeed)}}</span>
         </template>
       </el-table-column>
我在何方's avatar
我在何方 committed
119
      <el-table-column :label="$t('唛头')" align="center" >
我在何方's avatar
我在何方 committed
120
        <template slot-scope="scope">
我在何方's avatar
我在何方 committed
121
          <span>{{scope.row.marks||$t('')}}</span>
我在何方's avatar
我在何方 committed
122 123
        </template>
      </el-table-column>
我在何方's avatar
我在何方 committed
124
      <el-table-column :label="$t('总箱数/入仓箱数')" align="center" >
我在何方's avatar
我在何方 committed
125
      <template slot-scope="scope">
126 127 128
          <p v-if="scope.row.orderExceptionType!='order_doc_exception'||scope.row.customsType==1">{{scope.row.totalBox+$t('箱/')+scope.row.warehousingBox+$t('')}}</p>
          <p style="color:#ff4949" v-else>{{scope.row.totalBox+$t('箱/')+scope.row.warehousingBox+$t('')}}</p>
           <dict-tag  style="color:#ff4949" v-if="scope.row.orderExceptionType=='order_doc_exception'&&scope.row.customsType!=1" :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType"></dict-tag>
我在何方's avatar
我在何方 committed
129 130
        </template>
      </el-table-column>
我在何方's avatar
我在何方 committed
131
      <el-table-column :label="$t('体积/重量')" align="center">
我在何方's avatar
我在何方 committed
132
          <template slot-scope="scope">
133
                <div v-if="scope.row.orderExceptionType!='order_heavy_cargo_exception'&&scope.row.orderExceptionType!='order_bulky_cargo_exception'">
我在何方's avatar
我在何方 committed
134 135 136 137 138 139 140
                  <span v-if="scope.row.orderStatus >= 5 ">{{scope.row.volume+"m³/"+scope.row.weight+"kg"}}</span>
                  <span v-else>{{scope.row.totalVolume+"m³/"+scope.row.totalWeight+"kg"}}</span>
                </div>
                <el-tooltip v-if="scope.row.orderExceptionType=='order_heavy_cargo_exception'" class="item" effect="dark" :content="(scope.row.wvolume||0)+'m³'" placement="bottom">
                  <span style="color:#ff4949" v-if="scope.row.orderStatus >= 5 ">{{scope.row.volume+"m³/"+scope.row.weight+"kg"}}</span>
                  <span style="color:#ff4949" v-else>{{scope.row.totalVolume+"m³/"+scope.row.totalWeight+"kg"}}</span>
                </el-tooltip>
141 142 143 144
                <el-tooltip v-if="scope.row.orderExceptionType=='order_bulky_cargo_exception'" class="item" effect="dark" :content="(scope.row.vweight||0)+'kg'" placement="bottom">
                  <span style="color:#ff4949" v-if="scope.row.orderStatus >= 5 ">{{scope.row.volume+"m³/"+scope.row.weight+"kg"}}</span>
                  <span style="color:#ff4949" v-else>{{scope.row.totalVolume+"m³/"+scope.row.totalWeight+"kg"}}</span>
                </el-tooltip>
我在何方's avatar
我在何方 committed
145 146
          </template>
      </el-table-column>
我在何方's avatar
我在何方 committed
147
      <el-table-column :label="$t('运输方式/目的地')" align="center">
我在何方's avatar
我在何方 committed
148 149
          <template slot-scope="scope">
            <span><dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId"></dict-tag>
150
            / {{$l(scope.row, 'destination')}}</span>
我在何方's avatar
我在何方 committed
151 152
          </template>
      </el-table-column>
我在何方's avatar
我在何方 committed
153
      <el-table-column :label="$t('控货')" align="center">
我在何方's avatar
我在何方 committed
154
        <template slot-scope="scope">
我在何方's avatar
我在何方 committed
155
          <dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.isCargoControl" />
我在何方's avatar
我在何方 committed
156 157
        </template>
      </el-table-column>
我在何方's avatar
我在何方 committed
158
      <el-table-column :label="$t('订单状态')" align="center" prop="orderExceptionAmount" >
我在何方's avatar
我在何方 committed
159
        <template slot-scope="scope">
我在何方's avatar
我在何方 committed
160
            <dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.orderStatus" />
我在何方's avatar
我在何方 committed
161 162
          </template>
        </el-table-column>
我在何方's avatar
我在何方 committed
163
      <el-table-column :label="$t('异常状态')" align="center">
我在何方's avatar
我在何方 committed
164 165 166 167
        <template slot-scope="scope">
            <dict-tag :type="DICT_TYPE.ORDER_EXCEPTION_STATUS" :value="scope.row.orderExceptionStatus" />
          </template>
        </el-table-column>
我在何方's avatar
我在何方 committed
168
      <el-table-column :label="$t('异常类型')" align="center">
我在何方's avatar
我在何方 committed
169
        <template slot-scope="scope">
我在何方's avatar
我在何方 committed
170
          <dict-tag :type="DICT_TYPE.ORDER_ERROR_TYPE" :value="scope.row.orderExceptionType" />
我在何方's avatar
我在何方 committed
171 172
        </template>
      </el-table-column>
我在何方's avatar
我在何方 committed
173
      <el-table-column :label="$t('操作')" align="center">
我在何方's avatar
我在何方 committed
174
        <template slot-scope="scope">
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
          <el-button  size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('查看')}}</el-button>
          <!-- <el-button size="mini" type="text" icon="el-icon-share" @click="handEdit(scope.row.orderId)">{{$t('查看')}}</el-button> -->
          <el-button v-if="scope.row.orderExceptionType=='order_superfluous_box_exception'" v-hasPermi="['ecw:exception:superfluousBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='order_lack_box_exception'" v-hasPermi="['ecw:exception:lackBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='order_pay_exception'" v-hasPermi="['ecw:exception:pay']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='order_miss_exception'" v-hasPermi="['ecw:exception:miss']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='order_superfluous_goods_exception'" v-hasPermi="['ecw:exception:superfluousGoods']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='order_in_water_exception'" v-hasPermi="['ecw:exception:inWater']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='order_damage_exception'" v-hasPermi="['ecw:exception:damaged']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='order_heavy_cargo_exception'" v-hasPermi="['ecw:exception:heavyCargo']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='order_doc_exception'" v-hasPermi="['ecw:exception:doc']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='order_consignor_exception'" v-hasPermi="['ecw:exception:consignor']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='order_other_exception'" v-hasPermi="['ecw:exception:other']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='order_cod_exception'" v-hasPermi="['ecw:exception:cod']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='order_no_quote_exception'" v-hasPermi="['ecw:exception:noQuote']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='order_bulky_cargo_exception'" v-hasPermi="['ecw:exception:bulkyCargo']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='order_pick_up_exception'" v-hasPermi="['ecw:exception:pickUp']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
192
          <el-button v-else-if="scope.row.orderExceptionType=='not_customer_service_exception'" v-hasPermi="['ecw:exception:notCustomer']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
我在何方's avatar
我在何方 committed
193 194 195 196
        </template>
      </el-table-column>
    </el-table>
    <!-- 分页组件 -->
我在何方's avatar
我在何方 committed
197
    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
我在何方's avatar
我在何方 committed
198 199 200 201 202
                @pagination="getList"/>
  </div>
</template>

<script>
203
import {getOrderExceptionPage, exportExcel} from "@/api/ecw/orderException"
我在何方's avatar
我在何方 committed
204 205
import {getTradeCityList} from '@/api/ecw/region'
import {DICT_TYPE} from  '@/utils/dict'
我在何方's avatar
我在何方 committed
206 207
// import { userList } from "@/api/system/user"
import {listServiceUser} from "@/api/system/user"
我在何方's avatar
我在何方 committed
208
import CustomerSelector from '@/components/CustomerSelector'
我在何方's avatar
我在何方 committed
209
import ProductSelector from '@/components/ProductSelector'
我在何方's avatar
我在何方 committed
210
import {getWarehouseList} from '@/api/ecw/warehouse'
我在何方's avatar
我在何方 committed
211 212

export default {
dragondean@qq.com's avatar
dragondean@qq.com committed
213
  name: "EcwOrderException",
我在何方's avatar
我在何方 committed
214
  components: {
我在何方's avatar
我在何方 committed
215
    CustomerSelector,ProductSelector
我在何方's avatar
我在何方 committed
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
  },
  data() {
    return {
      // 遮罩层
      loading: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 订单异常列表
      list: [],
      dateRangeCreateTime: [],
      creatorData:[],
      // 查询参数
      queryParams: {
我在何方's avatar
我在何方 committed
231
        page: 1,
我在何方's avatar
我在何方 committed
232
        rows: 10
我在何方's avatar
我在何方 committed
233 234
      },
       tradeCityList:[],
我在何方's avatar
我在何方 committed
235
       warehouseList:[],
我在何方's avatar
我在何方 committed
236 237
    };
  },
dragondean@qq.com's avatar
dragondean@qq.com committed
238 239 240
  activated(){
    this.handleQuery()
  },
我在何方's avatar
我在何方 committed
241 242
  created() {
    this.getList();
我在何方's avatar
我在何方 committed
243 244

    getTradeCityList().then(res => this.tradeCityList = res.data)
我在何方's avatar
我在何方 committed
245 246 247
    listServiceUser().then(r => {
      this.creatorData = r.data
    })
我在何方's avatar
我在何方 committed
248
     getWarehouseList().then(res => this.warehouseList = res.data)
我在何方's avatar
我在何方 committed
249
    // userList('salesman').then(res =>this.creatorData = res.data)
我在何方's avatar
我在何方 committed
250 251 252 253 254 255 256
  },
  computed:{
    expoerCityList(){
        return this.tradeCityList.filter(item => item.type == 2)
    },
    importCityList(){
        return this.tradeCityList.filter(item => item.type == 1)
我在何方's avatar
我在何方 committed
257
    },
我在何方's avatar
我在何方 committed
258 259 260 261 262 263 264
    exportWarehouseList(){
      /* tradeType 1 进口,2出口,3进出口 */
      return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3)
    },
    importWarehouseList(){
      return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3)
    },
我在何方's avatar
我在何方 committed
265 266 267 268 269
  },
  methods: {
    /** 查询列表 */
    getList() {
      this.loading = true;
我在何方's avatar
我在何方 committed
270
      this.list = []
我在何方's avatar
我在何方 committed
271 272 273 274 275 276 277
      // 处理查询参数
      let params = {...this.queryParams}
      // 执行查询
      getOrderExceptionPage(params).then(response => {
        this.list = response.data.list;
        this.total = response.data.total;
        this.loading = false;
我在何方's avatar
我在何方 committed
278
        // this.reset()
我在何方's avatar
我在何方 committed
279 280
      });
    },
我在何方's avatar
我在何方 committed
281 282 283 284 285 286 287
    /** 表单重置 */
    reset() {
      this.queryParams = {
        page: 1,
        rows: 10,
      };
    },
我在何方's avatar
我在何方 committed
288 289 290 291 292 293 294
    importCityName(id){
        return this.tradeCityList.filter(item => item.id == id)
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.getList();
    },
我在何方's avatar
我在何方 committed
295
    handEdit(id){
296 297 298
        this.$router.push({
          path:"./pending?id="+id,
        })
我在何方's avatar
我在何方 committed
299 300 301 302
    },
    specialNeedTag(value){
        var tag = ''
        if(!value){
303
          return
我在何方's avatar
我在何方 committed
304 305
        }
        if(value.indexOf("1")!=-1||value.indexOf("2")!=-1){
我在何方's avatar
我在何方 committed
306
          tag += this.$t('(木)')
我在何方's avatar
我在何方 committed
307 308
        }
        if(value.indexOf("3")!=-1){
我在何方's avatar
我在何方 committed
309
          tag += this.$t('(箱)')
我在何方's avatar
我在何方 committed
310 311
        }
        if(value.indexOf("4")!=-1){
我在何方's avatar
我在何方 committed
312
          tag += this.$t('(袋)')
我在何方's avatar
我在何方 committed
313 314
        }
        if(value.indexOf("5")!=-1){
我在何方's avatar
我在何方 committed
315
          tag += this.$t('(纸)')
我在何方's avatar
我在何方 committed
316 317
        }
        if(value.indexOf("6")!=-1){
我在何方's avatar
我在何方 committed
318
          tag += this.$t('(垫)')
我在何方's avatar
我在何方 committed
319 320
        }
        if(value.indexOf("7")!=-1){
我在何方's avatar
我在何方 committed
321
          tag += this.$t('(空)')
我在何方's avatar
我在何方 committed
322 323
        }
        return tag
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339
    },
    exportSearch(){
      this.exportExcel(exportExcel, this.queryParams, this.$t('异常订单'))
    },
    // 通用导出函数
    exportExcel(func, params, fileName = null){
      this.exportLoading = true;
      func(params).then(res => {
        if(!fileName){
          fileName = this.$t('订单')
        }
        this.$download.excel(res, fileName + '.xls');
      }).finally(() => {
        this.exportLoading = false
      })
    },
我在何方's avatar
我在何方 committed
340 341 342
  }
}
</script>