新增手工订单模块
This commit is contained in:
parent
5c3ad78293
commit
cf8de49eec
|
|
@ -1,85 +1,85 @@
|
||||||
package cn.qihangerp.erp.controller;
|
//package cn.qihangerp.erp.controller;
|
||||||
|
//
|
||||||
|
//
|
||||||
import cn.qihangerp.common.AjaxResult;
|
//import cn.qihangerp.common.AjaxResult;
|
||||||
import cn.qihangerp.common.PageQuery;
|
//import cn.qihangerp.common.PageQuery;
|
||||||
import cn.qihangerp.common.ResultVo;
|
//import cn.qihangerp.common.ResultVo;
|
||||||
import cn.qihangerp.common.TableDataInfo;
|
//import cn.qihangerp.common.TableDataInfo;
|
||||||
import cn.qihangerp.model.entity.OfflineGoodsSku;
|
//import cn.qihangerp.model.entity.OfflineGoodsSku;
|
||||||
import cn.qihangerp.module.service.OfflineGoodsSkuService;
|
//import cn.qihangerp.module.service.OfflineGoodsSkuService;
|
||||||
import cn.qihangerp.security.common.BaseController;
|
//import cn.qihangerp.security.common.BaseController;
|
||||||
import lombok.AllArgsConstructor;
|
//import lombok.AllArgsConstructor;
|
||||||
import org.springframework.web.bind.annotation.*;
|
//import org.springframework.web.bind.annotation.*;
|
||||||
|
//
|
||||||
import java.util.Arrays;
|
//import java.util.Arrays;
|
||||||
import java.util.List;
|
//import java.util.List;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* 商品管理Controller
|
// * 商品管理Controller
|
||||||
*
|
// *
|
||||||
* @author qihang
|
// * @author qihang
|
||||||
* @date 2023-12-29
|
// * @date 2023-12-29
|
||||||
*/
|
// */
|
||||||
@AllArgsConstructor
|
//@AllArgsConstructor
|
||||||
@RestController
|
//@RestController
|
||||||
@RequestMapping("/offline_goods")
|
//@RequestMapping("/offline_goods")
|
||||||
public class OfflineGoodsController extends BaseController
|
//public class OfflineGoodsController extends BaseController
|
||||||
{
|
//{
|
||||||
private final OfflineGoodsSkuService skuService;
|
// private final OfflineGoodsSkuService skuService;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 搜索商品SKU
|
// * 搜索商品SKU
|
||||||
* 条件:商品编码、SKU、商品名称
|
// * 条件:商品编码、SKU、商品名称
|
||||||
*/
|
// */
|
||||||
@GetMapping("/searchSku")
|
// @GetMapping("/searchSku")
|
||||||
public TableDataInfo searchSkuBy(String keyword)
|
// public TableDataInfo searchSkuBy(String keyword)
|
||||||
{
|
// {
|
||||||
logger.info("========SKU搜索=========",keyword);
|
// logger.info("========SKU搜索=========",keyword);
|
||||||
List<OfflineGoodsSku> list = skuService.searchGoodsSpec(keyword);
|
// List<OfflineGoodsSku> list = skuService.searchGoodsSpec(keyword);
|
||||||
return getDataTable(list);
|
// return getDataTable(list);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@GetMapping("/sku_list")
|
// @GetMapping("/sku_list")
|
||||||
public TableDataInfo skuList(OfflineGoodsSku bo, PageQuery pageQuery)
|
// public TableDataInfo skuList(OfflineGoodsSku bo, PageQuery pageQuery)
|
||||||
{
|
// {
|
||||||
var pageList = skuService.querySkuPageList(bo,pageQuery);
|
// var pageList = skuService.querySkuPageList(bo,pageQuery);
|
||||||
return getDataTable(pageList);
|
// return getDataTable(pageList);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 获取商品管理详细信息
|
// * 获取商品管理详细信息
|
||||||
*/
|
// */
|
||||||
@GetMapping(value = "/sku/{id}")
|
// @GetMapping(value = "/sku/{id}")
|
||||||
public AjaxResult getSkuInfo(@PathVariable("id") Long id)
|
// public AjaxResult getSkuInfo(@PathVariable("id") Long id)
|
||||||
{
|
// {
|
||||||
return success(skuService.getById(id));
|
// return success(skuService.getById(id));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
@PostMapping("/sku")
|
// @PostMapping("/sku")
|
||||||
public AjaxResult addSku(@RequestBody OfflineGoodsSku goodsSku)
|
// public AjaxResult addSku(@RequestBody OfflineGoodsSku goodsSku)
|
||||||
{
|
// {
|
||||||
ResultVo<Long> result = skuService.insertGoodsSku(goodsSku);
|
// ResultVo<Long> result = skuService.insertGoodsSku(goodsSku);
|
||||||
if(result.getCode() != 0) return AjaxResult.error(result.getMsg());
|
// if(result.getCode() != 0) return AjaxResult.error(result.getMsg());
|
||||||
else return AjaxResult.success();
|
// else return AjaxResult.success();
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@PutMapping("/sku")
|
// @PutMapping("/sku")
|
||||||
public AjaxResult editSku(@RequestBody OfflineGoodsSku sku)
|
// public AjaxResult editSku(@RequestBody OfflineGoodsSku sku)
|
||||||
{
|
// {
|
||||||
return toAjax(skuService.updateById(sku));
|
// return toAjax(skuService.updateById(sku));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 删除商品管理
|
// * 删除商品管理
|
||||||
*/
|
// */
|
||||||
@DeleteMapping("/sku/{ids}")
|
// @DeleteMapping("/sku/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
// public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
{
|
// {
|
||||||
return toAjax(skuService.removeBatchByIds(Arrays.stream(ids).toList()));
|
// return toAjax(skuService.removeBatchByIds(Arrays.stream(ids).toList()));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
|
|
||||||
8533
docs/qihang-erp.sql
8533
docs/qihang-erp.sql
File diff suppressed because one or more lines are too long
|
|
@ -37,7 +37,8 @@
|
||||||
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||||
<result property="omsPushStatus" column="oms_push_status" jdbcType="INTEGER"/>
|
<result property="auditStatus" column="audit_status" jdbcType="INTEGER"/>
|
||||||
|
<result property="auditTime" column="audit_time" jdbcType="TIMESTAMP"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
|
|
@ -51,6 +52,6 @@
|
||||||
order_time,ship_type,shipping_time,
|
order_time,ship_type,shipping_time,
|
||||||
shipping_number,shipping_company,shipping_man,
|
shipping_number,shipping_company,shipping_man,
|
||||||
shipping_cost,create_time,create_by,
|
shipping_cost,create_time,create_by,
|
||||||
update_time,update_by,oms_push_status
|
update_time,update_by,audit_status,audit_time
|
||||||
</sql>
|
</sql>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,9 @@ public class OfflineOrder implements Serializable {
|
||||||
* 更新人
|
* 更新人
|
||||||
*/
|
*/
|
||||||
private String updateBy;
|
private String updateBy;
|
||||||
private Integer omsPushStatus;
|
private Integer auditStatus;
|
||||||
|
private Date auditTime;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<OfflineOrderItem> itemList;
|
private List<OfflineOrderItem> itemList;
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@ public class OfflineOrderServiceImpl extends ServiceImpl<OfflineOrderMapper, Off
|
||||||
order.setCreateTime(new Date());
|
order.setCreateTime(new Date());
|
||||||
order.setShipType(0);
|
order.setShipType(0);
|
||||||
order.setCreateBy(createBy);
|
order.setCreateBy(createBy);
|
||||||
order.setOmsPushStatus(0);
|
order.setAuditStatus(0);
|
||||||
orderMapper.insert(order);
|
orderMapper.insert(order);
|
||||||
|
|
||||||
// List<OOrderItem> itemList = new ArrayList<OOrderItem>();
|
// List<OOrderItem> itemList = new ArrayList<OOrderItem>();
|
||||||
|
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询商品规格库存管理列表
|
|
||||||
export function listGoodsSku(query) {
|
|
||||||
return request({
|
|
||||||
url: '/api/erp-api/offline_goods/sku_list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询商品规格库存管理详细
|
|
||||||
export function getGoodsSku(id) {
|
|
||||||
return request({
|
|
||||||
url: '/api/erp-api/offline_goods/sku/' + id,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增商品规格库存管理
|
|
||||||
export function addGoodsSku(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/erp-api/offline_goods/sku',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改商品规格库存管理
|
|
||||||
export function updateGoodsSku(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/erp-api/offline_goods/sku',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除商品规格库存管理
|
|
||||||
export function delGoodsSku(id) {
|
|
||||||
return request({
|
|
||||||
url: '/api/erp-api/offline_goods/sku/' + id,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询商品规格列表
|
|
||||||
export function searchSku(query) {
|
|
||||||
return request({
|
|
||||||
url: '/api/erp-api/offline_goods/searchSku',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
@ -1,329 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px">
|
|
||||||
<el-form-item label="商品名称" prop="goodsName">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.goodsName"
|
|
||||||
placeholder="商品名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="SKU编码" prop="skuCode">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.skuCode"
|
|
||||||
placeholder="请输入SKU编码"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="第三方平台skuId" prop="skuId">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.skuId"
|
|
||||||
placeholder="第三方平台skuId"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="店铺" prop="shopId">
|
|
||||||
<el-select v-model="queryParams.shopId" placeholder="请选择店铺" clearable @change="handleQuery">
|
|
||||||
<el-option
|
|
||||||
v-for="item in shopList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['goods:goods:add']"
|
|
||||||
>手动导入商品SKU</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="goodsSpecList" @selection-change="handleSelectionChange">
|
|
||||||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
|
||||||
<el-table-column label="Sku ID" align="left" prop="id" >
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.id}} <br/>
|
|
||||||
<el-tag>{{ shopList.find(x=>x.id === scope.row.shopId) ? shopList.find(x=>x.id === scope.row.shopId).name : '' }}</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="Sku编码" align="center" prop="skuCode" />
|
|
||||||
<el-table-column label="商品名称" align="left" prop="goodsName" />
|
|
||||||
<el-table-column label="Sku名称" align="left" prop="skuName" />
|
|
||||||
<el-table-column label="图片" align="center" prop="colorImage" width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<image-preview :src="scope.row.colorImage" :width="50" :height="50"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="第三方平台SkuId" align="center" prop="skuId" />
|
|
||||||
<el-table-column label="商品库SkuId" align="center" prop="ogoodsSkuId" />
|
|
||||||
<el-table-column label="售价" align="center" prop="salePrice" />
|
|
||||||
<el-table-column label="状态" align="center" prop="status" >
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tag size="small" v-if="scope.row.status===1">上架中</el-tag>
|
|
||||||
<el-tag size="small" v-if="scope.row.status===2">已下架</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- type="text"-->
|
|
||||||
<!-- icon="el-icon-edit"-->
|
|
||||||
<!-- @click="handleUpdate(scope.row)"-->
|
|
||||||
<!-- v-hasPermi="['api:goodsSpec:edit']"-->
|
|
||||||
<!-- >修改</el-button>-->
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['goods:goods:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改商品规格库存管理对话框 -->
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
||||||
<el-form-item label="店铺" prop="shopId">
|
|
||||||
<el-select v-model="form.shopId" placeholder="请选择店铺" clearable @change="handleQuery">
|
|
||||||
<el-option
|
|
||||||
v-for="item in shopList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<!-- <el-form-item label="商品名" prop="goodsName">-->
|
|
||||||
<!-- <el-input v-model="form.goodsName" placeholder="请输入商品名" />-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- <el-form-item label="SKU名" prop="skuName">-->
|
|
||||||
<!-- <el-input v-model="form.skuName" placeholder="请输入SKU名" />-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<el-form-item label="SKU编码" prop="skuCode">
|
|
||||||
<el-input v-model="form.skuCode" placeholder="请输入SKU编码" />
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<!-- <el-form-item label="图片URL" prop="colorImage">-->
|
|
||||||
<!--<!– <image-upload v-model="form.colorImage" :limit="1" />–>-->
|
|
||||||
<!-- <el-input v-model="form.colorImage" placeholder="图片URL" />-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<el-form-item label="售价" prop="salePrice">
|
|
||||||
<el-input type="number" v-model.number="form.salePrice" placeholder="售价" />
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<!-- <el-form-item label="规格1" prop="colorValue">-->
|
|
||||||
<!-- <el-input v-model="form.colorValue" placeholder="请输入规格1" />-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- <el-form-item label="规格2" prop="sizeValue">-->
|
|
||||||
<!-- <el-input v-model="form.sizeValue" placeholder="请输入规格2" />-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- <el-form-item label="规格3" prop="styleValue">-->
|
|
||||||
<!-- <el-input v-model="form.styleValue" placeholder="请输入规格3" />-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<el-form-item label="第三方平台SkuId" prop="skuId">
|
|
||||||
<el-input type="number" v-model.number="form.skuId" placeholder="请输入第三方平台SkuId" />
|
|
||||||
</el-form-item>
|
|
||||||
<!-- <el-form-item label="ERP商品SkuID" prop="outerErpSkuId">-->
|
|
||||||
<!-- <el-input type="number" v-model.number="form.outerErpSkuId" placeholder="请输入ERP商品SkuID" />-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {listGoodsSku, getGoodsSku, updateGoodsSku, addGoodsSku, delGoodsSku} from "@/api/offline/goodsSku";
|
|
||||||
import {getToken} from "@/utils/auth";
|
|
||||||
import {listShop} from "@/api/shop/shop";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "GoodsOffline",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
headers: { 'Authorization': 'Bearer ' + getToken() },
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 商品规格库存管理表格数据
|
|
||||||
goodsSpecList: [],
|
|
||||||
shopList: [],
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
erpGoodsId: null,
|
|
||||||
erpSkuId: null,
|
|
||||||
skuName: null,
|
|
||||||
skuNum: null,
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {
|
|
||||||
salePrice:null
|
|
||||||
},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
shopId: [{ required: true, message: "不能为空", trigger: "blur" }],
|
|
||||||
goodsName: [{ required: true, message: "不能为空", trigger: "blur" }],
|
|
||||||
skuName: [{ required: true, message: "不能为空", trigger: "blur" }],
|
|
||||||
skuCode: [{ required: true, message: "SKU不能为空", trigger: "blur" }],
|
|
||||||
salePrice: [{ required: true, message: "不能为空", trigger: "blur" }],
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
listShop({type: 999}).then(response => {
|
|
||||||
this.shopList = response.rows;
|
|
||||||
if (this.shopList && this.shopList.length > 0) {
|
|
||||||
this.queryParams.shopId = this.shopList[0].id
|
|
||||||
}
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询商品规格库存管理列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
listGoodsSku(this.queryParams).then(response => {
|
|
||||||
this.goodsSpecList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: null,
|
|
||||||
goodsId: null,
|
|
||||||
skuName: null,
|
|
||||||
skuNum: null,
|
|
||||||
colorValue: null,
|
|
||||||
colorImage: null,
|
|
||||||
sizeValue: null,
|
|
||||||
styleValue: null,
|
|
||||||
erpGoodsId: null,
|
|
||||||
erpSkuId: null
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.id)
|
|
||||||
this.single = selection.length!==1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const ids = row.id || this.ids;
|
|
||||||
this.$modal.confirm('是否确认删除商品管理编号为"' + ids + '"的数据项?').then(function() {
|
|
||||||
return delGoodsSku(ids);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
// handleUpdate(row) {
|
|
||||||
// this.reset();
|
|
||||||
// const id = row.id || this.ids
|
|
||||||
// getGoodsSku(id).then(response => {
|
|
||||||
// this.form = response.data;
|
|
||||||
// this.form.disable = response.data.disable+''
|
|
||||||
// this.open = true;
|
|
||||||
// this.title = "修改商品规格库存管理";
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateGoodsSku(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
addGoodsSku(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("添加成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleAdd(){
|
|
||||||
this.reset()
|
|
||||||
this.open = true
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
@ -12,6 +12,12 @@
|
||||||
<el-select v-model="form.shopId" filterable r placeholder="搜索店铺" >
|
<el-select v-model="form.shopId" filterable r placeholder="搜索店铺" >
|
||||||
<el-option v-for="item in shopList" :key="item.id" :label="item.name" :value="item.id">
|
<el-option v-for="item in shopList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
<span style="float: left">{{ item.name }}</span>
|
<span style="float: left">{{ item.name }}</span>
|
||||||
|
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.type === 500">微信小店</span>
|
||||||
|
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.type === 200">京东POP</span>
|
||||||
|
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.type === 100">淘宝天猫</span>
|
||||||
|
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.type === 300">拼多多</span>
|
||||||
|
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.type === 400">抖店</span>
|
||||||
|
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.type === 999">其他</span>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -73,9 +79,9 @@
|
||||||
<!-- <el-input v-model="scope.row.goodsTitle" placeholder="请输入商品标题" /> -->
|
<!-- <el-input v-model="scope.row.goodsTitle" placeholder="请输入商品标题" /> -->
|
||||||
<el-select v-model="scope.row.skuId" filterable remote reserve-keyword placeholder="搜索商品SKU" style="width: 330px;"
|
<el-select v-model="scope.row.skuId" filterable remote reserve-keyword placeholder="搜索商品SKU" style="width: 330px;"
|
||||||
:remote-method="searchSku" :loading="skuListLoading" @change="skuChanage(scope.row)">
|
:remote-method="searchSku" :loading="skuListLoading" @change="skuChanage(scope.row)">
|
||||||
<el-option v-for="item in skuList" :key="item.id"
|
<el-option v-for="item in skuList" :key="item.skuId"
|
||||||
:label="item.goodsName + ' ' + item.skuName +' - ' + item.skuCode"
|
:label="item.goodsName + ' ' + item.skuName +' - ' + item.skuCode"
|
||||||
:value="item.id">
|
:value="item.skuId">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -166,8 +172,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { searchSku } from "@/api/offline/goodsSku";
|
import { searchSku } from "@/api/goods/goods";
|
||||||
// import { listShop } from "@/api/offline/shop";
|
|
||||||
import { addOrder } from "@/api/offline/order";
|
import { addOrder } from "@/api/offline/order";
|
||||||
import { listShop } from "@/api/shop/shop";
|
import { listShop } from "@/api/shop/shop";
|
||||||
import {
|
import {
|
||||||
|
|
@ -221,7 +226,7 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.form.orderDate = this.getDate()
|
this.form.orderDate = this.getDate()
|
||||||
listShop({type: 999}).then(response => {
|
listShop({status: 1}).then(response => {
|
||||||
this.shopList = response.rows;
|
this.shopList = response.rows;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -337,10 +342,10 @@ export default {
|
||||||
},
|
},
|
||||||
skuChanage(row) {
|
skuChanage(row) {
|
||||||
console.log('=====0000====',row)
|
console.log('=====0000====',row)
|
||||||
const spec = this.skuList.find(x => x.id === row.skuId);
|
const spec = this.skuList.find(x => x.skuId === row.skuId);
|
||||||
if (spec) {
|
if (spec) {
|
||||||
console.log('=======11111==', spec)
|
console.log('=======11111==', spec)
|
||||||
row.skuId = spec.id
|
row.skuId = spec.skuId
|
||||||
row.salePrice = spec.salePrice
|
row.salePrice = spec.salePrice
|
||||||
// row.sku = spec.colorValue + ' ' + spec.sizeValue + ' ' + spec.styleValue
|
// row.sku = spec.colorValue + ' ' + spec.sizeValue + ' ' + spec.styleValue
|
||||||
row.skuName = spec.skuName
|
row.skuName = spec.skuName
|
||||||
|
|
@ -465,7 +470,7 @@ export default {
|
||||||
this.$modal.msgSuccess("订单创建成功");
|
this.$modal.msgSuccess("订单创建成功");
|
||||||
// 调用全局挂载的方法,关闭当前标签页
|
// 调用全局挂载的方法,关闭当前标签页
|
||||||
this.$store.dispatch("tagsView/delView", this.$route);
|
this.$store.dispatch("tagsView/delView", this.$route);
|
||||||
this.$router.push('/offline/order');
|
this.$router.push('/order/offline_order_list');
|
||||||
});
|
});
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,12 @@
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id">
|
:value="item.id">
|
||||||
<span style="float: left">{{ item.name }}</span>
|
<span style="float: left">{{ item.name }}</span>
|
||||||
|
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.type === 500">微信小店</span>
|
||||||
|
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.type === 200">京东POP</span>
|
||||||
|
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.type === 100">淘宝天猫</span>
|
||||||
|
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.type === 300">拼多多</span>
|
||||||
|
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.type === 400">抖店</span>
|
||||||
|
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.type === 999">其他</span>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -239,24 +244,24 @@
|
||||||
<!-- <el-tag v-if="scope.row.refundStatus === 4">退款成功</el-tag>-->
|
<!-- <el-tag v-if="scope.row.refundStatus === 4">退款成功</el-tag>-->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<!-- <template slot-scope="scope">-->
|
<template slot-scope="scope">
|
||||||
<!-- <el-button-->
|
<el-button
|
||||||
<!-- size="mini"-->
|
size="mini"
|
||||||
<!-- type="text"-->
|
type="text"
|
||||||
<!-- icon="el-icon-view"-->
|
icon="el-icon-view"
|
||||||
<!-- @click="handleDetail(scope.row)"-->
|
@click="handleDetail(scope.row)"
|
||||||
<!-- >详情</el-button>-->
|
>详情</el-button>
|
||||||
<!--<!– <div>–>-->
|
<div>
|
||||||
<!--<!– <el-button–>-->
|
<el-button style="padding-left: 6px;padding-right: 6px;" plain
|
||||||
<!--<!– size="mini"–>-->
|
size="mini" v-if="scope.row.auditStatus === 0"
|
||||||
<!--<!– type="success"–>-->
|
type="success"
|
||||||
<!--<!– icon="el-icon-share"–>-->
|
icon="el-icon-share"
|
||||||
<!--<!– @click="handleShip(scope.row)"–>-->
|
@click="handleConfirm(scope.row)"
|
||||||
<!--<!– >订单发货</el-button>–>-->
|
>确认订单</el-button>
|
||||||
<!--<!– </div>–>-->
|
</div>
|
||||||
<!-- </template>-->
|
</template>
|
||||||
<!-- </el-table-column>-->
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
|
|
@ -395,7 +400,6 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {listOrder, getOrder, delOrder, addOrder, updateOrder, pushOms} from "@/api/offline/order";
|
import {listOrder, getOrder, delOrder, addOrder, updateOrder, pushOms} from "@/api/offline/order";
|
||||||
// import { listShop } from "@/api/offline/shop";
|
|
||||||
import { listShop } from "@/api/shop/shop";
|
import { listShop } from "@/api/shop/shop";
|
||||||
import Clipboard from "clipboard";
|
import Clipboard from "clipboard";
|
||||||
|
|
||||||
|
|
@ -449,7 +453,7 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
listShop({type: 999}).then(response => {
|
listShop({status: 1}).then(response => {
|
||||||
this.shopList = response.rows;
|
this.shopList = response.rows;
|
||||||
if (this.shopList && this.shopList.length > 0) {
|
if (this.shopList && this.shopList.length > 0) {
|
||||||
this.queryParams.shopId = this.shopList[0].id
|
this.queryParams.shopId = this.shopList[0].id
|
||||||
|
|
@ -528,6 +532,20 @@ export default {
|
||||||
},
|
},
|
||||||
reset(){
|
reset(){
|
||||||
|
|
||||||
|
},
|
||||||
|
handleConfirm(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getOrder(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.form.provinces = []
|
||||||
|
this.form.provinces.push(response.data.province)
|
||||||
|
this.form.provinces.push(response.data.city)
|
||||||
|
this.form.provinces.push(response.data.town)
|
||||||
|
this.detailOpen = true;
|
||||||
|
this.detailTitle = "确认订单";
|
||||||
|
this.isAudit = true
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/** 详情按钮操作 */
|
/** 详情按钮操作 */
|
||||||
handleDetail(row) {
|
handleDetail(row) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue