index.vue 25.7 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
        <el-form-item :label="$t('目的仓')" prop="destinationId">
我在何方's avatar
我在何方 committed
21
          <el-select v-model="queryParams.destinationId" multiple :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 36
        </el-row>
        <el-row>
我在何方's avatar
我在何方 committed
37
        <el-form-item :label="$t('运输方式')+':'" >
我在何方's avatar
我在何方 committed
38
            <dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :clearable="true" v-model="queryParams.transportId" />
我在何方's avatar
我在何方 committed
39
        </el-form-item>
我在何方's avatar
我在何方 committed
40
        <el-form-item :label="$t('订单状态')" prop="status">
我在何方's avatar
我在何方 committed
41
          <dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.orderStatus"
我在何方's avatar
我在何方 committed
42 43
            @keyup.enter.native="handleQuery" clearable />
        </el-form-item>
44
        <el-form-item :label="$t('跟进客服')" prop="salesmanId">
我在何方's avatar
我在何方 committed
45
          <el-select v-model="queryParams.salesmanId" :placeholder="$t('请选择')" clearable>
46
            <el-option v-for="dict in followUpList" :key="parseInt(dict.id)" :label="dict.nickname" :value="parseInt(dict.id)"/>
我在何方's avatar
我在何方 committed
47
          </el-select>
48
        </el-form-item>
49 50 51
          <el-form-item :label="$t('出货渠道')" prop="channelId">
            <!--嵌套一个form来脱离disabled控制-->
              <selector
我在何方's avatar
我在何方 committed
52
                :clearable="true"
53 54 55 56 57 58
                v-model="queryParams.channelId"
                :options="channelList"
                value-field="channelId"
                :label-field="$l(null, 'name')"
                ></selector>
          </el-form-item>
我在何方's avatar
我在何方 committed
59 60
      </el-row>
      <el-row>
我在何方's avatar
我在何方 committed
61
        <el-form-item :label="$t('控货')+':'">
我在何方's avatar
我在何方 committed
62
             <dict-selector :type="DICT_TYPE.ECW_YESNO" :clearable="true" v-model="queryParams.isCargoControl" @keyup.enter.native="handleQuery"/>
我在何方's avatar
我在何方 committed
63
        </el-form-item>
我在何方's avatar
我在何方 committed
64
        <el-form-item :label="$t('异常状态')+':'">
我在何方's avatar
我在何方 committed
65
             <dict-selector  :type="DICT_TYPE.ORDER_EXCEPTION_STATUS" :clearable="true" v-model="queryParams.orderExceptionStatus" @keyup.enter.native="handleQuery"/>
我在何方's avatar
我在何方 committed
66
        </el-form-item>
我在何方's avatar
我在何方 committed
67
        <el-form-item :label="$t('异常类型')+':'">
我在何方's avatar
我在何方 committed
68
            <dict-selector :multiple="true" :type="DICT_TYPE.ORDER_ERROR_TYPE" :clearable="true" v-model="queryParams.orderExceptionType" @keyup.enter.native="handleQuery"/>
我在何方's avatar
我在何方 committed
69
        </el-form-item>
我在何方's avatar
我在何方 committed
70
        <el-form-item :label="$t('订单号')+':'">
71 72 73 74 75
          <el-input v-model="queryParams.orderNo" :placeholder="$t('请输入订单号')" clearable @keyup.enter.native="handleQuery">
            <template slot="prepend">
              <dict-selector :type="DICT_TYPE.EXCEPTION_SELECT_FILED" v-model="queryParams.orderNoKey" class="w-50" />
            </template>
          </el-input>
我在何方's avatar
我在何方 committed
76 77 78
        </el-form-item>
      </el-row>
      <el-row>
79 80 81
<!--        <el-form-item :label="$t('发货人')+':'">
            <customer-selector v-model="queryParams.consignor" :clearable="true" @change="consignor = $event" />
        </el-form-item>
我在何方's avatar
我在何方 committed
82
        <el-form-item :label="$t('发货人')+':'">
我在何方's avatar
我在何方 committed
83
            <customer-selector v-model="queryParams.consignor" :clearable="true" @change="consignor = $event" />
84 85
        </el-form-item> -->
        <el-form-item :label="$t('发货人')" prop="consignorText">
