完善发货设置
This commit is contained in:
parent
3f8d2ff1ed
commit
ed0bb999ce
|
|
@ -0,0 +1,63 @@
|
||||||
|
package cn.qihangerp.oms.controller;
|
||||||
|
|
||||||
|
import cn.qihangerp.common.AjaxResult;
|
||||||
|
import cn.qihangerp.common.PageQuery;
|
||||||
|
import cn.qihangerp.common.PageResult;
|
||||||
|
import cn.qihangerp.common.TableDataInfo;
|
||||||
|
import cn.qihangerp.domain.OLogisticsCompany;
|
||||||
|
import cn.qihangerp.domain.OShop;
|
||||||
|
import cn.qihangerp.domain.OShopPlatform;
|
||||||
|
import cn.qihangerp.module.service.OLogisticsCompanyService;
|
||||||
|
import cn.qihangerp.module.service.OShopPlatformService;
|
||||||
|
import cn.qihangerp.module.service.OShopService;
|
||||||
|
import cn.qihangerp.oms.request.ShopBo;
|
||||||
|
import cn.qihangerp.security.common.BaseController;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺Controller
|
||||||
|
*
|
||||||
|
* @author qihang
|
||||||
|
* @date 2023-12-31
|
||||||
|
*/
|
||||||
|
@AllArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/shop")
|
||||||
|
public class LogisticsController extends BaseController {
|
||||||
|
private final OLogisticsCompanyService logisticsCompanyService;
|
||||||
|
private final OShopService shopService;
|
||||||
|
private final OShopPlatformService platformService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/logistics_status")
|
||||||
|
public TableDataInfo logisticsStatusList(Integer status, Integer shopType, Integer shopId)
|
||||||
|
{
|
||||||
|
if(status==null) status=1;
|
||||||
|
if(shopType==null)shopType=0;
|
||||||
|
return getDataTable(logisticsCompanyService.queryListByStatus(status,shopType, shopId));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 查询店铺列表logistics
|
||||||
|
*/
|
||||||
|
@GetMapping("/logistics")
|
||||||
|
public TableDataInfo logisticsList(Integer type, Integer shopId, PageQuery pageQuery)
|
||||||
|
{
|
||||||
|
if(type==null)type=0;
|
||||||
|
PageResult<OLogisticsCompany> result = logisticsCompanyService.queryPageList(type, shopId, pageQuery);
|
||||||
|
return getDataTable(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/logistics/add")
|
||||||
|
public AjaxResult add(@RequestBody OLogisticsCompany company)
|
||||||
|
{
|
||||||
|
company.setPlatformId(0);
|
||||||
|
return toAjax(logisticsCompanyService.save(company));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -117,18 +117,18 @@ public class ShopController extends BaseController {
|
||||||
return toAjax(shopService.removeBatchByIds(Arrays.stream(ids).toList()));
|
return toAjax(shopService.removeBatchByIds(Arrays.stream(ids).toList()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/logistics_status")
|
// @GetMapping("/logistics_status")
|
||||||
public TableDataInfo logisticsStatusList(Integer status, Integer shopType, Integer shopId)
|
// public TableDataInfo logisticsStatusList(Integer status, Integer shopType, Integer shopId)
|
||||||
{
|
// {
|
||||||
return getDataTable(logisticsCompanyService.queryListByStatus(status,shopType, shopId));
|
// return getDataTable(logisticsCompanyService.queryListByStatus(status,shopType, shopId));
|
||||||
}
|
// }
|
||||||
/**
|
// /**
|
||||||
* 查询店铺列表logistics
|
// * 查询店铺列表logistics
|
||||||
*/
|
// */
|
||||||
@GetMapping("/logistics")
|
// @GetMapping("/logistics")
|
||||||
public TableDataInfo logisticsList(Integer type, Integer shopId, PageQuery pageQuery)
|
// public TableDataInfo logisticsList(Integer type, Integer shopId, PageQuery pageQuery)
|
||||||
{
|
// {
|
||||||
PageResult<OLogisticsCompany> result = logisticsCompanyService.queryPageList(type, shopId, pageQuery);
|
// PageResult<OLogisticsCompany> result = logisticsCompanyService.queryPageList(type, shopId, pageQuery);
|
||||||
return getDataTable(result);
|
// return getDataTable(result);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3077,7 +3077,7 @@ INSERT INTO `sys_menu` VALUES (2079, '字典管理', 5, 9, 'dict', 'system/dict/
|
||||||
INSERT INTO `sys_menu` VALUES (2084, '电子面单设置', 3, 22, 'ewaybill_account', 'shop/ewaybillAccount/index', NULL, 1, 0, 'C', '0', '0', '', 'code', 'admin', '2024-03-21 20:05:09', 'admin', '2025-05-19 14:17:30', '');
|
INSERT INTO `sys_menu` VALUES (2084, '电子面单设置', 3, 22, 'ewaybill_account', 'shop/ewaybillAccount/index', NULL, 1, 0, 'C', '0', '0', '', 'code', 'admin', '2024-03-21 20:05:09', 'admin', '2025-05-19 14:17:30', '');
|
||||||
INSERT INTO `sys_menu` VALUES (2086, '定时任务配置', 3, 80, 'task_list', 'shop/task/index', NULL, 1, 0, 'C', '0', '0', '', 'time-range', 'admin', '2024-03-22 19:29:20', 'admin', '2025-05-19 14:24:21', '');
|
INSERT INTO `sys_menu` VALUES (2086, '定时任务配置', 3, 80, 'task_list', 'shop/task/index', NULL, 1, 0, 'C', '0', '0', '', 'time-range', 'admin', '2024-03-22 19:29:20', 'admin', '2025-05-19 14:24:21', '');
|
||||||
INSERT INTO `sys_menu` VALUES (2087, '发货管理', 0, 20, 'ship', NULL, NULL, 1, 0, 'M', '0', '0', '', 'guide', 'admin', '2024-03-30 17:36:10', 'admin', '2024-08-25 15:45:48', '');
|
INSERT INTO `sys_menu` VALUES (2087, '发货管理', 0, 20, 'ship', NULL, NULL, 1, 0, 'M', '0', '0', '', 'guide', 'admin', '2024-03-30 17:36:10', 'admin', '2024-08-25 15:45:48', '');
|
||||||
INSERT INTO `sys_menu` VALUES (2088, '发货快递管理', 2087, 9, 'ship_logistics', 'shipping/logistics/company', NULL, 1, 0, 'C', '0', '0', '', 'checkbox', 'admin', '2024-03-30 17:37:01', 'admin', '2024-12-08 16:19:02', '');
|
INSERT INTO `sys_menu` VALUES (2088, '发货设置', 2087, 9, 'ship_logistics', 'shipping/logistics/index', NULL, 1, 0, 'C', '0', '0', '', 'checkbox', 'admin', '2024-03-30 17:37:01', 'admin', '2024-12-08 16:19:02', '');
|
||||||
INSERT INTO `sys_menu` VALUES (2089, '发货记录', 2087, 3, 'record', 'shipping/index', NULL, 1, 0, 'C', '0', '0', '', 'guide', 'admin', '2024-03-30 17:37:42', 'admin', '2024-07-28 18:56:02', '');
|
INSERT INTO `sys_menu` VALUES (2089, '发货记录', 2087, 3, 'record', 'shipping/index', NULL, 1, 0, 'C', '0', '0', '', 'guide', 'admin', '2024-03-30 17:37:42', 'admin', '2024-07-28 18:56:02', '');
|
||||||
INSERT INTO `sys_menu` VALUES (2090, '角色管理', 5, 2, 'role', 'system/role/index', NULL, 1, 0, 'C', '0', '0', NULL, 'peoples', 'admin', '2024-03-31 12:40:50', '', NULL, '');
|
INSERT INTO `sys_menu` VALUES (2090, '角色管理', 5, 2, 'role', 'system/role/index', NULL, 1, 0, 'C', '0', '0', NULL, 'peoples', 'admin', '2024-03-31 12:40:50', '', NULL, '');
|
||||||
INSERT INTO `sys_menu` VALUES (2091, '部门管理', 5, 3, 'dept', 'system/dept/index', NULL, 1, 0, 'C', '0', '0', NULL, 'tree', 'admin', '2024-03-31 12:42:57', '', NULL, '');
|
INSERT INTO `sys_menu` VALUES (2091, '部门管理', 5, 3, 'dept', 'system/dept/index', NULL, 1, 0, 'C', '0', '0', NULL, 'tree', 'admin', '2024-03-31 12:42:57', '', NULL, '');
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ export function getLogistics(id) {
|
||||||
// 新增物流公司
|
// 新增物流公司
|
||||||
export function addLogistics(data) {
|
export function addLogistics(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/logistics',
|
url: '/api/oms-api/shop/logistics/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -29,13 +29,22 @@
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handlePull"
|
@click="handleAdd"
|
||||||
>API拉取快递公司数据</el-button>
|
>添加</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- type="danger"-->
|
||||||
|
<!-- plain-->
|
||||||
|
<!-- icon="el-icon-download"-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- @click="handlePull"-->
|
||||||
|
<!-- >API拉取快递公司数据</el-button>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
@ -79,7 +88,30 @@
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
<!-- 对话框 -->
|
||||||
|
<el-dialog title="添加快递公司" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="快递公司" prop="name">
|
||||||
|
<el-input v-model="form.name" placeholder="请输入快递公司" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="快递编码" prop="name">
|
||||||
|
<el-input v-model="form.code" placeholder="请输入快递编码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-select v-model="form.status" placeholder="请选择状态" clearable @change="handleQuery">
|
||||||
|
<el-option label="启用" value="1"></el-option>
|
||||||
|
<el-option label="禁用" value="0"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" placeholder="备注" />
|
||||||
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -88,6 +120,7 @@ import {listLogistics, updateStatus} from "@/api/shop/shop";
|
||||||
import {MessageBox} from "element-ui";
|
import {MessageBox} from "element-ui";
|
||||||
import {isRelogin} from "@/utils/request";
|
import {isRelogin} from "@/utils/request";
|
||||||
import {pullLogisticsTao,pullLogisticsJd} from "@/api/tao/shop_api";
|
import {pullLogisticsTao,pullLogisticsJd} from "@/api/tao/shop_api";
|
||||||
|
import {addLogistics} from "@/api/api/logistics";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Shop",
|
name: "Shop",
|
||||||
|
|
@ -161,7 +194,9 @@ export default {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleAdd() {
|
||||||
|
this.open=true
|
||||||
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
|
|
@ -227,7 +262,23 @@ export default {
|
||||||
console.log('更新状态====',response)
|
console.log('更新状态====',response)
|
||||||
this.getList()
|
this.getList()
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
cancel(){
|
||||||
|
this.open=false
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
addLogistics(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("添加成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
|
<el-tab-pane label="快递公司设置" name="LogisticsCompany" >
|
||||||
|
<logistics-company></logistics-company>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="电子面单账户设置" name="EwaybillAccount" lazy>
|
||||||
|
<shop-waybill-account></shop-waybill-account>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import LogisticsCompany from "@/views/shipping/logistics/company.vue";
|
||||||
|
import ShopWaybillAccount from "@/views/shipping/logistics/shop_ewaybill_account.vue"
|
||||||
|
export default {
|
||||||
|
name: "set",
|
||||||
|
components:{
|
||||||
|
LogisticsCompany,ShopWaybillAccount
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeName: 'LogisticsCompany',
|
||||||
|
typeList: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleClick(tab, event) {
|
||||||
|
console.log(tab, event);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -0,0 +1,387 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row>
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="108px">
|
||||||
|
<el-form-item label="快递公司编码" prop="deliveryId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.deliveryId"
|
||||||
|
placeholder="请输入快递公司编码"
|
||||||
|
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>
|
||||||
|
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-time"
|
||||||
|
size="mini"
|
||||||
|
@click="updateWaybillAccount"
|
||||||
|
>更新电子面单账户信息</el-button>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<!-- <el-col :span="1.5">-->
|
||||||
|
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- type="success"-->
|
||||||
|
<!-- plain-->
|
||||||
|
<!-- icon="el-icon-printer"-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- @click="handleAdd"-->
|
||||||
|
<!-- >手动添加</el-button>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="deliverList" @selection-change="handleSelectionChange">
|
||||||
|
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
||||||
|
<!-- <el-table-column label="ID" align="center" prop="id" />-->
|
||||||
|
<el-table-column label="分配的供应商" align="left" width="211">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.supplierIds ? supplierList.filter(item =>
|
||||||
|
scope.row.supplierIds.replace(/^,|,$/g, '').split(',').map(Number).includes(item.id)
|
||||||
|
).map(item => item.name).join(', ') : '' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="网点" align="left" prop="siteName">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="网点编号" align="center" prop="siteCode" width="100px" />
|
||||||
|
|
||||||
|
<el-table-column label="快递公司编码" align="center" prop="deliveryId" width="100px" />
|
||||||
|
<el-table-column label="客户编码" align="center" prop="sellerShopId" width="100px" />
|
||||||
|
<el-table-column label="店铺" align="left" prop="netsiteName" width="200px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ shopList.find(x=>x.id === scope.row.shopId) ? shopList.find(x=>x.id === scope.row.shopId).name : '' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="已取单号" align="center" prop="allocated" width="100px" />
|
||||||
|
<el-table-column label="已取消单号" align="center" prop="cancel" width="100px" />
|
||||||
|
<el-table-column label="已回收单号" align="center" prop="recycled" width="100px" />
|
||||||
|
<el-table-column label="余额" align="center" prop="available" width="100px" />
|
||||||
|
<!-- <el-table-column label="省" align="center" prop="senderProvince"/>-->
|
||||||
|
<!-- <el-table-column label="市" align="center" prop="senderCity"/>-->
|
||||||
|
<!-- <el-table-column label="区" align="center" prop="senderCounty"/>-->
|
||||||
|
<!-- <el-table-column label="发货地址" align="center" prop="senderAddress"/>-->
|
||||||
|
<el-table-column label="发货地址" align="left" prop="provinceName" width="200">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{scope.row.senderProvince}} {{scope.row.senderCity}} {{scope.row.senderCounty}} <br/>
|
||||||
|
{{scope.row.senderAddress}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="发货人" align="center" prop="name"/>
|
||||||
|
<el-table-column label="发货手机号" align="center" prop="mobile"/>
|
||||||
|
|
||||||
|
|
||||||
|
<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="['shop:shop:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-share"
|
||||||
|
@click="handleShareSupplier(scope.row)"
|
||||||
|
>分配给供应商</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="手动添加" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
|
<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 label="卖家Id" prop="sellerShopId">
|
||||||
|
<el-input v-model="form.sellerShopId" placeholder="请输入卖家Id名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="appKey" prop="appKey" v-if="form.type===500">
|
||||||
|
<el-input v-model="form.appKey" placeholder="请输入appKey" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="描述" prop="remark">
|
||||||
|
<el-input type="textarea" v-model="form.remark" placeholder="请输入描述" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-select v-model="form.status" placeholder="状态">
|
||||||
|
<el-option label="启用" value="1"></el-option>
|
||||||
|
<el-option label="禁用" value="0"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="addSubmit">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<el-dialog title="修改" :visible.sync="updateOpen" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
|
<el-form-item label="网点名" prop="siteName">
|
||||||
|
<el-input v-model="form.siteName" placeholder="请输入网点名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="网点编码" prop="siteCode">
|
||||||
|
<el-input v-model="form.siteCode" placeholder="请输入网编码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="卖家Id" prop="sellerShopId">
|
||||||
|
<el-input v-model.number="form.sellerShopId" placeholder="请输入卖家Id名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发货人" prop="name" >
|
||||||
|
<el-input v-model="form.name" placeholder="请输入发货人" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发货手机号" prop="mobile" >
|
||||||
|
<el-input v-model="form.mobile" placeholder="请输入发货手机号" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="updateSubmit">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog title="分配供应商" :visible.sync="shareOpen" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
|
<el-form-item label="供应商" prop="supplierIds">
|
||||||
|
<el-select v-model="form.supplierIds" placeholder="请选择供应商" clearable multiple >
|
||||||
|
<el-option
|
||||||
|
v-for="item in supplierList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="shareSupplierSubmit">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
|
|
||||||
|
import {listShop} from "@/api/shop/shop";
|
||||||
|
// import {listOrder, getOrder } from "@/api/order/order";
|
||||||
|
// import {
|
||||||
|
// getWaybillAccountList,
|
||||||
|
// pullWaybillAccount,
|
||||||
|
// shareSupplier,
|
||||||
|
// updateAccount
|
||||||
|
// } from "@/api/shop/ewaybill";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ShopWaybillAccount",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
shopList: [],
|
||||||
|
supplierList: [],
|
||||||
|
deliverList: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
open:false,
|
||||||
|
shareOpen:false,
|
||||||
|
updateOpen:false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
refundStatus: 1,
|
||||||
|
platformId: 500,
|
||||||
|
orderStatus: '1',
|
||||||
|
shopId: null
|
||||||
|
},
|
||||||
|
// 打印参数
|
||||||
|
printParams: {
|
||||||
|
deliver: null,
|
||||||
|
printer: null
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {
|
||||||
|
id:null,
|
||||||
|
siteName:null,
|
||||||
|
siteCode:null,
|
||||||
|
sellerShopId:null,
|
||||||
|
name:null,
|
||||||
|
mobile:null,
|
||||||
|
supplierIds: null
|
||||||
|
},
|
||||||
|
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
siteName: [{ required: true, message: '不能为空', trigger: "blur" }],
|
||||||
|
siteCode: [{ required: true, message: '不能为空', trigger: "blur" }],
|
||||||
|
sellerShopId: [{ required: true, message: '不能为空', trigger: "blur" }],
|
||||||
|
name: [{ required: true, message: '不能为空', trigger: "blur" }],
|
||||||
|
mobile: [{ required: true, message: '不能为空', trigger: "blur" }],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
listShop({type: this.queryParams.platformId}).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;
|
||||||
|
getWaybillAccountList({shopId: this.queryParams.shopId}).then(response => {
|
||||||
|
this.deliverList = response.data;
|
||||||
|
});
|
||||||
|
|
||||||
|
listOrder(this.queryParams).then(response => {
|
||||||
|
this.orderList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false
|
||||||
|
this.shareOpen = false
|
||||||
|
this.updateOpen = false
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: 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.orderNum)
|
||||||
|
this.single = selection.length !== 1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
// 更新电子面单信息
|
||||||
|
updateWaybillAccount() {
|
||||||
|
pullWaybillAccount({shopId: this.queryParams.shopId}).then(response => {
|
||||||
|
this.getList()
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAdd() {
|
||||||
|
this.open = true
|
||||||
|
},
|
||||||
|
addSubmit() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleUpdate(row){
|
||||||
|
this.form.id = row.id
|
||||||
|
this.form.siteName = row.siteName
|
||||||
|
this.form.siteCode = row.siteCode
|
||||||
|
this.form.sellerShopId = row.sellerShopId
|
||||||
|
this.form.name = row.name
|
||||||
|
this.form.mobile = row.mobile
|
||||||
|
this.updateOpen = true
|
||||||
|
},
|
||||||
|
updateSubmit(){
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
updateAccount(this.form).then(resp=>{
|
||||||
|
this.$modal.msgSuccess("保存成功")
|
||||||
|
this.updateOpen =false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
handleShareSupplier(row) {
|
||||||
|
this.form.id = row.id
|
||||||
|
if (row.supplierIds) {
|
||||||
|
let numArray = row.supplierIds.replace(/^,|,$/g, '').split(',').map(Number);
|
||||||
|
this.form.supplierIds = numArray
|
||||||
|
} else this.form.supplierIds = null
|
||||||
|
this.shareOpen = true
|
||||||
|
},
|
||||||
|
shareSupplierSubmit(){
|
||||||
|
console.log("=======分配供应商ID=====",this.form.supplierIds)
|
||||||
|
shareSupplier(this.form).then(resp=>{
|
||||||
|
this.$modal.msgSuccess("保存成功")
|
||||||
|
this.shareOpen =false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -420,6 +420,11 @@ export default {
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
accountId: [{ required: true, message: '请选择电子面单账户' }],
|
accountId: [{ required: true, message: '请选择电子面单账户' }],
|
||||||
|
height: [{ required: true, message: '不能为空' }],
|
||||||
|
weight: [{ required: true, message: '不能为空' }],
|
||||||
|
shippingNumber: [{ required: true, message: '不能为空' }],
|
||||||
|
shippingCompany: [{ required: true, message: '不能为空' }],
|
||||||
|
shippingCost: [{ required: true, message: '不能为空' }],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue