最新服务器上的版本,以后用这个
提货兑换页面增加备注输入框,订单表中增加发卡平台、卡号、密码、ERP单号字段
6 files modified
56 ■■■■ changed files
forms/api/order/OrderSubmitJob.php 13 ●●●● patch | view | raw | blame | history
models/Order.php 11 ●●●●● patch | view | raw | blame | history
plugins/exchange/forms/exchange/ExchangeFactory.php 2 ●●●●● patch | view | raw | blame | history
plugins/exchange/forms/exchange/basic/Goods.php 11 ●●●●● patch | view | raw | blame | history
plugins/exchange/forms/mall/RecordForm.php 6 ●●●●● patch | view | raw | blame | history
plugins/exchange/views/code/index.php 13 ●●●●● patch | view | raw | blame | history
forms/api/order/OrderSubmitJob.php
@@ -138,9 +138,18 @@
                }
                $order->remark = $mchItem['remark'];
                // 发卡平台名称,填写到订单的商家备注中
                $sremark = $mchItem['seller_remark'].' 卡号:'.$mchItem['form_data']['card_no'].' 密码:'.$mchItem['form_data']['code'];
                // 提货兑换时写入订单的信息
                // $sremark = $this->extra_info['card_platform'].' 卡号:'.$this->codeModel->card_no.' 密码:'.$this->codeModel->code;
                $sremark = $mchItem['seller_remark'].'  '.$mchItem['form_data']['ex_remark'];
                $order->seller_remark = $sremark;
                $order->ex_platform = $mchItem['form_data']['ex_platform'];
                $order->ex_card_no = $mchItem['form_data']['card_no'];
                $order->ex_code = $mchItem['form_data']['code'];
                $order->ex_erp_no = "";
                // 发卡平台名称,填写到订单的商家备注中
                //$sremark = $mchItem['seller_remark'].' 卡号:'.$mchItem['form_data']['card_no'].' 密码:'.$mchItem['form_data']['code'];
                //$order->seller_remark = $sremark;
                //\Yii::error('seller_remark:::::::::'.json_encode($mchItem));
                //\Yii::error('form_data==card_platform:::::::::'.json_encode($data));
models/Order.php
@@ -90,6 +90,10 @@
 * @property OrderDetailExpress $detailExpress;
 * @property OrderExpressSingle $expressSingle;
 * @property PaymentOrder $paymentOrder;
 * @property string $ex_platform
 * @property string $ex_card_no
 * @property string $ex_code
 * @property string $ex_erp_no
 */
class Order extends ModelActiveRecord
{
@@ -146,6 +150,7 @@
            [['name', 'customer_name', 'express'], 'string', 'max' => 65],
            [['token', 'platform'], 'string', 'max' => 32],
            [['city_mobile'], 'string', 'max' => 100],
            [['ex_platform','ex_card_no','ex_code','ex_erp_no'], 'string', 'max' => 100],
        ];
    }
@@ -218,7 +223,11 @@
            'location' => '定位',
            'city_name' => '配送员',
            'city_info' => '配送信息',
            'platform' => '平台信息'
            'platform' => '平台信息',
            'ex_platform' => '发卡平台名称',
            'ex_card_no' => '提货卡号',
            'ex_code' => '提货卡密码',
            'ex_erp_no' => 'ERP单号'
        ];
    }
plugins/exchange/forms/exchange/ExchangeFactory.php
@@ -146,6 +146,8 @@
    public function unite()
    {
        \Yii::warning('unit:'.$this->extra_info['ex_remark']);
        try {
            $has_imitate = $this->origin === ExchangeCode::ORIGIN_ADMIN ? !$this->user_id : false;
plugins/exchange/forms/exchange/basic/Goods.php
@@ -90,8 +90,17 @@
        $order->use_integral_num = 0;
        $order->integral_deduction_price = 0;
        $order->remark = '';
        $sremark = $this->extra_info['card_platform'].' 卡号:'.$this->codeModel->card_no.' 密码:'.$this->codeModel->code;
        // 提货兑换时写入订单的信息
        // $sremark = $this->extra_info['card_platform'].' 卡号:'.$this->codeModel->card_no.' 密码:'.$this->codeModel->code;
        $sremark = $this->extra_info['ex_remark'];
        $order->seller_remark = $sremark;
        $order->ex_platform = $this->extra_info['card_platform'];
        $order->ex_card_no = $this->codeModel->card_no;
        $order->ex_code = $this->codeModel->code;
        $order->ex_erp_no = "";
        $order->order_form = \Yii::$app->serializer->encode([]);
        $order->words = '';
plugins/exchange/forms/mall/RecordForm.php
@@ -24,20 +24,21 @@
    public $mobile;
    public $address;
    public $card_platform;
    public $ex_remark;
    public function rules()
    {
        return [
            [['code'], 'string'],
            [['user_id'], 'integer'],
            [['code', 'token', 'name', 'mobile','card_no','address','card_platform'], 'string'],
            [['code', 'token', 'name', 'mobile','card_no','address','card_platform','ex_remark'], 'string'],
        ];
    }
    public function attributeLabels()
    {
        return [
            'code' => '提货卡',
            'code' => '密码',
            'card_no' => '卡号',
        ];
    }
@@ -75,6 +76,7 @@
                    'mobile' => $this->mobile,
                    'address'=>$this->address,
                    'card_platform'=>$this->card_platform,
                    'ex_remark'=>$this->ex_remark,
                ]
            );
            $result = $create->unite();
plugins/exchange/views/code/index.php
@@ -188,7 +188,10 @@
                    </el-select>
                </el-form-item>
                <el-form-item prop="address_detail_p" label="详细地址">
                    <el-input type="text" size="small" v-model="address_detail" autocomplete="off" style="width:690px;"></el-input>
                    <el-input type="text" size="small" maxlength="200" v-model="address_detail" autocomplete="off" style="width:690px;"></el-input>
                </el-form-item>
                <el-form-item prop="form.ex_remark" label="兑换备注">
                    <el-input type="textarea" size="small" maxlength="200"  v-model="form.ex_remark" autocomplete="off" style="width:690px;"></el-input>
                </el-form-item>
                <el-form-item label="兑换奖励" prop="rewards">
                    <el-table :header-cell-style="{'background-color': '#F6F7FA','margin-left':'5px'}"  class="table-info" :data="rewards" ref="multipleTable" border style="width: 800px">
@@ -387,13 +390,14 @@
                    },
                    data: {
                        card_no:this.card_no,
                        code: this.code,
                        code: this.form.keyword,
                        user_id: this.form.user.id ? this.form.user.id : 0,
                        name: this.form.name,
                        token: this.form.mode == 1 ? this.token : '',
                        mobile: this.form.mobile,
                        address:this.provinceName + ' ' + this.cityName + ' ' + this.districtName + ' ' + this.address_detail,
                        card_platform:this.form.card_platform,
                        ex_remark:this.form.ex_remark
                    },
                    method: 'post'
                }).then(e => {
@@ -405,7 +409,7 @@
                        });
                        this.card_no = '';
                        this.code = '';
                        this.keyword = '';
                        this.form.keyword = '';
                        this.form.user = {};
                        this.form.name = '';
                        this.form.mobile = '';
@@ -414,6 +418,7 @@
                        this.cityName = '';
                        this.districtName = '';
                        this.address_detail = '';
                        this.form.ex_remark = '';
                    } else {
                        this.$message.error(e.data.msg);
                    }
@@ -433,7 +438,7 @@
                request({
                    params: {
                        r: 'plugin/exchange/mall/record/show-info',
                        code: that.keyword,
                        code: this.form.keyword,
                        card_no:that.cardKeyword,
                    },
                }).then(e => {