我在何方's avatar
我在何方 committed
86
          <el-input v-model="queryParams.consignorText" :placeholder="$t('发货人')" clearable @keyup.enter.native="handleQuery" />
87 88
        </el-form-item>
        <el-form-item :label="$t('收货人')" prop="consigneeText">
我在何方's avatar
我在何方 committed
89
          <el-input v-model="queryParams.consigneeText" :placeholder="$t('收货人')" clearable @keyup.enter.native="handleQuery" />
我在何方's avatar
我在何方 committed
90
        </el-form-item>
我在何方's avatar
我在何方 committed
91
        <el-form-item :label="$t('唛头')+':'">
92 93 94 95 96
          <el-input v-model="queryParams.marks" :placeholder="$t('请输入唛头')" clearable @keyup.enter.native="handleQuery">
            <template slot="prepend">
              <dict-selector :type="DICT_TYPE.EXCEPTION_SELECT_FILED" v-model="queryParams.marksKey" class="w-50" />
            </template>
          </el-input>
我在何方's avatar
我在何方 committed
97
        </el-form-item>
我在何方's avatar
我在何方 committed
98
        <el-form-item :label="$t('品名')+':'">
我在何方's avatar
我在何方 committed
99 100 101 102
          <div style="display: flex;width: 100%;">
            <dict-selector :type="DICT_TYPE.EXCEPTION_SELECT_FILED" style="width: 90px;" v-model="queryParams.goodsNameKey" />
            <product-selector v-model="queryParams.goodsName"  style="flex:1;" :clearable="true" @keyup.enter.native="handleQuery" />
          </div>
我在何方's avatar
我在何方 committed
103
        </el-form-item>
104 105
      </el-row>
      <el-row>
我在何方's avatar
我在何方 committed
106
        <el-form-item :label="$t('备案')+':'">
我在何方's avatar
我在何方 committed
107
             <dict-selector :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :clearable="true" v-model="queryParams.productRecord" @keyup.enter.native="handleQuery"/>
我在何方's avatar
我在何方 committed
108
        </el-form-item>
dragondean@qq.com's avatar
dragondean@qq.com committed
109
        <el-form-item :label="$t('客户经理')+':'">
110
         <el-select v-model="queryParams.customerIds" multiple  :placeholder="$t('请选择客户经理')" clearable>
我在何方's avatar
我在何方 committed
111 112 113
          <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
114 115 116 117 118 119
        <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>
120 121 122 123 124 125 126
        <el-form-item :label="$t('特需')" prop="packageType">
          <el-select v-model="queryParams.packageTypeArr" multiple :placeholder="$t('请选择')" clearable >
            <template v-for="item in getDictDatas(DICT_TYPE.ORDER_SPECIAL_NEEDS)">
              <el-option :label="$l(item, 'label')" :value="item.value"></el-option>
            </template>
          </el-select>
        </el-form-item>
127 128 129 130 131
      </el-row>
      <el-row>
        <el-form-item label="">
            <el-checkbox style="margin-left:60px" v-model="queryParams.isHaveCustomer" @change="handleQuery">{{$t('无归属订单')}}</el-checkbox>
        </el-form-item>
我在何方's avatar
我在何方 committed
132
        <el-form-item>
我在何方's avatar
我在何方 committed
133
          <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
134
          <el-button icon="el-icon-refresh" @click="reset">{{ $t('重置') }}</el-button>
我在何方's avatar
我在何方 committed
135 136 137 138 139 140 141
        </el-form-item>
      </el-row>
    </el-form>


    <!-- 操作工具栏 -->
    <el-row :gutter="10" class="mb8">
142
      <el-col :span="1.5">
143 144
        <el-button type="primary" size="mini" @click="exportSearch" v-hasPermi="['ecw:exception:export']">导出</el-button>
      </el-col>
145 146 147 148
      <el-col :span="17.5">
        <div class="total" v-if="totalData">
          <div :label="$t('箱数')">
              <div>{{$t('箱数')}}:</div>
149 150
              <span v-if="totalData.totalNum">{{totalData.totalNum+$t('箱')}}</span>
              <span v-else></span>
151 152 153
          </div>
            <div>
                <div>{{$t('测量方数汇总')}}:</div>
154 155
                <span v-if="totalData.totalVolume">{{totalData.totalVolume}}m³</span>
                <span v-else></span>
156 157 158
            </div>
            <div>
               <div>{{$t('收费方数汇总')}}:</div>
159 160
                <span v-if="totalData.totalChargeVolume">{{totalData.totalChargeVolume}}m³</span>
                <span v-else></span>
161 162 163
            </div>
            <div>
               <div>{{$t('重量汇总')}}:</div>
164 165
               <span v-if="totalData.totalWeight">{{totalData.totalWeight}}KG</span>
               <span v-else></span>
166 167
            </div>
        </div>
我在何方's avatar
我在何方 committed
168
      </el-col>
169
     <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
我在何方's avatar
我在何方 committed
170 171 172 173
    </el-row>

    <!-- 列表 -->
    <el-table v-loading="loading" border :data="list">
我在何方's avatar
我在何方 committed
174
      <el-table-column :label="$t('序号')" align="center" prop="id" type="index">
我在何方's avatar
我在何方 committed
175 176 177 178
        <template slot-scope="scope">
            <span>{{scope.$index + 1}}</span>
        </template>
      </el-table-column>
我在何方's avatar
我在何方 committed
179
      <el-table-column :label="$t('订单号')" align="center">
我在何方's avatar
我在何方 committed
180
        <template slot-scope="scope">
我在何方's avatar
我在何方 committed
181 182 183
         <router-link :to="{path: '/order/detail',query: {orderId: scope.row.orderId}}" class="link-type">
           <span>{{ scope.row.orderNo }}</span>
         </router-link>
184 185 186 187
          <div style="display: flex;flex-wrap: wrap;" v-if="scope.row.specialNeed">
            <el-button size="mini" style="margin-left: 20px" type="danger" circle v-for="(item,index) in specialRendering(scope.row.specialNeed)" :key="index">{{item.symbol}}</el-button>
          </div>
<!--             <span>{{specialNeedTag(scope.row.specialNeed)}}</span>-->
我在何方's avatar
我在何方 committed
188 189
         </template>
       </el-table-column>
我在何方's avatar
我在何方 committed
190
      <el-table-column :label="$t('唛头')" align="center" >
我在何方's avatar
我在何方 committed
191
        <template slot-scope="scope">
我在何方's avatar
我在何方 committed
192
          <span>{{scope.row.marks||$t('')}}</span>
我在何方's avatar
我在何方 committed
193 194
        </template>
      </el-table-column>
我在何方's avatar
我在何方 committed
195
      <el-table-column :label="$t('总箱数/入仓箱数')" align="center" >
我在何方's avatar
我在何方 committed
196
      <template slot-scope="scope">
197
          <p v-if="scope.row.customsType==1">{{scope.row.totalBox+$t('箱/')+scope.row.warehousingBox+$t('')}}</p>
198
          <p style="color:#ff4949" v-else>{{scope.row.totalBox+$t('箱/')+scope.row.warehousingBox+$t('')}}</p>
199
           <dict-tag  style="color:#ff4949" v-if="scope.row.customsType!=1" :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType"></dict-tag>
我在何方's avatar
我在何方 committed
200 201
        </template>
      </el-table-column>
我在何方's avatar
我在何方 committed
202
      <el-table-column :label="$t('体积/重量')" align="center">
我在何方's avatar
我在何方 committed
203
          <template slot-scope="scope">
我在何方's avatar
我在何方 committed
204
                <div v-if="scope.row.orderType==1">
205
                  <span v-if="scope.row.status >= 5 ">{{scope.row.volume+"m³/"+scope.row.weight+"kg"}}</span>
我在何方's avatar
我在何方 committed
206 207
                  <span v-else>{{scope.row.totalVolume+"m³/"+scope.row.totalWeight+"kg"}}</span>
                </div>
我在何方's avatar
我在何方 committed
208
                <el-tooltip v-else-if="scope.row.orderType==2" class="item" effect="dark" :content="(scope.row.wvolume||0)+'m³'" placement="bottom">
209
                  <span class="red" v-if="scope.row.status >= 5 ">{{scope.row.volume+"m³/"+scope.row.weight+"kg"}}</span>
我在何方's avatar
我在何方 committed
210
                  <span class="red" v-else>{{scope.row.totalVolume+"m³/"+scope.row.totalWeight+"kg"}}</span>
