Merge pull request 'dev' (#101) from dev into master

Reviewed-on: #101
This commit is contained in:
mkm 2023-12-18 12:00:09 +08:00
commit 8b8a2d9c02
9 changed files with 19 additions and 15 deletions

View File

@ -2680,7 +2680,7 @@ class StoreOrderRepository extends BaseRepository
"ot_price" => $datum['value']['price'],
"svip_price" => null,
"procure_price" => $procure_price,
"stock" => 1,
"stock" =>$datum['value']['stock']??1,
"bar_code" => (int)$datum['value']['bar_code'],
"weight" => 0,
"volume" => 0,
@ -2736,7 +2736,8 @@ class StoreOrderRepository extends BaseRepository
if (!empty($datum['value']['procure_price'])) {
$procure_price = $datum['value']['procure_price'];
}
$attrValue['stock'] = 1;
$stock=$datum['value']['stock']??1;
$attrValue['stock'] = $stock;
$unique = app(ProductRepository::class)->setUnique($find['product_id'], $datum['value']['bar_code'], $product_type);
$attrValue['unique'] = $unique;
$attrValue['detail'] = json_encode($attr_values);
@ -2748,7 +2749,7 @@ class StoreOrderRepository extends BaseRepository
$attrValue['price'] = $datum['value']['price'];
$attrValue['procure_price'] = $procure_price;
$attrValue["image"] = "https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/oa_app/23565656.png";
Db::name('store_product')->where('product_id',$find['product_id'])->update(['spec_type'=>1]);
Db::name('store_product')->where('product_id',$find['product_id'])->update(['spec_type'=>1,'stock'=>Db::raw('stock+'.$stock)]);
Db::name('store_product_attr_value')->insert($attrValue);
}
/**

View File

@ -422,7 +422,6 @@ class Auth extends BaseController
public function doMargin()
{
return app('json')->fail('线上缴纳调整中,请在线下缴纳');
$user = $this->request->userInfo();
$merchant = Db::name('merchant')->where('uid', $user['uid'])->where('status', 1)->find();
if (!$merchant) {

View File

@ -222,6 +222,7 @@ class StoreImport extends BaseController
'K1'=>'成本价',
'L1'=>'商品条码',
'M1'=>'商品品牌',
'N1'=>'库存',
];
$a=SpreadsheetExcelService::instance()->checkImport($path,$check,true);
@ -230,7 +231,9 @@ class StoreImport extends BaseController
'data' => [
'path' => $path,
'sql' => ['store_name' => 'A', 'cate_id_one' => 'B', 'cate_id_two' => 'C', 'cate_id_one_mer' => 'D', 'cate_id_one_two' => 'E',
'attr_one' => 'F', 'attr_two' => 'G', 'unit_name' => 'H', 'procure_price' => 'I','price'=>'J','cost'=>'K','bar_code'=>'L','brand_id'=>'M'],
'attr_one' => 'F', 'attr_two' => 'G', 'unit_name' => 'H', 'procure_price' => 'I','price'=>'J','cost'=>'K','bar_code'=>'L','brand_id'=>'M'
,'stock'=>'N',
],
'where' => ['store_name' => 'A'],
]
];
@ -251,6 +254,7 @@ class StoreImport extends BaseController
'J1'=>'成本价',
'K1'=>'商品条码',
'L1'=>'商品品牌',
'M1'=>'库存',
];
SpreadsheetExcelService::instance()->checkImport($path,$check,true);
$data = [
@ -258,7 +262,7 @@ class StoreImport extends BaseController
'data' => [
'path' => $path,
'sql' => ['store_name' => 'A', 'cate_id_one' => 'B', 'cate_id_two' => 'C', 'cate_id_one_mer' => 'D', 'cate_id_one_two' => 'E',
'attr_one' => 'F', 'attr_two' => 'G', 'unit_name' => 'H', 'price' => 'I','cost'=>'J','bar_code'=>'K','brand_id'=>'L'],
'attr_one' => 'F', 'attr_two' => 'G', 'unit_name' => 'H', 'price' => 'I','cost'=>'J','bar_code'=>'K','brand_id'=>'L','stock'=>'M'],
'where' => ['store_name' => 'A'],
]
];

View File

@ -18,7 +18,7 @@ class paySuccessMargin
Db::startTrans();
try {
$order_sn = $event['order_sn'];
$marginInfo = Db::name('margin_order')->where('order_sn', $order_sn)->find();
$marginInfo = Db::name('margin_order')->where('order_sn', $order_sn)->where('paid',0)->find();
if ($marginInfo) {
Db::name('margin_order')->where('order_id', $marginInfo['order_id'])->update([
'paid' => 1,
@ -30,10 +30,7 @@ class paySuccessMargin
//已支付的押金
$paidMarginAmount = bcadd($merchantInfo['paid_margin'], $marginInfo['total_price'], 2);
Db::name('merchant')->where('mer_id', $marginInfo['mer_id'])->where('uid', $marginInfo['uid'])->update([
'paid_margin' => $paidMarginAmount,'ot_margin'=>$paidMarginAmount
]);
Db::name('merchant')->where('mer_id', $marginInfo['mer_id'])->where('uid', $marginInfo['uid'])->update([
'margin' => 0
'paid_margin' => $paidMarginAmount,'ot_margin'=>$paidMarginAmount,'margin' => 0
]);
if ($paidMarginAmount ==$merchant_type['margin']) {
@ -44,10 +41,13 @@ class paySuccessMargin
}
// 提交事务
Db::commit();
return true;
} catch (\Exception $e) {
Log::error('微信支付押金失败' . $e->getMessage());
// 回滚事务
Db::rollback();
return false;
}
}

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
.title[data-v-3500ed7a]{margin-bottom:16px;color:#17233d;font-weight:500;font-size:14px}.description-term[data-v-3500ed7a]{display:table-cell;padding-bottom:10px;line-height:20px;width:50%;font-size:12px}[data-v-3cd1b9b0] .el-cascader{display:block}.dialog-scustom[data-v-3cd1b9b0]{width:1200px;height:600px}.ela-btn[data-v-3cd1b9b0]{color:#2d8cf0}.Box .ivu-radio-wrapper[data-v-3cd1b9b0]{margin-right:25px}.Box .numPut[data-v-3cd1b9b0]{width:80%!important}.lunBox[data-v-3cd1b9b0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;border:1px solid #0bb20c}.pictrueBox[data-v-3cd1b9b0]{display:inline-block}.pictrue[data-v-3cd1b9b0]{width:50px;height:50px;border:1px dotted rgba(0,0,0,.1);display:inline-block;position:relative;cursor:pointer}.pictrue img[data-v-3cd1b9b0]{width:100%;height:100%}.pictrueTab[data-v-3cd1b9b0]{width:40px!important;height:40px!important}.upLoad[data-v-3cd1b9b0]{width:40px;height:40px;border:1px dotted rgba(0,0,0,.1);border-radius:4px;background:rgba(0,0,0,.02);cursor:pointer}.ft[data-v-3cd1b9b0]{color:red}.buttonGroup[data-v-3cd1b9b0]{position:relative;display:inline-block;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.buttonGroup .small-btn[data-v-3cd1b9b0]{position:relative;float:left;height:24px;padding:0 7px;font-size:14px;border-radius:3px}.buttonGroup .small-btn[data-v-3cd1b9b0]:first-child{margin-left:0;border-bottom-right-radius:0;border-top-right-radius:0}.virtual_boder[data-v-3cd1b9b0]{border:1px solid #1890ff}.virtual_boder2[data-v-3cd1b9b0]{border:1px solid #e7e7e7}.virtual_san[data-v-3cd1b9b0]{position:absolute;bottom:0;right:0;width:0;height:0;border-bottom:26px solid #1890ff;border-left:26px solid transparent}.virtual_dui[data-v-3cd1b9b0]{position:absolute;bottom:-2px;right:2px;color:#fff;font-family:system-ui}.virtual[data-v-3cd1b9b0]{width:120px;height:60px;background:#fff;border-radius:3px;float:left;text-align:center;padding-top:8px;position:relative;cursor:pointer;line-height:23px}.virtual .virtual_top[data-v-3cd1b9b0]{font-size:14px;font-weight:600;color:rgba(0,0,0,.85)}.virtual .virtual_bottom[data-v-3cd1b9b0]{font-size:12px;font-weight:400;color:#999}.virtual[data-v-3cd1b9b0]:nth-child(2n){margin:0 12px}[data-v-7d87bc0d] .el-cascader{display:block}.ela-btn[data-v-7d87bc0d]{color:#2d8cf0}.priceBox[data-v-7d87bc0d]{width:80px}.pictrue[data-v-7d87bc0d]{width:50px;height:50px;border:1px dotted rgba(0,0,0,.1);display:inline-block;position:relative;cursor:pointer}.pictrue img[data-v-7d87bc0d]{width:100%;height:100%}[data-v-7d87bc0d] .el-input-number__decrease,[data-v-7d87bc0d] .el-input-number__increase{display:none}[data-v-7d87bc0d] .el-input-number.is-controls-right .el-input__inner,[data-v-7d87bc0d] .el-input__inner{padding:0 5px}.pictrueTab[data-v-7d87bc0d]{width:40px!important;height:40px!important}.upLoad[data-v-7d87bc0d]{width:40px;height:40px;border:1px dotted rgba(0,0,0,.1);border-radius:4px;background:rgba(0,0,0,.02);cursor:pointer}.bg[data-v-489f9ada]{z-index:100;position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.5)}.goods_detail .goods_detail_wrapper[data-v-489f9ada]{z-index:-10}[data-v-489f9ada] table.el-input__inner{padding:0}.demo-table-expand[data-v-489f9ada]{font-size:0}.demo-table-expand1[data-v-489f9ada] label{width:77px!important;color:#99a9bf}.demo-table-expand .el-form-item[data-v-489f9ada]{margin-right:0;margin-bottom:0;width:33.33%}.selWidth[data-v-489f9ada]{width:350px!important}.seachTiele[data-v-489f9ada]{line-height:35px}
.title[data-v-3500ed7a]{margin-bottom:16px;color:#17233d;font-weight:500;font-size:14px}.description-term[data-v-3500ed7a]{display:table-cell;padding-bottom:10px;line-height:20px;width:50%;font-size:12px}[data-v-3cd1b9b0] .el-cascader{display:block}.dialog-scustom[data-v-3cd1b9b0]{width:1200px;height:600px}.ela-btn[data-v-3cd1b9b0]{color:#2d8cf0}.Box .ivu-radio-wrapper[data-v-3cd1b9b0]{margin-right:25px}.Box .numPut[data-v-3cd1b9b0]{width:80%!important}.lunBox[data-v-3cd1b9b0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;border:1px solid #0bb20c}.pictrueBox[data-v-3cd1b9b0]{display:inline-block}.pictrue[data-v-3cd1b9b0]{width:50px;height:50px;border:1px dotted rgba(0,0,0,.1);display:inline-block;position:relative;cursor:pointer}.pictrue img[data-v-3cd1b9b0]{width:100%;height:100%}.pictrueTab[data-v-3cd1b9b0]{width:40px!important;height:40px!important}.upLoad[data-v-3cd1b9b0]{width:40px;height:40px;border:1px dotted rgba(0,0,0,.1);border-radius:4px;background:rgba(0,0,0,.02);cursor:pointer}.ft[data-v-3cd1b9b0]{color:red}.buttonGroup[data-v-3cd1b9b0]{position:relative;display:inline-block;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.buttonGroup .small-btn[data-v-3cd1b9b0]{position:relative;float:left;height:24px;padding:0 7px;font-size:14px;border-radius:3px}.buttonGroup .small-btn[data-v-3cd1b9b0]:first-child{margin-left:0;border-bottom-right-radius:0;border-top-right-radius:0}.virtual_boder[data-v-3cd1b9b0]{border:1px solid #1890ff}.virtual_boder2[data-v-3cd1b9b0]{border:1px solid #e7e7e7}.virtual_san[data-v-3cd1b9b0]{position:absolute;bottom:0;right:0;width:0;height:0;border-bottom:26px solid #1890ff;border-left:26px solid transparent}.virtual_dui[data-v-3cd1b9b0]{position:absolute;bottom:-2px;right:2px;color:#fff;font-family:system-ui}.virtual[data-v-3cd1b9b0]{width:120px;height:60px;background:#fff;border-radius:3px;float:left;text-align:center;padding-top:8px;position:relative;cursor:pointer;line-height:23px}.virtual .virtual_top[data-v-3cd1b9b0]{font-size:14px;font-weight:600;color:rgba(0,0,0,.85)}.virtual .virtual_bottom[data-v-3cd1b9b0]{font-size:12px;font-weight:400;color:#999}.virtual[data-v-3cd1b9b0]:nth-child(2n){margin:0 12px}[data-v-7d87bc0d] .el-cascader{display:block}.ela-btn[data-v-7d87bc0d]{color:#2d8cf0}.priceBox[data-v-7d87bc0d]{width:80px}.pictrue[data-v-7d87bc0d]{width:50px;height:50px;border:1px dotted rgba(0,0,0,.1);display:inline-block;position:relative;cursor:pointer}.pictrue img[data-v-7d87bc0d]{width:100%;height:100%}[data-v-7d87bc0d] .el-input-number__decrease,[data-v-7d87bc0d] .el-input-number__increase{display:none}[data-v-7d87bc0d] .el-input-number.is-controls-right .el-input__inner,[data-v-7d87bc0d] .el-input__inner{padding:0 5px}.pictrueTab[data-v-7d87bc0d]{width:40px!important;height:40px!important}.upLoad[data-v-7d87bc0d]{width:40px;height:40px;border:1px dotted rgba(0,0,0,.1);border-radius:4px;background:rgba(0,0,0,.02);cursor:pointer}.bg[data-v-82d6320e]{z-index:100;position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.5)}.goods_detail .goods_detail_wrapper[data-v-82d6320e]{z-index:-10}[data-v-82d6320e] table.el-input__inner{padding:0}.demo-table-expand[data-v-82d6320e]{font-size:0}.demo-table-expand1[data-v-82d6320e] label{width:77px!important;color:#99a9bf}.demo-table-expand .el-form-item[data-v-82d6320e]{margin-right:0;margin-bottom:0;width:33.33%}.selWidth[data-v-82d6320e]{width:350px!important}.seachTiele[data-v-82d6320e]{line-height:35px}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long