用户积分日志和商品模块

main
ztt 10 months ago
parent 9792cebe06
commit 98f7a05296
  1. 1
      addons/shopro/controller/Category.php
  2. 37
      application/admin/controller/ScoreLog.php
  3. 4
      application/admin/controller/Warehouse.php
  4. 3
      application/admin/controller/shopro/goods/Goods.php
  5. 26
      application/admin/lang/zh-cn/score_log.php
  6. 40
      application/admin/model/ScoreLog.php
  7. 10
      application/admin/model/shopro/goods/Goods.php
  8. 27
      application/admin/validate/ScoreLog.php
  9. 69
      application/admin/view/score_log/add.html
  10. 69
      application/admin/view/score_log/edit.html
  11. 29
      application/admin/view/score_log/index.html
  12. 48
      application/admin/view/shopro/category/add.html
  13. 82
      application/admin/view/shopro/goods/goods/add.html
  14. 6
      application/admin/view/shopro/user/user/detail.html
  15. 63
      public/assets/js/backend/score_log.js
  16. 35
      public/assets/js/backend/shopro/goods/goods.js

@ -49,6 +49,7 @@ class Category extends Common
foreach ($row['goods_list'] as $v) {
$v->image = formatImage($v->image);
$v->images = array_map('formatImage', $v->images);
$v->back_score = 40;
}
}
$this->success('商城分类', $category);