我在何方's avatar
我在何方 committed
211
                </el-tooltip>
我在何方's avatar
我在何方 committed
212
                <el-tooltip v-else-if="scope.row.orderType==3" class="item" effect="dark" :content="(scope.row.vweight||0)+'kg'" placement="bottom">
213
                  <span class="red" v-if="scope.row.status >= 5 ">{{scope.row.volume+"m³/"+scope.row.weight+"kg"}}</span>
我在何方's avatar
我在何方 committed
214
                  <span class="red" v-else>{{scope.row.totalVolume+"m³/"+scope.row.totalWeight+"kg"}}</span>
215
                </el-tooltip>
我在何方's avatar
我在何方 committed
216 217
          </template>
      </el-table-column>
我在何方's avatar
我在何方 committed
218
      <el-table-column :label="$t('运输方式/目的地')" align="center">
我在何方's avatar
我在何方 committed
219 220
          <template slot-scope="scope">
            <span><dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId"></dict-tag>
221
            / {{$l(scope.row, 'destination')}}</span>
我在何方's avatar
我在何方 committed
222 223
          </template>
      </el-table-column>
我在何方's avatar
我在何方 committed
224
      <el-table-column :label="$t('控货')" align="center">
我在何方's avatar
我在何方 committed
225
        <template slot-scope="scope">
我在何方's avatar
我在何方 committed
226
          <dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.isCargoControl" />
我在何方's avatar
我在何方 committed
227 228
        </template>
      </el-table-column>
229 230
      <el-table-column :label="$t('订单状态')" align="center" prop="statusMsg" >
<!--        <template slot-scope="scope">
我在何方's avatar
我在何方 committed
231
            <dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.orderStatus" />
232
          </template> -->
我在何方's avatar
我在何方 committed
233
        </el-table-column>
我在何方's avatar
我在何方 committed
234
      <el-table-column :label="$t('异常状态')" align="center">
我在何方's avatar
我在何方 committed
235 236 237 238
        <template slot-scope="scope">
            <dict-tag :type="DICT_TYPE.ORDER_EXCEPTION_STATUS" :value="scope.row.orderExceptionStatus" />
          </template>
        </el-table-column>
我在何方's avatar
我在何方 committed
239
      <el-table-column :label="$t('异常类型')" align="center">
我在何方's avatar
我在何方 committed
240
        <template slot-scope="scope">
我在何方's avatar
我在何方 committed
241 242
          <span  v-if="scope.row.moreException">{{$t('多个异常')}}</span>
          <dict-tag v-else :type="DICT_TYPE.ORDER_ERROR_TYPE" :value="scope.row.orderExceptionType" />
我在何方's avatar
我在何方 committed
243 244
        </template>
      </el-table-column>
我在何方's avatar
我在何方 committed
245
      <el-table-column :label="$t('操作')" align="center">
我在何方's avatar
我在何方 committed
246
        <template slot-scope="scope">
247 248 249 250 251 252
          <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>
我在何方's avatar
我在何方 committed
253
          <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.orderId)">{{$t('处理')}}</el-button>
254 255 256 257 258 259 260 261 262 263
          <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>
264
          <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>
265
          <el-button v-else-if="scope.row.orderExceptionType=='goods_add_exception'" v-hasPermi="['ecw:exception:goodsAddException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
我在何方's avatar
我在何方 committed
266
          <el-button v-else-if="scope.row.orderExceptionType=='fee_exception'" v-hasPermi="['ecw:exception:feeException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
我在何方's avatar
我在何方 committed
267 268 269 270 271 272 273 274
          <!-- 2.0 -->
          <el-button v-else-if="scope.row.orderExceptionType=='line_loop_exception'" v-hasPermi="['ecw:exception:lineLoopException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='customs_fee_not_quote_exception'" v-hasPermi="['ecw:exception:notQuoteException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='overweight_exception'" v-hasPermi="['ecw:exception:overweightException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='not_shipping_channel_exception'" v-hasPermi="['ecw:exception:notChannelException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='goods_weight_exception'" v-hasPermi="['ecw:exception:goodsWeightException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='in_warehousing_diff_exception'" v-hasPermi="['ecw:exception:inWarehousingException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
          <el-button v-else-if="scope.row.orderExceptionType=='stock_up_exception'" v-hasPermi="['ecw:exception:stockUpException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
