1、批量发货导入时,增加将erp单号回写到订单表中
2、增加可以按提货卡号查询订单的条件
| | |
| | | } |
| | | |
| | | // 获取最后一次发货的快递数据实体 |
| | | public function getLastExpressModel() |
| | | public function getLastExpressModel($order_id) |
| | | { |
| | | $order = OrderDetailExpress::find()->andWhere([ |
| | | 'mall_id' => \Yii::$app->mall->id, |
| | | 'mch_id' => \Yii::$app->user->identity->mch_id, |
| | | 'send_type' => 1, |
| | | 'order_id' => $order_id, |
| | | ]) |
| | | ->andWhere(['!=', 'express', '']) |
| | | ->orderBy(['created_at' => SORT_DESC]) |
| | | ->one(); |
| | | //\Yii::warning('快递 数据:'.($order ? $order->express_no : '未发货')); |
| | | //\Yii::warning('快递 数据:'.$order_id.'单号:'.$order->express_no); |
| | | return $order; |
| | | } |
| | | } |
| | |
| | | |
| | | // 快递信息 |
| | | //$item['last_express'] = $lastExpress; |
| | | $lastExpressModel = (new CommonOrder)->getLastExpressModel(); |
| | | $lastExpressModel = (new CommonOrder)->getLastExpressModel($item['id']); |
| | | $item['last_express'] = $lastExpressModel?$lastExpressModel->express:''; |
| | | $item['last_express_no'] = $lastExpressModel?$lastExpressModel->express_no:''; |
| | | } |
| | |
| | | case 'address': |
| | | $query->andWhere(['like', 'address', $this->keyword]); |
| | | break; |
| | | case 'ex_card_no': |
| | | $query->andWhere(['like', 'o.ex_card_no', $this->keyword]); |
| | | break; |
| | | default: |
| | | // 门店搜索 |
| | | $storeIds = Store::find()->where(['mall_id' => \Yii::$app->mall->id, 'is_delete' => 0]) |
| | |
| | | $order->send_type = 0; |
| | | } |
| | | |
| | | // ERP单号 |
| | | $order->ex_erp_no = $v[3]; |
| | | |
| | | $detailIds = []; |
| | | /** @var OrderDetail $detail */ |
| | | $t = \Yii::$app->db->beginTransaction(); |
| | |
| | | <el-tag size="small" type="success" v-if="item.is_sale == 1">已完成</el-tag> |
| | | <el-tag size="small" type="danger" v-if="item.cancel_status == 1">已取消</el-tag> |
| | | <el-tag size="small" type="danger" v-else-if="item.cancel_status == 2">申请取消</el-tag> |
| | | <el-tag size="small" type="danger" v-if="item.is_send == 1 && item.is_confirm == 0"> |
| | | <el-tag size="small" type="danger" v-if="item.is_send == 1"> |
| | | {{ item.last_express }} : {{ item.last_express_no }} |
| | | </el-tag> |
| | | </template> |
| | |
| | | type: Array, |
| | | default: function () { |
| | | return [ |
| | | {value: 'ex_card_no', name: '提货卡号'}, |
| | | {value: '3', name: '收货人'}, |
| | | {value: '6', name: '收货人电话'}, |
| | | {value: 'address', name: '收货地址'}, |
| | | {value: '1', name: '订单号'}, |
| | | {value: '9', name: '商户单号'}, |
| | | {value: '2', name: '用户名'}, |
| | | {value: '4', name: '用户ID'}, |
| | | {value: '5', name: '商品名称'}, |
| | | {value: '3', name: '收货人'}, |
| | | {value: '6', name: '收货人电话'}, |
| | | {value: '7', name: '门店名称'}, |
| | | {value: 'goods_no', name: '商品货号'}, |
| | | {value: 'address', name: '收货地址'}, |
| | | ] |
| | | } |
| | | }, |
| | |
| | | params[key] = this.search[key] |
| | | }); |
| | | params['flag'] = ''; |
| | | |
| | | request({ |
| | | params: params, |
| | | }).then(e => { |