@ -0,0 +1,37 @@
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
/**
* 用户资金日志
*
* @icon fa fa-circle-o
*/
class ScoreLog extends Backend
{
/**
* ScoreLog模型对象
* @var \app\admin\model\ScoreLog
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\ScoreLog;
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}

@ -33,5 +33,9 @@ class Warehouse extends Backend
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
public function getList() {
$data= $this->model->field('id, name')->select();
$this->success('仓库地址列表', null, $data);
}
}

@ -183,7 +183,8 @@ class Goods extends Common
$params = $this->request->only([
'type', 'title', 'subtitle', 'image', 'images', 'image_wh', 'params',
'original_price', 'price', 'is_sku', 'limit_type', 'limit_num', 'sales_show_type',
'stock_show_type', 'show_sales', 'service_ids', 'dispatch_type', 'dispatch_id', 'is_offline', 'status', 'weigh',
'stock_show_type', 'show_sales', 'service_ids','dispatch_type', 'dispatch_id', 'is_offline', 'status', 'weigh',
'user_price', 'level1_price', 'level2_price', 'level3_price', 'company_price', 'is_new_user', 'warehouse_ids'
]); // likes, views, sales,
$this->request->has('content') && $params['content'] = $this->request->param('content', '', null); // content 不经过全局过滤
$this->svalidate($params);

@ -0,0 +1,26 @@
<?php
return [
'User_id' => '用户',
'Type' => '类型',
'Type money' => '余额',
'Type commission' => '佣金',
'Type score' => '积分',
'Event' => '事件',
'Event money_recharge' => '充值',
'Event money_consume' => '余额消费',
'Event commission_withdraw' => '提现',
'Event commission_transfer' => '佣金转余额',
'Event commission_reward' => '佣金奖励',
'Event score_consume' => '积分消费',
'Event score_sign' => '积分签到',
'Event activity' => '活动赠送',
'Amount' => '数量',
'Before' => '变动前',
'After' => '变动后',
'Memo' => '备注',
'Ext' => '扩展信息',
'Oper_type' => '操作人类型',
'Oper_id' => '操作人',
'Createtime' => '创建时间'
];

@ -0,0 +1,40 @@
<?php
namespace app\admin\model;
use think\Model;
class ScoreLog extends Model
{
// 表名
protected $name = 'shopro_user_wallet_log';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
];
}

@ -98,6 +98,16 @@ class Goods extends Common
return $service_ids;
}
public function setWarehouseIdsAttr($value, $data)
{
return is_array($value) ? join(',', $value) : $value;
}
public function getWarehouseIdsAttr($value, $data) {
$ids = $this->attrFormatComma($value, $data, 'warehouse_ids', true);
return $ids ? array_values(array_filter(array_map("intval", $ids))) : $ids;
}
public function setIsOfflineAttr($value, $data)
{

@ -0,0 +1,27 @@
<?php
namespace app\admin\validate;
use think\Validate;
class ScoreLog extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}

@ -0,0 +1,69 @@
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-type" data-rule="required" class="form-control" name="row[type]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Event')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-event" data-rule="required" class="form-control" name="row[event]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Amount')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-amount" data-rule="required" class="form-control" step="0.01" name="row[amount]" type="number" value="0.00">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Before')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-before" data-rule="required" class="form-control" step="0.01" name="row[before]" type="number" value="0.00">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('After')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-after" data-rule="required" class="form-control" step="0.01" name="row[after]" type="number" value="0.00">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Memo')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-memo" class="form-control" name="row[memo]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Ext')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-ext" class="form-control" name="row[ext]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Oper_type')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-oper_type" data-rule="required" class="form-control" name="row[oper_type]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Oper_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-oper_id" data-rule="required" data-source="oper/index" class="form-control selectpage" name="row[oper_id]" type="text" value="">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>

@ -0,0 +1,69 @@
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-type" data-rule="required" class="form-control" name="row[type]" type="text" value="{$row.type|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Event')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-event" data-rule="required" class="form-control" name="row[event]" type="text" value="{$row.event|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Amount')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-amount" data-rule="required" class="form-control" step="0.01" name="row[amount]" type="number" value="{$row.amount|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Before')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-before" data-rule="required" class="form-control" step="0.01" name="row[before]" type="number" value="{$row.before|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('After')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-after" data-rule="required" class="form-control" step="0.01" name="row[after]" type="number" value="{$row.after|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Memo')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-memo" class="form-control" name="row[memo]" type="text" value="{$row.memo|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Ext')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-ext" class="form-control" name="row[ext]" type="text" value="{$row.ext|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Oper_type')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-oper_type" data-rule="required" class="form-control" name="row[oper_type]" type="text" value="{$row.oper_type|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Oper_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-oper_id" data-rule="required" data-source="oper/index" class="form-control selectpage" name="row[oper_id]" type="text" value="{$row.oper_id|htmlentities}">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>

@ -0,0 +1,29 @@
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('score_log/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('score_log/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('score_log/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('score_log/edit')}"
data-operate-del="{:$auth->check('score_log/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

@ -135,32 +135,32 @@
<el-form-item label="分类类型">
<el-radio-group v-model="state.level" :disabled="state.type=='edit'" @change="onChangeLevel">
<el-radio :label="1">一级分类</el-radio>
<el-radio :label="2">二级分类</el-radio>
<el-radio :label="3">三级分类</el-radio>
<!-- <el-radio :label="2">二级分类</el-radio>-->
<!-- <el-radio :label="3">三级分类</el-radio>-->
</el-radio-group>
</el-form-item>
<el-form-item label="分类样式">
<div class="style-item" v-for="(item, index) in state.styleList[state.level]" :key="index"
@click="form.model.style = item.type">
<div class="top" :class="form.model.style == item.type ? 'is-active' : ''">
<img :src="`/assets/addons/shopro/img/category/${item.type}.png`" />
<el-icon>
<circle-check-filled />
</el-icon>
</div>
<div class="sa-flex sa-row-center">
<div class="style-title">样式{{ item.name }}</div>
<el-popover popper-class="style-popover sa-popper" placement="right" trigger="hover">
<img :src="`/assets/addons/shopro/img/category/${item.type}.png`" />
<template #reference>
<el-icon class="warning">
<warning />
</el-icon>
</template>
</el-popover>
</div>
</div>
</el-form-item>
<!-- <el-form-item label="分类样式">-->
<!-- <div class="style-item" v-for="(item, index) in state.styleList[state.level]" :key="index"-->
<!-- @click="form.model.style = item.type">-->
<!-- <div class="top" :class="form.model.style == item.type ? 'is-active' : ''">-->
<!-- <img :src="`/assets/addons/shopro/img/category/${item.type}.png`" />-->
<!-- <el-icon>-->
<!-- <circle-check-filled />-->
<!-- </el-icon>-->
<!-- </div>-->
<!-- <div class="sa-flex sa-row-center">-->
<!-- <div class="style-title">样式{{ item.name }}</div>-->
<!-- <el-popover popper-class="style-popover sa-popper" placement="right" trigger="hover">-->
<!-- <img :src="`/assets/addons/shopro/img/category/${item.type}.png`" />-->
<!-- <template #reference>-->
<!-- <el-icon class="warning">-->
<!-- <warning />-->
<!-- </el-icon>-->
<!-- </template>-->
<!-- </el-popover>-->
<!-- </div>-->
<!-- </div>-->
<!-- </el-form-item>-->
<el-form-item label="分类名称" prop="name">
<el-input class="sa-w-360" v-model="form.model.name" placeholder="请输入分类名称"></el-input>
</el-form-item>

@ -285,7 +285,7 @@
<el-tab-pane :name="2">
<template #label>
<div class="sa-flex" :class="validateData['2']?'is-error':''">
发货设
其他配
<el-icon v-if="validateData['2']" class="ml-1">
<warning-filled />
</el-icon>
@ -312,6 +312,16 @@
</div>
</template>
</el-tab-pane>
<el-tab-pane :name="5">
<template #label>
<div class="sa-flex" :class="validateData['5']?'is-error':''">
等级价格配置
<el-icon v-if="validateData['5']" class="ml-1">
<warning-filled />
</el-icon>
</div>
</template>
</el-tab-pane>
</el-tabs>
</el-header>
<el-main>
@ -321,9 +331,9 @@
<div class="sa-flex mb-4">
<img v-if="!(state.type=='edit' && form.model.type=='virtual')" class="goods-type" :class="form.model.type=='normal'?'is-active':''"
src="/assets/addons/shopro/img/goods/normal.png" @click="onChangeGoodsType('normal')" />
<img v-if="!(state.type=='edit' && form.model.type=='normal')" class="goods-type" :class="form.model.type=='virtual'?'is-active':''"
src="/assets/addons/shopro/img/goods/virtual.png"
@click="onChangeGoodsType('virtual')" />
<!-- <img v-if="!(state.type=='edit' && form.model.type=='normal')" class="goods-type" :class="form.model.type=='virtual'?'is-active':''"-->
<!-- src="/assets/addons/shopro/img/goods/virtual.png"-->
<!-- @click="onChangeGoodsType('virtual')" />-->
</div>
<el-form-item label="商品标题" prop="title">
<el-input class="sa-w-360" v-model="form.model.title" placeholder="请输入商品标题"></el-input>
@ -414,11 +424,11 @@
<div class="sa-flex">
<el-radio-group :disabled="state.type == 'edit'" v-model="form.model.is_sku">
<el-radio :label="0">单规格</el-radio>
<el-radio :label="1">多规格</el-radio>
<!-- <el-radio :label="1">多规格</el-radio>-->
</el-radio-group>
<div class="warning">
如商品参与了拼团、秒杀、积分等活动,切换规格,可能导致活动规格不可用
</div>
<!-- <div class="warning">-->
<!-- 如商品参与了拼团、秒杀、积分等活动,切换规格,可能导致活动规格不可用-->
<!-- </div>-->
</div>
</el-form-item>
<template v-if="form.model.is_sku == 1">
@ -788,18 +798,13 @@
</el-form-item>
<el-form-item v-if="form.model.dispatch_type == 'shopZt'" label="自提地址" prop="dispatch_id">
<div class="sa-w-360">
<el-checkbox-group v-model="ruleForm.type">
<el-checkbox value="Online activities" name="type">
南京仓
</el-checkbox>
<el-checkbox value="Promotion activities" name="type">
江宁仓
</el-checkbox>
<el-checkbox value="Offline activities" name="type">
南站仓
</el-checkbox>
<el-checkbox value="Simple brand exposure" name="type">
雨花仓
<el-checkbox-group v-model="form.model.warehouse_ids">
<el-checkbox style="width: 230px;"
v-for="item in form.model.shop_name_list"
:key="item.id"
:label="item.id"
>
{{item.name}}
</el-checkbox>
</el-checkbox-group>
</div>
@ -897,6 +902,43 @@
</el-form-item>
</div>
</el-form>
<el-form :model="form.model" :rules="form.rules" ref="formRef5" label-width="100px">
<div v-show="state.activeStep==5">
<el-form-item label="会员用户" prop="user_price">
<el-input class="sa-w-360" v-model="form.model.user_price" placeholder="请输入会员价格" type="number">
<template #append></template>
</el-input>
</el-form-item>
<el-form-item label="初级代理" prop="level1_price">
<el-input class="sa-w-360" v-model="form.model.level1_price" placeholder="请输入初级代理价格" type="number">
<template #append></template>
</el-input>
</el-form-item>
<el-form-item label="中级代理" prop="level2_price">
<el-input class="sa-w-360" v-model="form.model.level2_price" placeholder="请输入中级代理价格" type="number">
<template #append></template>
</el-input>
</el-form-item>
<el-form-item label="高级代理" prop="level3_price">
<el-input class="sa-w-360" v-model="form.model.level3_price" placeholder="请输入高级代理价格" type="number">
<template #append></template>
</el-input>
</el-form-item>
<el-form-item label="公司账号" prop="company_price">
<el-input class="sa-w-360" v-model="form.model.company_price" placeholder="请输入高级代理价格" type="number">
<template #append></template>
</el-input>
</el-form-item>
<el-form-item label="设为新人大礼包">
<el-radio-group v-model="form.model.is_new_user">
<el-radio :label=1></el-radio>
<el-radio :label=0></el-radio>
</el-radio-group>
</el-form-item>
</div>
</el-form>
</el-scrollbar>
</el-main>
<el-footer class="sa-footer--submit sa-flex sa-row-right">

@ -282,11 +282,11 @@
<div class="title sa-flex"> 用户动态 </div>
<div class="bottom">
<el-tabs v-model="log.tabActive" @tab-change="onChangeTab">
<el-tab-pane label="余额记录" name="money"></el-tab-pane>
<!-- <el-tab-pane label="余额记录" name="money"></el-tab-pane>-->
<el-tab-pane label="积分记录" name="score"></el-tab-pane>
<el-tab-pane label="佣金记录" name="commission"></el-tab-pane>
<!-- <el-tab-pane label="佣金记录" name="commission"></el-tab-pane>-->
<el-tab-pane label="订单记录" name="order"></el-tab-pane>
<el-tab-pane label="分享记录" name="share"></el-tab-pane>
<!-- <el-tab-pane label="分享记录" name="share"></el-tab-pane>-->
<el-tab-pane label="优惠券明细" name="coupon"></el-tab-pane>
</el-tabs>
<el-table

@ -0,0 +1,63 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'score_log/index' + location.search,
add_url: 'score_log/add',
edit_url: 'score_log/edit',
del_url: 'score_log/del',
multi_url: 'score_log/multi',
import_url: 'score_log/import',
table: 'shopro_user_wallet_log',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
fixedColumns: true,
fixedRightNumber: 1,
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'user_id', title: __('User_id')},
{field: 'type', title: __('Type'), operate: 'LIKE'},
{field: 'event', title: __('Event'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'amount', title: __('Amount'), operate:'BETWEEN'},
{field: 'before', title: __('Before'), operate:'BETWEEN'},
{field: 'after', title: __('After'), operate:'BETWEEN'},
{field: 'memo', title: __('Memo'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'ext', title: __('Ext'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'oper_type', title: __('Oper_type'), operate: 'LIKE'},
{field: 'oper_id', title: __('Oper_id')},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});

@ -413,6 +413,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
is_offline: 0,
is_sku: 0,
price: '',
user_price: '',
level1_price: '',
level2_price: '',
level3_price: '',
company_price: 700,
is_new_user: 1,
original_price: 0,
cost_price: 0,
stock_show_type: 'exact',
@ -442,14 +448,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
service_ids: [],
params: [],
content: '',
shop_name_arr: [
{
1:'南京仓',
2:'南京仓',
3:'南京仓',
4:'南京仓',
}
]
shop_name_list:[
{ name: '南京仓', id: '1' },
{ name: '江宁仓', id: '2' },
{ name: '建邺仓', id: '3' }
],
warehouse_ids: [],
},
rules: {
image: [{ required: true, message: '请选择商品主图', trigger: 'blur' }],
@ -489,6 +493,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
$('#goodsContent').html(form.model.content)
getDispatchSelect()
getWareHouseList()
return false
}, function (ret, res) { })
}
@ -607,6 +612,18 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
return false
}, function (ret, res) { })
}
function getWareHouseList() {
Fast.api.ajax({
url: 'warehouse/getList',
type: 'GET',
}, function (ret, res) {
console.log('仓库ID',form.model.warehouse_ids)
form.model.shop_name_list = res.data
return false
}, function (ret, res) { })
}
function onAddDispatch(dispatch_type) {
Fast.api.open(`shopro/dispatch/dispatch/add?type=add&dispatch_type=${dispatch_type}`, "添加", {
callback() {
@ -953,6 +970,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
}
submitForm.category_ids = idsArr.join(',');
console.log('仓库地址',form.model.warehouse_ids)
if (submitForm.is_sku == 0) {
if (!state.tempData.isStockWarning) {
submitForm.stock_warning = null

Loading…
Cancel
Save