我在何方's avatar
我在何方 committed
275
          <el-button v-else-if="scope.row.orderExceptionType=='channel_exception'" v-hasPermi="['ecw:exception:channelException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
276
          <el-button v-else-if="scope.row.orderExceptionType=='channel_packaging_overweight_exception'" v-hasPermi="['ecw:exception:channelPackagingException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
我在何方's avatar
我在何方 committed
277 278 279 280
        </template>
      </el-table-column>
    </el-table>
    <!-- 分页组件 -->
我在何方's avatar
我在何方 committed
281
    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
我在何方's avatar
我在何方 committed
282 283 284 285 286
                @pagination="getList"/>
  </div>
</template>

<script>
我在何方's avatar
我在何方 committed
287
import {getOrderExceptionPage, exportExcel,getStatistics} from "@/api/ecw/orderException"
我在何方's avatar
我在何方 committed
288 289
import {getTradeCityList} from '@/api/ecw/region'
import {DICT_TYPE} from  '@/utils/dict'
我在何方's avatar
我在何方 committed
290
// import { userList } from "@/api/system/user"
291
import {listServiceUser,userList} from "@/api/system/user"
我在何方's avatar
我在何方 committed
292
import CustomerSelector from '@/components/CustomerSelector'
我在何方's avatar
我在何方 committed
293
import ProductSelector from '@/components/ProductSelector'
我在何方's avatar
我在何方 committed
294
import {getWarehouseList} from '@/api/ecw/warehouse'
295
import Template from "@/views/cms/template/index.vue";
296 297
import {getChannelList} from '@/api/ecw/channel'
import Selector from '@/components/Selector'
我在何方's avatar
我在何方 committed
298 299

export default {
dragondean@qq.com's avatar
dragondean@qq.com committed
300
  name: "EcwOrderException",
我在何方's avatar
我在何方 committed
301
  components: {
302
    Template,
303
    CustomerSelector,ProductSelector,Selector
我在何方's avatar
我在何方 committed
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318
  },
  data() {
    return {
      // 遮罩层
      loading: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 订单异常列表
      list: [],
      dateRangeCreateTime: [],
      creatorData:[],
      // 查询参数
      queryParams: {
我在何方's avatar
我在何方 committed
319
        page: 1,
320
        rows: 10,
我在何方's avatar
我在何方 committed
321 322 323
        orderNoKey:'in',
        marksKey:'in',
        goodsNameKey:'in'
我在何方's avatar
我在何方 committed
324 325
      },
       tradeCityList:[],
我在何方's avatar
我在何方 committed
326
       warehouseList:[],
327 328
       totalData:{},
       followUpList:[],
329
       channelList: [], // 出货取到
我在何方's avatar
我在何方 committed
330 331
    };
  },
dragondean@qq.com's avatar
dragondean@qq.com committed
332
  activated(){
333
    this.getList();
dragondean@qq.com's avatar
dragondean@qq.com committed
334
  },
335
  async created() {
我在何方's avatar
我在何方 committed
336
    this.getList();
337
    this.channelList = (await getChannelList()).data
我在何方's avatar
我在何方 committed
338
    getTradeCityList().then(res => this.tradeCityList = res.data)
我在何方's avatar
我在何方 committed
339 340
    listServiceUser().then(r => {
      this.creatorData = r.data
341 342 343
    })
    userList('documentary customer service').then(r => {
      this.followUpList = r.data;
我在何方's avatar
我在何方 committed
344
    })
我在何方's avatar
我在何方 committed
345
     getWarehouseList().then(res => this.warehouseList = res.data)
我在何方's avatar
我在何方 committed
346
    // userList('salesman').then(res =>this.creatorData = res.data)
我在何方's avatar
我在何方 committed
347 348 349 350 351 352 353
  },
  computed:{
    expoerCityList(){
        return this.tradeCityList.filter(item => item.type == 2)
    },
    importCityList(){
        return this.tradeCityList.filter(item => item.type == 1)
我在何方's avatar
我在何方 committed
354
    },
我在何方's avatar
我在何方 committed
355 356 357 358 359 360 361
    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
362 363 364 365 366
  },
  methods: {
    /** 查询列表 */
    getList() {
      this.loading = true;
我在何方's avatar
我在何方 committed
367
      this.list = []
我在何方's avatar
我在何方 committed
368 369
      // 处理查询参数
      let params = {...this.queryParams}
370 371 372 373
      if(params.packageTypeArr && params.packageTypeArr.length){
        params.packageType = params.packageTypeArr.join(',')
        delete params.packageTypeArr
      }
我在何方's avatar
我在何方 committed
374 375 376 377 378
      // 执行查询
      getOrderExceptionPage(params).then(response => {
        this.list = response.data.list;
        this.total = response.data.total;
        this.loading = false;
我在何方's avatar
我在何方 committed
379
        // this.reset()
我在何方's avatar
我在何方 committed
380
      });
我在何方's avatar
我在何方 committed
381
      getStatistics(params).then(res=>this.totalData = res.data)
我在何方's avatar
我在何方 committed
382
    },
我在何方's avatar
我在何方 committed
383 384 385 386 387
    /** 表单重置 */
    reset() {
      this.queryParams = {
        page: 1,
        rows: 10,
我在何方's avatar
我在何方 committed
388 389 390
        orderNoKey:'in',
        marksKey:'in',
        goodsNameKey:'in'
我在何方's avatar
我在何方 committed
391 392
      }
      this.getList()
我在何方's avatar
我在何方 committed
393
    },
我在何方's avatar
我在何方 committed
394 395 396 397 398
    importCityName(id){
        return this.tradeCityList.filter(item => item.id == id)
    },
    /** 搜索按钮操作 */
    handleQuery() {
399
      console.log(this.queryParams)
400
      this.queryParams.page = 1
我在何方's avatar
我在何方 committed
401 402
      this.getList();
    },
我在何方's avatar
我在何方 committed
403
    handEdit(id){
404 405 406
        this.$router.push({
          path:"./pending?id="+id,
        })
我在何方's avatar
我在何方 committed
407 408 409 410
    },
    specialNeedTag(value){
        var tag = ''
        if(!value){
411
          return
我在何方's avatar
我在何方 committed
412 413
        }
        if(value.indexOf("1")!=-1||value.indexOf("2")!=-1){
我在何方's avatar
我在何方 committed
414
          tag += this.$t('(木)')
我在何方's avatar
我在何方 committed
415 416
        }
        if(value.indexOf("3")!=-1){
我在何方's avatar
我在何方 committed
417
          tag += this.$t('(箱)')
我在何方's avatar
我在何方 committed
418 419
        }
        if(value.indexOf("4")!=-1){
我在何方's avatar
我在何方 committed
420
          tag += this.$t('(袋)')
我在何方's avatar
我在何方 committed
421 422
        }
        if(value.indexOf("5")!=-1){
我在何方's avatar
我在何方 committed
423
          tag += this.$t('(纸)')
我在何方's avatar
我在何方 committed
424 425
        }
        if(value.indexOf("6")!=-1){
我在何方's avatar
我在何方 committed
426
          tag += this.$t('(垫)')
我在何方's avatar
我在何方 committed
427 428
        }
        if(value.indexOf("7")!=-1){
我在何方's avatar
我在何方 committed
429
          tag += this.$t('(空)')
我在何方's avatar
我在何方 committed
430 431
        }
        return tag
432 433
    },
    exportSearch(){
434 435 436
        exportExcel(this.queryParams).then(res => {
            this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载'))
        })
437
    },
438 439 440 441 442 443 444 445 446 447 448 449 450
    specialRendering(val){
      console.log('val', val)
      if(val !== undefined){
        let i = val.split(',')
        return this.getDictDatas(this.DICT_TYPE.ORDER_SPECIAL_NEEDS).filter(e => {
          return i.indexOf(e.value) > -1
        }).map(item => {
          // 打字开头的用最后一个字,否则取第一个字
          item.symbol = item.label[0] == '' ? item.label[item.label.length-1]: item.label[0]
          return item
        })
      }
    },
我在何方's avatar
我在何方 committed
451 452 453
  }
}
</script>
454 455 456 457 458 459 460 461 462 463 464
<style scoped>
  .total{
    display:flex;
    align-items: center;
  }
  .total div{
    margin-right:10px;
    font-size:14px;
    display:flex;
    align-items: center;
  }
我在何方's avatar
我在何方 committed
465 466 467
  .red{
    color:#ff4949;
  }
468
</style>