Commit 13614b0e by zhangxw

Merge branch 'dev_v4.22.0' of http://192.168.3.233:8090/saas_plus/dj-car-life-sy…

…stem into zhangxw_dev_v4.22.0
2 parents 403aa71d 1b727bcf
Showing 44 changed files with 2720 additions and 597 deletions
import request from "./request"
const path = "dj.api.smarcarlife."
const path2 = "dj.api.goodsInfo."
const path3 = "dj.api.smartcarlife."
// 按商品类目分组获取购物车列表
export function listGroupByGoodsType(data) {
data.method = `${path}purchaseShoppingCar.listGroupByGoodsType`
return request(data)
}
// 添加到购物车
export function shoppingCarAdd(data) {
data.method = `${path}purchaseShoppingCar.add`
return request(data)
}
// 移除购物车商品
export function shoppingCarRemove(data) {
data.method = `${path}purchaseShoppingCar.remove`
return request(data)
}
// 修改购物车商品数量
export function shoppingCarUpdateNumber(data) {
data.method = `${path}purchaseShoppingCar.updateNumber`
return request(data)
}
// 更新购物车商品选中标识
export function updateSelectedFlag(data) {
data.method = `${path}purchaseShoppingCar.updateSelectedFlag`
return request(data)
}
// 获取当前登录园区店商户收货地址
export function addressGet(data = {}) {
// console.log(data)
data.method = `${path}yqMerchantDeliveryAddress.get`
return request(data)
}
// 保存园区店商户收货地址
export function addressSave(data) {
data.method = `${path}yqMerchantDeliveryAddress.save`
return request(data)
}
// 分页查询采购商城素材信息
export function listWithPagePurchaseInfo(data) {
data.method = `${path2}listWithPage.purchaseInfo`
return request(data)
}
// 添加采购订单
export function purchaseOrderAdd(data) {
data.method = `${path}purchaseOrder.add`
return request(data, "post")
}
// 分页查询采购订单
export function getPurchaseOrderList(data) {
data.method = `${path}purchaseOrder.page`
return request(data)
}
// 查看采购订单
export function purchaseOrderDetail(data) {
data.method = `${path}purchaseOrder.view`
return request(data)
}
// 采购订单入库
export function purchaseOrderPutIn(data) {
data.method = `${path}purchaseOrder.putIn`
return request(data)
}
// 获取下单/入库门店
export function getMerchantList(data) {
data.method = `${path3}permission.yqMerchant.list`
return request(data, "post")
}
// 采购订单取消/审核
export function purchaseOrderCancelOrCheck(data) {
data.method = `${path}purchaseOrder.cancelOrCheck`
return request(data)
}
// 确认发货
export function purchaseOrderConfirmDelivery(data) {
data.method = `${path}purchaseOrder.confirmDelivery`
return request(data)
}
import request from "./request"
const path = "dj.api.smarcarlife."
const path2 = "dj.api.goodsInfo."
const path3 = "dj.api.smartcarlife."
// 按商品类目分组获取购物车列表
export function listGroupByGoodsType(data) {
data.method = `${path}purchaseShoppingCar.listGroupByGoodsType`
return request(data)
}
// 添加到购物车
export function shoppingCarAdd(data) {
data.method = `${path}purchaseShoppingCar.add`
return request(data)
}
// 移除购物车商品
export function shoppingCarRemove(data) {
data.method = `${path}purchaseShoppingCar.remove`
return request(data)
}
// 修改购物车商品数量
export function shoppingCarUpdateNumber(data) {
data.method = `${path}purchaseShoppingCar.updateNumber`
return request(data)
}
// 更新购物车商品选中标识
export function updateSelectedFlag(data) {
data.method = `${path}purchaseShoppingCar.updateSelectedFlag`
return request(data)
}
// 获取当前登录园区店商户收货地址
export function addressGet(data = {}) {
// console.log(data)
data.method = `${path}yqMerchantDeliveryAddress.get`
return request(data)
}
// 保存园区店商户收货地址
export function addressSave(data) {
data.method = `${path}yqMerchantDeliveryAddress.save`
return request(data)
}
// 分页查询采购商城素材信息
export function listWithPagePurchaseInfo(data) {
data.method = `${path2}listWithPage.purchaseInfo`
return request(data)
}
// 添加采购订单
export function purchaseOrderAdd(data) {
data.method = `${path}purchaseOrder.add`
return request(data, "post")
}
// 分页查询采购订单
export function getPurchaseOrderList(data) {
data.method = `${path}purchaseOrder.page`
return request(data)
}
// 查看采购订单
export function purchaseOrderDetail(data) {
data.method = `${path}purchaseOrder.view`
return request(data)
}
// 采购订单入库
export function purchaseOrderPutIn(data) {
data.method = `${path}purchaseOrder.putIn`
return request(data)
}
// 获取下单/入库门店
export function getMerchantList(data) {
data.method = `${path3}permission.yqMerchant.list`
return request(data, "post")
}
// 采购订单取消/审核
export function purchaseOrderCancelOrCheck(data) {
data.method = `${path}purchaseOrder.cancelOrCheck`
return request(data)
}
// 确认发货
// export function purchaseOrderConfirmDelivery(data) {
// data.method = `${path}purchaseOrder.confirmDelivery`
// return request(data)
// }
// 确认发货
export function purchaseOrderDelivery(data) {
data.method = 'dj.api.smarcarlife.purchaseOrder.delivery'
return request(data)
}// 发货单分页查询
export function purchaseOrderDeliveryPage(data) {
data.method = `${path}purchaseOrder.delivery.page`
return request(data)
}
// 发货单撤销
export function purchaseOrderDeliveryWithdraw(data) {
data.method = `${path}purchaseOrder.delivery.withdraw`
return request(data)
}
// 发货单详情查看
export function purchaseOrderDeliveryDetail(data) {
data.method = `${path}purchaseOrder.delivery.detail`
return request(data)
}
// 驳回
export function purchaseOrderReject(data) {
data.method = `${path}purchaseOrder.reject`
return request(data)
}
......@@ -86,3 +86,27 @@ export function settingYqMerchantSceneAPI(data) {
data.method = `dj.api.smartcarlife.update.openScene.info`
return request(data, "post")
}
// 获取服务商数据
export function getServiceListAPI(data) {
data.method = 'dj.api.smarcarlife.yqMerchantConfig.partnerMerchantDetail'
return request(data, "post")
}
// 获取服务商配置
export function getProviderProcurementInfo(data) {
data.method = 'dj.smartcarlife.api.yqPartnerMerchant.selectProviderProcurementInfo'
return request(data, "post")
}
// 配置服务商
export function updateProviderProcurementInfo(data) {
data.method = 'dj.smartcarlife.api.yqPartnerMerchant.updateProviderProcurementInfo'
return request(data, "post")
}
// 获取发货主体
export function getShippingEntityInfoAll(data) {
data.method = 'dj.smartcarlife.api.yqPartnerMerchant.selectShippingEntityInfoAll'
return request(data, "post")
}
......@@ -11,6 +11,12 @@ export function getyqMerchantList(data) {
return request(data)
}
// 根据仓库获取门店列表
export function getServicemerchantrefList(data) {
data.method = `${path2}servicemerchantref.list`
return request(data)
}
// 入库管理列表
export function getGoodsWarehousingList(data) {
data.method = `${path2}life.GoodsWarehousingInfo.list`
......@@ -94,3 +100,9 @@ export function inventoryWarningList(data) {
data.method = `${path2}life.InventoryWarning.list`
return request(data, RequestMethods.POST)
}
// 获取门店库存列表
export function merchantShopGoodsStockPage(data) {
// dj.api.smartcarlife.merchantShopGoodsStock.page
data.method = `${path}merchantShopGoodsStock.page`
return request(data, RequestMethods.POST)
}
......@@ -619,3 +619,14 @@ export const afterSaleStatusList = [
{ confId: "6", confName: "已退款" },
{ confId: "7", confName: "退款失败" }
]
export const invouceType = [
{ confId: 1, confName: "未入库" },
{ confId: 2, confName: "已入库" }
]
// 服务商管理 采购模式
export const procureModeList = [
{ confId: 1, confName: '直营' },
{ confId: 2, confName: '批发' },
{ confId: 3, confName: '代销' }
]
......@@ -51,6 +51,7 @@
<slot v-if="item.addHtml"
:name="item.addHtml"
:scope="scope.row"
:index="scope.$index"
:prop="item.prop"
:width="item.width" />
<template v-else-if="item.type == 'ownSerialNum'">
......
......@@ -195,9 +195,34 @@ export const routerName = {
parentId: "90605",
label: "删除",
handle: "handleDelete"
},
{
authId: "9060503",
parentId: "90605",
label: "编辑",
handle: "handleEdit",
addRoutePath: [
{
authId: "9060504",
name: "编辑页面",
parentId: "90605"
}
]
}
],
component: _import("systemConfig/serviceManage")
component: _import("systemConfig/serviceManage/serviceManage")
},
9060504: {
path: "/editService",
name: "editService",
meta: {
title: "编辑服务商",
authId: "9060504",
parentId: "90605",
cache: false,
activePath: "/serviceManage"
},
component: _import("systemConfig/serviceManage/editService")
},
90608: {
path: "/yqStoreManage",
......
......@@ -50,9 +50,15 @@ export const routerName = {
handle: "handleExport"
},
{
authId: "9080203",
parentId: "90802",
label: "库存明细",
handle: "handleDetail"
},
{
authId: "9080202",
parentId: "90802",
label: "查看",
label: "统计",
handle: "look"
}
],
......
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
909: {
path: "/purchaseManage",
name: "purchaseManage",
meta: {
title: "采购管理",
authId: "909",
parentId: "1",
cache: false
}
},
90901: {
path: "/purchaseOrder",
name: "purchaseOrder",
meta: {
title: "采购订单",
authId: "90901",
parentId: "909",
cache: false
},
auth: [
{
authId: "9090101",
parentId: "90901",
label: "创建采购",
category: "Button",
type: "primary",
handle: "handleCreatePurchase"
// addRoutePath: [
// {
// authId: "90902",
// name: "采购商城",
// parentId: "909"
// }
// ]
},
{
authId: "9090102",
parentId: "90901",
label: "查看",
// category: "Button",
// type: "primary",
handle: "handleDetail"
},
{
authId: "9090103",
parentId: "90901",
label: "取消",
// category: "Button",
// type: "primary",
handle: "handleCancel",
ruleObj: {
attr: "status",
rule: {
1: "取消"
}
},
color: "red"
},
{
authId: "9090104",
parentId: "90901",
label: "入库",
// category: "Button",
// type: "primary",
ruleObj: {
attr: "deliveryStatus",
rule: {
2: "入库"
}
},
handle: "handleWarehousing"
}
],
component: _import("purchase/purchaseOrder")
},
90902: {
path: "/purchasingMall",
name: "purchasingMall",
meta: {
title: "采购商城",
authId: "90902",
parentId: "90901",
sideHidden: true,
cache: false,
activePath: "/purchaseOrder"
},
auth: [
{
authId: "9090201",
parentId: "90902",
label: "关联导流方",
category: "Button",
type: "primary",
handle: "handleRelate"
}
],
component: _import("purchase/purchasingMall")
},
90903: {
path: "/procurementReview",
name: "procurementReview",
role: "admin",
meta: {
title: "采购审核",
authId: "90903",
parentId: "909",
cache: false
},
auth: [
{
authId: "9090302",
parentId: "90903",
label: "查看",
// category: "Button",
// type: "primary",
handle: "handleDetail"
},
{
authId: "9090303",
parentId: "90903",
label: "审核",
// category: "Button",
// type: "primary",
ruleObj: {
attr: "status",
rule: {
1: "审核"
}
},
handle: "handleCheck"
}
],
component: _import("purchase/procurementReview")
},
90904: {
path: "/purchaseAndDelivery",
name: "purchaseAndDelivery",
role: "service",
meta: {
title: "采购发货",
authId: "90904",
parentId: "909",
cache: false
},
auth: [
{
authId: "9090401",
parentId: "90904",
label: "查看",
handle: "handleDetail"
},
{
authId: "9090402",
parentId: "90904",
label: "确认发货",
ruleObj: {
attr: "deliveryStatus",
rule: {
1: "确认发货"
}
},
handle: "handleDelivery"
}
],
component: _import("purchase/purchaseAndDelivery")
}
}
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
909: {
path: "/purchaseManage",
name: "purchaseManage",
meta: {
title: "采购管理",
authId: "909",
parentId: "1",
cache: false
}
},
90901: {
path: "/purchaseOrder",
name: "purchaseOrder",
meta: {
title: "采购订单",
authId: "90901",
parentId: "909",
cache: false
},
auth: [
{
authId: "9090101",
parentId: "90901",
label: "创建采购",
category: "Button",
type: "primary",
handle: "handleCreatePurchase"
// addRoutePath: [
// {
// authId: "90902",
// name: "采购商城",
// parentId: "909"
// }
// ]
},
{
authId: "9090102",
parentId: "90901",
label: "查看",
// category: "Button",
// type: "primary",
handle: "handleDetail"
},
{
authId: "9090103",
parentId: "90901",
label: "取消",
// category: "Button",
// type: "primary",
handle: "handleCancel",
ruleObj: {
attr: "status",
rule: {
1: "取消"
}
},
color: "red"
},
{
authId: "9090104",
parentId: "90901",
label: "入库",
// category: "Button",
// type: "primary",
ruleObj: {
attr: "deliveryStatus",
rule: {
2: "入库"
}
},
handle: "handleWarehousing"
}
],
component: _import("purchase/purchaseOrder")
},
90902: {
path: "/purchasingMall",
name: "purchasingMall",
meta: {
title: "采购商城",
authId: "90902",
parentId: "90901",
sideHidden: true,
cache: false,
activePath: "/purchaseOrder"
},
auth: [
{
authId: "9090201",
parentId: "90902",
label: "关联导流方",
category: "Button",
type: "primary",
handle: "handleRelate"
}
],
component: _import("purchase/purchasingMall")
},
90903: {
path: "/procurementReview",
name: "procurementReview",
role: "admin",
meta: {
title: "采购审核",
authId: "90903",
parentId: "909",
cache: false
},
auth: [
{
authId: "9090302",
parentId: "90903",
label: "查看",
// category: "Button",
// type: "primary",
handle: "handleDetail"
},
{
authId: "9090303",
parentId: "90903",
label: "审核",
// category: "Button",
// type: "primary",
ruleObj: {
attr: "status",
rule: {
1: "审核"
}
},
handle: "handleCheck"
},
{
authId: "9090304",
parentId: "90903",
label: "驳回",
ruleObj: {
attr: "status",
rule: {
1: "驳回"
}
},
handle: "handleReject"
}
],
component: _import("purchase/procurementReview")
},
90904: {
path: "/purchaseAndDelivery",
name: "purchaseAndDelivery",
role: "service",
meta: {
title: "采购发货",
authId: "90904",
parentId: "909",
cache: false
},
auth: [
{
authId: "9090401",
parentId: "90904",
label: "查看",
handle: "handleDetail"
},
{
authId: "9090402",
parentId: "90904",
label: "发货",
ruleObj: {
attr: "deliveryStatus",
rule: {
1: "发货",
3: "发货"
}
},
handle: "handleDelivery"
},
{
authId: "9090403",
parentId: "90904",
label: "驳回",
handle: "handleReject"
}
],
component: _import("purchase/purchaseAndDelivery")
},
90905: {
path: "/invoiceRecord",
name: "invoiceRecord",
meta: {
title: "发货单",
authId: "90905",
parentId: "909",
cache: false,
activePath: "/invoiceRecord"
},
auth: [
{
authId: "9090501",
parentId: "90905",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9090502",
parentId: "90905",
label: "查看",
handle: "handleLook"
},
{
authId: "9090503",
parentId: "90905",
label: "撤销",
ruleObj: {
attr: "putStatus",
rule: {
1: "撤销"
}
},
handle: "handleRevoke"
}
],
component: _import("purchase/invoiceRecord")
}
}
......@@ -24,7 +24,15 @@ export const routerName = {
authId: "9100101",
parentId: "91001",
label: "查看",
handle: "handleDetail"
handle: "handleDetail",
ruleObj: {
attr: "status",
rule: {
0: "查看",
1: "查看"
},
disabledStatusList: [0]
}
},
{
authId: "9100102",
......
......@@ -110,7 +110,7 @@ export default {
: res.map((i) => i.authId)
// console.log(res, "res")
// console.log(userInfo.beSuper, "userInfo.beSuper")
console.log(targetRoutes, "targetRoutes")
// console.log(targetRoutes, "targetRoutes")
// 先处理园区店角色是不能拿到 订单审批和发货的页面
// console.log("userInfo.beYQMerchant", userInfo.beYQMerchant)
......@@ -123,7 +123,7 @@ export default {
if (userInfo.beServerMerchant) {
targetRoutes.push("90904")
}
console.log("targetRoutes", targetRoutes)
// console.log("targetRoutes", targetRoutes)
routeAll
.map((i) => i.authId)
......@@ -142,7 +142,7 @@ export default {
// .map(obj => ({ authId: obj.authId, parentId: obj.parentId })) :
// tempAuths
// console.log(tempAuths)
console.log("tempAuths", tempAuths)
// console.log("tempAuths", tempAuths)
// debugger
const authes = tempAuths
await dispatch("d2admin/auth/set", authes, { root: true })
......
......@@ -143,12 +143,19 @@ export default {
_initRoutes({ state }, source) {
return new Promise(async (resolve) => {
try {
const { route, btn } = util.permision.packRoutesBtns(
let { route, btn } = util.permision.packRoutesBtns(
localRoutes,
source
)
// 过滤掉重复的路由
const obj = {}
route = route.reduce(function (item, next) {
obj[next.name] ? "" : (obj[next.name] = true && item.push(next))
return item
}, [])
router.matcher = ResetRouter().matcher // 重置基础路由 解决切换用户 保留上一个用户路由问题
frameInRoutes[0].children = [...route, ...sys]
// console.log("frameInRoutes", frameInRoutes)
router.addRoutes(frameInRoutes)
state.btns = btn
} catch (error) {
......
<!-- 客户列表 -->
<template>
<d2-container class="customer-list">
<div class="header"
slot="header">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData" />
<div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :form-data="showFormData" />
<div class="up-btns">
<el-button size="small"
type="primary"
@click="handleSearch">
<el-button size="small" type="primary" @click="handleSearch">
查询
</el-button>
<el-button size="small"
@click="handleReset">
<el-button size="small" @click="handleReset">
重置
</el-button>
</div>
......@@ -25,99 +18,73 @@
<auth-button category="Button" />
</d2-table-header>
<el-table :data="tableData">
<el-table-column label="序号"
width="60px"
type="index"
align="center" />
<el-table-column label="序号" width="60px" type="index" align="center" />
<el-table-column label="客户信息">
<el-table-column label="客户姓名"
prop="customerName"
align="center" />
<el-table-column label="性别"
align="center">
<el-table-column label="客户姓名" prop="customerName" align="center" />
<el-table-column label="性别" align="center">
<template slot-scope="scope">
<span>{{ scope.row.customerSex === 1 ? '男' : '女' }}</span>
</template>
</el-table-column>
<el-table-column label="品牌车型"
align="center"
width="150px">
<el-table-column label="品牌车型" align="center" width="150px">
<template slot-scope="scope">
<span>{{ scope.row.carBrand || '' }}{{ scope.row.carSeriesName ? ('-' + scope.row.carSeriesName) : '' }}{{ scope.row.carTypeName ? ( '-' + scope.row.carTypeName) : '' }}</span>
<span>{{ scope.row.carBrand || '' }}{{ scope.row.carSeriesName ? ('-' + scope.row.carSeriesName) : '' }}{{
scope.row.carTypeName ? ('-' + scope.row.carTypeName) : '' }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="车架号"
align="center"
prop="standNo" /> -->
<el-table-column label="客户状态"
align="center">
<el-table-column label="客户状态" align="center">
<template slot-scope="scope">
<!-- <span
class="red"
v-if="customerStatusObj[1].includes(scope.row.status)"
>未完成</span>
<span v-else>已完成</span> -->
<span
:class="{ 'red': scope.row.status === 1 }">{{ baseData.customerStatusList.find(item => item.confId == scope.row.status).confLabel }}</span>
<span :class="{ 'red': scope.row.status === 1 }">{{ baseData.customerStatusList.find(item => item.confId ==
scope.row.status).confLabel }}</span>
<!-- <span>{{scope.row.status}}</span> -->
</template>
</el-table-column>
<el-table-column label="服务时间"
align="center">
<el-table-column label="服务时间" align="center">
<template slot-scope="scope">
<span>{{ scope.row.order ? (!scope.row.order.installUpgradeTime ? '' : new Date(scope.row.order.installUpgradeTime).toLocaleDateString()) : '' }}</span>
<span>{{ scope.row.order ? (!scope.row.order.installUpgradeTime ? '' : new
Date(scope.row.order.installUpgradeTime).toLocaleDateString()) : '' }}</span>
</template>
</el-table-column>
<el-table-column label="备注信息"
align="center"
prop="order.remark">
<el-table-column label="备注信息" align="center" prop="order.remark">
<template slot-scope="scope">
<span>{{ scope.row.order ? (scope.row.order.upgradeFlag === 'N' ? (scope.row.order.customer ? (scope.row.order.customer.refusalReason || '无') : '无') : (scope.row.order.remark || '无')) : '无' }}</span>
<span>{{ scope.row.order ? (scope.row.order.upgradeFlag === 'N' ? (scope.row.order.customer ?
(scope.row.order.customer.refusalReason || '无') : '无') : (scope.row.order.remark || '无')) : '无' }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="关联信息">
<el-table-column label="流量来源"
align="center"
prop="merchantName"
width="170" />
<el-table-column label="推荐人"
align="center"
prop="employeeName">
<el-table-column label="流量来源" align="center" prop="merchantName" width="170" />
<el-table-column label="推荐人" align="center" prop="employeeName">
<template slot-scope="scope">
<span>{{ scope.row.order ? scope.row.order.employeeName : '' }}</span>
</template>
</el-table-column>
<el-table-column label="园区店"
align="center"
prop="yqMerchantName"
width="170px" />
<el-table-column label="转化专员"
align="center"
prop="order.sellerName" />
<el-table-column label="园区店" align="center" prop="yqMerchantName" width="170px" />
<el-table-column label="转化专员" align="center" prop="order.sellerName" />
</el-table-column>
<el-table-column label="创建时间"
align="center">
<el-table-column label="创建时间" align="center">
<template slot-scope="scope">
<span>{{ new Date(scope.row.createdDate).toLocaleDateString() }}</span>
</template>
</el-table-column>
<el-table-column label="创建方式"
align="center"
prop="source">
<el-table-column label="创建方式" align="center" prop="source">
<template slot-scope="scope">
<span>{{ scope.row.order ? (scope.row.order.source === 3 ? '现场升级' : (scope.row.order.source === 5 ? '核销抵扣' : '系统录入')): (scope.row.source === 3 ? '现场升级' : (scope.row.source === 5 ? '核销抵扣' : '系统录入')) }}</span>
<span>{{ scope.row.order ? (scope.row.order.source === 3 ? '现场升级' : (scope.row.order.source === 5 ? '核销抵扣' :
'系统录入')) : (scope.row.source === 3 ? '现场升级' : (scope.row.source === 5 ? '核销抵扣' : '系统录入')) }}</span>
</template>
</el-table-column>
</el-table>
<el-pagination background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page.pageNum"
:page-sizes="[10,20,30,40]"
:page-size="page.pageSize"
:total="total"
layout="sizes,total,->,prev,pager,next,jumper" />
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page="page.pageNum" :page-sizes="[10, 20, 30, 40]" :page-size="page.pageSize" :total="total"
layout="sizes,total,->,prev,pager,next,jumper" />
</div>
</d2-container>
</template>
......@@ -270,7 +237,7 @@ export default {
},
mounted() {
console.log(this.$router)
// console.log(this.$router)
if (this.userInfo.beSuper) {
getParkStore({}).then(res => {
res.forEach(item => {
......@@ -414,6 +381,7 @@ export default {
.customer-list {
position: relative;
}
.search-icon {
display: inline-block;
width: 100%;
......@@ -421,16 +389,20 @@ export default {
text-align: center;
cursor: pointer;
}
.customer-list .custom-input {
display: inline-block;
width: 220px;
}
.customer-list .custom-input:first-child {
margin-right: 20px;
}
.customer-list .red {
color: red;
}
.customer-list p {
margin: 0 0;
}
......
<template>
<baseDialog :is-show.sync="dialogShow" :config="dialogConfig.setting" :dialog-config="dialogConfig.config" @closeDialog="handleDetailClose(false)">
<div class="edit-order-dialog" v-if="dialogShow">
<div class="addressTitle">
<img src="../images/addressIcon.webp" alt="" class="icon">
<span class="title">{{ paramsObj.merchantName }}</span>
</div>
<div class="address-info">
<span class="name">收货人:<span class="label">{{ detailInfo.contactName }}</span></span>
<span class="phone">电话:<span class="label">{{ detailInfo.contactPhone }}</span></span>
<span class="address">收货地址:<span class="label">{{ detailInfo.contactAddress }}</span></span>
</div>
<div class="table-class">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" :has-page="hasPage" @refreshTable="refreshTable" :table-data="detailInfo.tableData" :table-total="detailInfo.tableTotal">
<div slot="nowPurNum" slot-scope="scope">
<el-input :class="{ 'border-red': !nowPurNumList[scope.index] && isSubmit }" placeholder="请输入" v-model="nowPurNumList[scope.index]" @input="e => handleInput(e, scope)"></el-input>
</div>
</d2-table>
</div>
<div class="form-content">
<el-form label-width="100px" :rules="dialogRules" :model="dialogData" ref="delivery-dialog-form">
<el-form-item label="承运公司:" prop="deliveryCompany">
<el-input placeholder="请输入承运物流公司" maxlength="20" v-model.trim="dialogData.deliveryCompany" class="dis-in-block" />
</el-form-item>
<el-form-item label="承运单号:" prop="deliveryNumber">
<el-input maxlength="50" placeholder="请输入承运物流单号" v-model.trim="dialogData.deliveryNumber" class="dis-in-block" @input="deliveryNumberInput" />
</el-form-item>
<el-form-item label="发货时间:" prop="deliveryDate">
<el-date-picker class="dis-in-block" v-model="dialogData.deliveryDate" type="datetime" placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
</el-form>
</div>
<div class="footer">
<el-button @click="handleDetailClose(false)">取消</el-button>
<el-button @click="submit" type="primary" v-preventReClick :loading="$store.state.d2admin.loading.value">确认</el-button>
</div>
</div>
</baseDialog>
</template>
<script>
import { purchaseOrderDetail, purchaseOrderDelivery } from '@/api/purchaseShopping.js'
import { membraneTypeList } from '@/common/constants.js'
import { limitPrice } from '@/common/format'
import { Util } from '@/common/util'
import _ from 'lodash'
export default {
name: 'EditOrderDialog',
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: () => { }
}
},
computed: {
dialogShow: {
get() {
if (this.visible) {
this.getDetail({ currentPage: 1, pageSize: 999 })
}
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: true,
btnList: [
]
},
config: {
title: '采购发货',
width: '1010px'
}
},
isSubmit: false,
dialogData: {},
oldPurNumList: [],
nowPurNumList: [],
hasPage: false,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableColumns: [
{
label: '商品名称',
prop: 'upgradeGoodsName'
},
{
label: '商品编码',
prop: 'type'
},
{
label: '系列',
prop: 'goodsName'
},
{
label: '所属分类',
prop: 'goodsTypeName'
},
{
label: '采购数量',
prop: 'goodsNumber',
formatter: (cellValue) => {
return membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.goodsNumber}卷` : `${cellValue.goodsNumber}件`
}
},
{
label: '库存总量',
prop: '',
formatter: (cellValue) => {
return membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.conversionValue ? cellValue.goodsNumber * cellValue.conversionValue : '-'}米` : `${cellValue.goodsNumber}件`
}
},
{
label: '采购总价/元',
prop: 'goodsTotalPrice',
formatter: (cellValue) => {
return "¥" + cellValue.goodsTotalPrice
}
},
{
label: '已发货数量',
prop: 'purchaseNumber',
formatter: (cellValue) => {
return membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber || 0}卷` : `${cellValue.purchaseNumber || 0}件`
}
},
{
label: '本次发货数量',
prop: '',
addHtml: 'nowPurNum'
}
]
},
dialogRules: {
deliveryCompany: [{ required: true, message: '请输入承运物流公司', trigger: 'blur' }],
deliveryNumber: [{ required: true, message: '请输入承运物流单号', trigger: 'blur' }],
deliveryDate: [{ required: true, message: '请选择发货时间', trigger: 'blur' }]
},
detailInfo: {}
}
},
methods: {
handleDetailClose(isRefresh = false) {
this.$emit('editClose', isRefresh)
},
refreshTable(pageObj) {
this.getDetail(pageObj)
},
getDetail(pageObj) {
if (!this.paramsObj?.orderCode) {
return true
}
purchaseOrderDetail({ orderCode: this.paramsObj.orderCode, pageSize: pageObj.pageSize, currentPage: pageObj.currentPage }).then(res => {
this.detailInfo = res
this.detailInfo.tableData = res.pagination.list
this.detailInfo.tableTotal = res.pagination.total
})
},
deliveryNumberInput(event, index) {
// if (!this.reg.priceReg.test(event)) {
// event = ''
// }
// var oldValue = event
// this.$set(this.dialogData, 'deliveryNumber', limitPrice(event, oldValue, 50, 0, 0))
// 数字和字母输入
this.$set(this.dialogData, 'deliveryNumber', event.replace(/[^a-zA-Z0-9]/g, ''))
},
handleInput(val, scope) {
const _row = scope.scope
const _index = scope.index
const _oldVal = this.oldPurNumList[_index] || 0
const _maxVal = _row.goodsNumber - _row.purchaseNumber
this.nowPurNumList[_index] = limitPrice(val, _oldVal, 2, 0, 0, _maxVal)
this.oldPurNumList = JSON.parse(JSON.stringify(this.nowPurNumList))
},
submit() {
this.isSubmit = true
this.$refs['delivery-dialog-form'].validate(valid => {
if (valid) {
// 验证本次发货数量
if (this.nowPurNumList.every(item => item == 0 || !item)) {
this.notice.errorTips('发货数量不能全为0')
return true
}
var params = {
...this.dialogData,
deliveryDate: Util.dateFormate(this.dialogData.deliveryDate, 'YYYY-MM-DD HH:mm:ss'),
orderCode: this.paramsObj.orderCode,
deliveryDetailList: []
}
const attrNameList = ['upgradeGoodsId', 'type', 'upgradeGoodsName', 'conversionValue', 'goodsName', 'goodsCode', 'goodsType', 'goodsTypeName']
this.detailInfo.tableData.forEach((item, idx) => {
console.log(this.nowPurNumList[idx])
if (this.nowPurNumList[idx] != 0) {
params.deliveryDetailList.push({
..._.pick(item, attrNameList),
purchaseNumber: this.nowPurNumList[idx]
})
}
})
purchaseOrderDelivery(params).then(res => {
this.handleDetailClose(true)
this.notice.okTips()
}).catch(() => {
this.handleDetailClose(false)
})
}
})
}
}
}
</script>
<style lang="scss">
.addressTitle {
display: flex;
align-items: center;
.title {
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 16px;
color: #333333;
}
.icon {
width: 28px;
height: 28px;
margin-right: 8px;
}
}
.address-info {
display: flex;
box-sizing: border-box;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
width: 100%;
// height: 36px;
// padding: 0 20px;
margin-top: 10px;
font-size: 14px;
color: #666666;
> span {
margin-right: 20px;
margin-bottom: 10px;
}
.label {
color: #333333;
}
.address {
min-width: 500px;
}
}
.form-content {
margin-top: 16px;
.dis-in-block {
width: 432px;
}
}
.footer {
display: flex;
justify-content: end;
}
.edit-order-dialog .el-input--medium.border-red .el-input__inner {
border: 1px solid #eb4e4e;
}
</style>
<!-- 发货单详情弹窗 -->
<template>
<d2-dialog title="详细信息"
:is-visible="detailVisible"
class="stockMonthDailog"
width="70%"
:no-cancel="true"
btn-ok-label="关闭"
@closeDialog="handleClose"
@confirmDialog="handleClose">
<div class="detail-info">
<div>
发货单号:
<span>{{ detailInfo.deliveryNumber }}</span>
</div>
<div>
承运公司:
<span>{{ detailInfo.deliveryCompany }}</span>
</div>
<div>
发货时间:
<span>{{ detailInfo.deliveryDate }}</span>
</div>
</div>
<template v-for="(item, index) in detailInfo.deliveryDetailList">
<div class="table-wrap"
:key="index">
<div class="detail-info">
<div>
商品名称:
<span>{{ item.goodsName }}</span>
</div>
<div>
发货数量:
<span>{{ item.purchaseNumber + (membraneTypeList.includes(item.goodsType) ? '卷' : '件')}}</span>
</div>
<div>
可用库存数量:
<span>{{ item.stockNum + (membraneTypeList.includes(item.goodsType) ? '米' : '件')}}</span>
</div>
</div>
<d2-table ref="recordTable"
:tableData="item.goodsWarehousingList"
:table-params="tableParams"
:hasPage="false">
</d2-table>
</div>
</template>
</d2-dialog>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { purchaseOrderDeliveryDetail } from '@/api/purchaseShopping.js'
import { membraneTypeList } from '@/common/constants.js'
export default {
name: 'DeliveryDetailDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: membraneTypeList,
detailInfo: {},
searchFormSearch: {},
tableData: [],
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
// singleSelectUniqueKey: 'id',
tableOption: false,
tableColumns: [{
label: '入库数量',
prop: 'increaseStockNum',
// width: '200px'
formatter: (cellValue) => {
return (cellValue.increaseStockNum || cellValue.increaseStockNum == 0) ? parseFloat(cellValue.increaseStockNum).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
}
}, {
label: '入库仓库',
prop: 'yqMerchantName',
// width: '150px'
}, {
label: '入库门店',
prop: 'merchantName',
// width: '200px'
}
]
},
baseData: {
},
merchantDialogVisible: false,
}
},
props: {
detailVisible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => { }
},
},
computed: {
},
mounted() {
this.getDetail()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
getDetail() {
var params = { id: deepClone(this.recordInfo.id) }
purchaseOrderDeliveryDetail(params).then(res => {
this.detailInfo = res
if (this.detailInfo.deliveryDate) {
this.detailInfo.deliveryDate = Util.dateFormate(this.detailInfo.deliveryDate, 'YYYY-MM-DD HH:mm')
}
let _deliveryDetailList = this.detailInfo.deliveryDetailList
if (_deliveryDetailList && _deliveryDetailList.length > 0) {
_deliveryDetailList.forEach(info => {
let _goodsWarehousingList = info.goodsWarehousingList
if (_goodsWarehousingList && _goodsWarehousingList.length > 0) {
_goodsWarehousingList.forEach(item => {
item.goodsType = info.goodsType
})
}
})
}
})
},
handleClose() {
this.$emit('dialogClose')
}
}
}
</script>
<style lang="scss" scoped>
.detail-info {
display: flex;
align-items: center;
justify-content: space-between;
color: #666666ff;
font-size: 14px;
margin-bottom: 16px;
span {
color: #333333ff;
}
.add-btn {
font-size: 14px;
color: #5850ff;
cursor: pointer;
}
}
.table-wrap {
border: 1px solid #e5e5e5;
padding: 16px;
box-sizing: border-box;
margin-top: 16px;
// /deep/ .el-form-item__error {
// padding-top: 2px;
// z-index: 9999999;
// position: static;
// }
}
</style>
<template>
<baseDialog :is-show.sync="dialogShow" :config="dialogConfig.setting" :dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose">
<div class="detail-content" v-if="dialogShow">
<baseDialog :is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose">
<div class="detail-content"
v-if="dialogShow">
<div class="addressTitle">
<img src="../images/addressIcon.webp" alt="" class="icon">
<img src="../images/addressIcon.webp"
alt=""
class="icon">
<span class="title">{{ paramsObj.merchantName }}</span>
</div>
<div class="address-info">
......@@ -11,9 +16,16 @@
<span class="phone">电话:<span class="label">{{ detailInfo.contactPhone }}</span></span>
<span class="address">收货地址:<span class="label">{{ detailInfo.contactAddress }}</span></span>
</div>
<div class="address-info"
v-if="detailInfo.rejectCause">
<span class="address">驳回原因:<span class="label">{{ detailInfo.rejectCause }}</span></span>
</div>
<div class="table-class">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" @refreshTable="refreshTable"
:table-data="detailInfo.tableData" :table-total="detailInfo.tableTotal">
<d2-table ref="purchaseOrderDetailTable"
:table-params="tableParams"
@refreshTable="refreshTable"
:table-data="detailInfo.tableData"
:table-total="detailInfo.tableTotal">
</d2-table>
</div>
</div>
......@@ -153,7 +165,7 @@ export default {
font-size: 14px;
color: #666666;
>span {
> span {
margin-right: 20px;
margin-bottom: 10px;
}
......
<!-- 驳回 -->
<template>
<d2-dialog title="驳回提示"
:is-visible="rejectVisible"
class="accountDailog"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm">
<div class="reject-dialog">
<el-form ref="refundForm"
label-width="150px"
:model="infoForm"
:rules="formRules">
<el-form-item label="驳回原因:"
prop="rejectCause">
<el-input type="textarea"
placeholder="请输入驳回原因"
maxlength="50"
show-word-limit
v-model="infoForm.rejectCause"
class="dis-in-block reject-input" />
</el-form-item>
</el-form>
</div>
</d2-dialog>
</template>
<script>
import { purchaseOrderReject } from '@/api/purchaseShopping.js'
import { deepClone } from '@/common/util'
export default {
name: 'RejectDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
infoForm: {
rejectCause: ''
},
formRules: {
rejectCause: [{ required: true, message: '请输入驳回原因', trigger: 'change' }]
}
}
},
props: {
rejectVisible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
watch: {
},
created() {
},
components: {},
mounted() {
},
methods: {
handleAddConfirm() {
this.$refs.refundForm.validate(valid => {
if (valid) {
var infoForm = deepClone(this.infoForm)
var params = {}
params.rejectCause = infoForm.rejectCause
params.orderCode = this.paramsObj.orderCode
purchaseOrderReject(params).then(res => {
this.notice.okTips('操作成功')
this.handleClose(true)
})
}
})
},
handleClose(flag) {
this.$emit('dialogClose', flag)
}
}
}
</script>
<style lang="scss" scoped>
.reject-dialog {
margin: 65px 0;
.reject-input .el-textarea__inner {
height: 79px;
width: 432px;
}
.el-textarea .el-input__count {
right: 90px;
bottom: -10px;
font-size: 12px;
color: #999999;
}
.tips {
color: #999999;
}
}
</style>
// 订单状态
export const defaultStatusOptions = [
{
id: 1,
label: "待审核"
},
{
id: 2,
label: "已审核"
},
{
id: 3,
label: "已取消"
}
]
// 发货状态
export const defaultDeliveryStatusOptions = [
{
id: 1,
label: "未发货"
},
{
id: 2,
label: "已发货"
}
]
// 入库状态
export const defaultPutStatusOptions = [
{
id: 1,
label: "未入库"
},
{
id: 2,
label: "已入库"
}
]
// export const severSelectOptionsLabel = {
// 1: "下单时间倒序排序",
// 2: "按收入比例",
// 3: "按固定金额",
// 4: "按(产值-流量成本)比例",
// 5: "按(产值-流量成本-其他费用不包含产品成本))比例",
// 6: "按(产值-流量成本-其他费用包含产品成本)比例"
// }
// 订单状态
export const defaultStatusOptions = [
{
id: 1,
label: "待审核"
},
{
id: 2,
label: "已审核"
},
{
id: 3,
label: "已取消"
},
{
id: 4,
label: "已驳回"
}
]
// 发货状态
export const defaultDeliveryStatusOptions = [
{
id: 1,
label: "未发货"
},
{
id: 2,
label: "已发货"
},
{
id: 3,
label: "部分发货"
}
]
// 入库状态
export const defaultPutStatusOptions = [
{
id: 1,
label: "未入库"
},
{
id: 2,
label: "已入库"
}
]
// 发货模式
export const purchasingPatternOptions = [
{
id: 1,
label: "直营"
},
{
id: 2,
label: "批发"
},
{
id: 3,
label: "代销"
}
]
// export const severSelectOptionsLabel = {
// 1: "下单时间倒序排序",
// 2: "按收入比例",
// 3: "按固定金额",
// 4: "按(产值-流量成本)比例",
// 5: "按(产值-流量成本-其他费用不包含产品成本))比例",
// 6: "按(产值-流量成本-其他费用包含产品成本)比例"
// }
<!-- 发货单 -->
<template>
<div>
<d2-container>
<div class="header"
slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData" />
<div class="up-btns">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope" />
</d2-table>
</div>
</d2-container>
<!-- 查看 -->
<delivery-detail-dialog :detail-visible="detailVisible"
:record-info="recordInfo"
v-if="detailVisible"
@dialogClose="dialogClose" />
</div>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { purchaseOrderDeliveryPage, purchaseOrderDeliveryWithdraw } from '@/api/purchaseShopping.js'
import deliveryDetailDialog from './components/deliveryDetailDialog'
import { invouceType } from '@/common/constants.js'
export default {
name: 'InvoiceRecord',
components: {
deliveryDetailDialog
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
searchForm: {
deliveryNumber: '',
deliveryCompany: '',
deliveryDate: '',
orderCode: '',
merchantName: '',
putStatus: ''
},
searchFormSearch: {},
showFormData: [{
label: '承运单号',
name: 'deliveryNumber',
type: 'input',
maxlength: '50',
isClear: true
},
{
label: '承运公司',
name: 'deliveryCompany',
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '发货时间',
name: 'deliveryDate',
type: 'datePicker',
isClear: true,
pickerOptions: 'rangePickerOptions'
}, {
label: '所属订单',
name: 'orderCode',
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '所属商户',
name: 'merchantName',
type: 'input',
maxlength: '50',
isClear: true
}, {
label: '状态',
name: 'putStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'invouceType'
}],
getListApi: purchaseOrderDeliveryPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: true,
tableColumns: [{
label: '承运单号',
prop: 'deliveryNumber',
width: '200px'
}, {
label: '承运公司',
prop: 'deliveryCompany',
width: '150px'
}, {
label: '发货时间',
prop: 'deliveryDate',
width: '150px',
formatter: (cellValue) => {
return cellValue.deliveryDate ? Util.dateFormate(cellValue.deliveryDate, 'YYYY-MM-DD HH:mm:ss') : ''
}
}, {
label: '所属订单',
prop: 'orderCode',
width: '200px'
}, {
label: '所属商户',
prop: 'merchantName',
width: '150px'
}, {
label: '状态',
prop: 'putStatus',
formatter: (cellValue) => {
return this.baseData.invouceType.find(item => item.confId === cellValue.putStatus)?.confName
}
}
]
},
baseData: {
invouceType: invouceType,
},
detailVisible: false,
recordInfo: null
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
this.getBaseData()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() {
this.getOptionsList()
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.deliveryDate) {
this.searchFormSearch.deliveryDateStart = Util.dateFormate(this.searchFormSearch.deliveryDate[0], 'YYYY-MM-DD 00:00:00')
this.searchFormSearch.deliveryDateEnd = Util.dateFormate(this.searchFormSearch.deliveryDate[1], 'YYYY-MM-DD 23:59:59')
delete this.searchFormSearch.deliveryDate
}
resolve()
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
const temp = {}
temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部'
this.baseData[item.optionsName].unshift(temp)
}
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
handleSearch() {
this.$refs.recordTable.refreshTable()
},
handleReset() {
this.searchForm = {
deliveryNumber: '',
deliveryCompany: '',
deliveryDate: '',
orderCode: '',
merchantName: '',
putStatus: ''
}
this.$refs.recordTable.refreshTable()
},
handleExport() {
var params = this.searchFormSearch
params.method = 'dj.api.smarcarlife.purchaseOrder.delivery.export.async'
const list = [
...this.dowloadList,
{
name: '发货单',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
// 查看
handleLook(row) {
this.recordInfo = row
this.detailVisible = true
},
dialogClose(flag) {
this.detailVisible = !this.detailVisible
// if (flag) {
// this.$refs.recordTable.refreshTable()
// }
},
//撤销
handleRevoke(row) {
this.$confirm("发货单撤销后同步删除该发货记录,且无法撤回;是否确定撤销?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
purchaseOrderDeliveryWithdraw({ id: row.id }).then((res) => {
this.notice.okTips()
this.$refs.recordTable.refreshTable()
})
})
.catch((err) => {
console.log(err)
})
},
}
}
</script>
<style scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
}
</style>
......@@ -49,6 +49,11 @@
</div>
<orderDeatilDialog :visible.sync="detailVisible"
:params-obj="paramsObj"></orderDeatilDialog>
<rejectDialog :reject-visible="rejectVisible"
v-if="rejectVisible"
:params-obj="paramsObj"
@dialogClose="dialogClose">
</rejectDialog>
</d2-container>
</template>
......@@ -58,10 +63,12 @@ import { defaultStatusOptions, defaultDeliveryStatusOptions, defaultPutStatusOpt
import { mapActions, mapState } from 'vuex'
import { getPurchaseOrderList, getMerchantList, purchaseOrderCancelOrCheck, purchaseOrderExport } from '@/api/purchaseShopping.js'
import orderDeatilDialog from './components/orderDetailDialog'
import rejectDialog from './components/rejectDialog'
export default {
name: 'PurchaseOrder',
components: {
orderDeatilDialog
orderDeatilDialog,
rejectDialog
},
data() {
return {
......@@ -69,7 +76,8 @@ export default {
status: '',
deliveryStatus: '',
putStatus: '',
merchantId: '',
// merchantId: '',
merchantName: '',
sortType: 2,
orderTimeStr: []
},
......@@ -89,14 +97,20 @@ export default {
isClear: true,
pickerOptions: 'rangePickerOptions'
},
// {
// label: '下单门店',
// name: 'merchantId',
// type: 'select',
// optionList: [],
// optionId: 'merchantNo',
// optionLabel: 'merchantName',
// optionsName: 'merchantName'
// },
{
label: '下单门店',
name: 'merchantId',
type: 'select',
optionList: [],
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'merchantName'
name: 'merchantName',
type: 'input',
isClear: true
},
{
label: '订单状态',
......@@ -163,7 +177,7 @@ export default {
label: '发货状态',
prop: 'deliveryStatus',
formatter: (cellValue) => {
return defaultDeliveryStatusOptions.find(item => item.id == cellValue.deliveryStatus).label || '-'
return defaultDeliveryStatusOptions.find(item => item.id == cellValue.deliveryStatus)?.label || '-'
},
className: (cellValue) => {
return {
......@@ -182,7 +196,8 @@ export default {
return {
1: 'yellowSpot',
2: 'greenSpot',
3: 'ashSpot'
3: 'ashSpot',
4: 'ashSpot'
}[cellValue.status]
}
}
......@@ -190,6 +205,8 @@ export default {
},
// 查看门店
detailVisible: false,
// 驳回
rejectVisible: false,
// 基本数据
baseData: {
defaultStatusOptions: [],
......@@ -318,7 +335,20 @@ export default {
merchantName: row.merchantName
}
this.detailVisible = true
}
},
//驳回
handleReject(row) {
this.paramsObj = {
orderCode: row.orderCode
}
this.rejectVisible = true
},
dialogClose(flag) {
this.rejectVisible = !this.rejectVisible
if (flag) {
this.$refs.purchasementReviewTable.refreshTable()
}
},
}
}
</script>
......
<!-- 采购订单 -->
<template>
<d2-container class="container">
<div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :form-data="showFormData">
<div class="header"
slot="header">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData">
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary" handle>
<el-button :id="tableParams.btnId"
size="small"
type="primary"
handle>
查询
</el-button>
<el-button size="small" @click="handleReset">
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<span slot="left" v-if="!userInfo.beSuper && userInfo.beYQMerchant">
<span slot="left"
v-if="!userInfo.beSuper && userInfo.beYQMerchant">
<!-- <auth-button category="Button" /> -->
<auth-button category="Button" />
</span>
<span>
<el-button type="primary" size="mini" @click="handleExport">
<el-button type="primary"
size="mini"
@click="handleExport">
导出
</el-button>
</span>
</d2-table-header>
<d2-table ref="purchaseOrderTable" :search-form="tableSearchForm" :table-params="tableParams"
:table-data="tableData" :get-list-api="getListApi" :before-search-fn="beforeSearchFn">
<div slot="auth-button" slot-scope="scope">
<d2-table ref="purchaseOrderTable"
:search-form="tableSearchForm"
:table-params="tableParams"
:table-data="tableData"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<div slot="auth-button"
slot-scope="scope">
<!-- 查看 -->
<span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9090102']" />
<auth-button :data="scope.scope"
:show-btn-ids="['9090102']" />
</span>
<!-- 取消 -->
<span style="margin-right: 10px;"
v-show="scope.scope.status == 1 && !userInfo.beSuper && userInfo.beYQMerchant">
<auth-button :data="scope.scope" :show-btn-ids="['9090103']" />
v-show="scope.scope.status == 1 && !userInfo.beSuper && userInfo.beYQMerchant">
<auth-button :data="scope.scope"
:show-btn-ids="['9090103']" />
</span>
<!-- 入库 -->
<span v-show="scope.scope.putStatus == 1 && !userInfo.beSuper && userInfo.beYQMerchant">
<auth-button :data="scope.scope" :show-btn-ids="['9090104']" />
<auth-button :data="scope.scope"
:show-btn-ids="['9090104']" />
</span>
</div>
</d2-table>
</div>
<orderDeatilDialog :visible.sync="detailVisible" :params-obj="paramsObj"></orderDeatilDialog>
<orderDeatilDialog :visible.sync="detailVisible"
:params-obj="paramsObj"></orderDeatilDialog>
</d2-container>
</template>
......@@ -66,8 +86,10 @@ export default {
status: '',
deliveryStatus: '',
putStatus: '',
merchantId: '',
putMerchantId: '',
// merchantId: '',
// putMerchantId: '',
merchantName: '',
putMerchantName: '',
sortType: 1,
orderTimeStr: [],
putTimeStr: []
......@@ -122,24 +144,36 @@ export default {
isClear: true,
pickerOptions: 'rangePickerOptions'
},
// {
// label: '下单门店',
// name: 'merchantId',
// type: 'select',
// optionList: [],
// optionId: 'merchantNo',
// optionLabel: 'merchantName',
// optionsName: 'merchantName'
// },
{
label: '下单门店',
name: 'merchantId',
type: 'select',
optionList: [],
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'merchantName'
name: 'merchantName',
type: 'input',
isClear: true
},
// {
// label: '入库门店',
// name: 'putMerchantId',
// type: 'select',
// optionList: [],
// optionId: 'merchantNo',
// optionLabel: 'merchantName',
// optionsName: 'merchantName'
// }
{
label: '入库门店',
name: 'putMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'merchantName'
}
name: 'putMerchantName',
type: 'input',
isClear: true
},
],
getListApi: getPurchaseOrderList,
// 表格参数
......
......@@ -23,11 +23,11 @@
</div>
<div class="d2-container-content">
<d2-table-header>
<span slot="left"
<!-- <span slot="left"
v-if="!userInfo.beSuper && userInfo.beYQMerchant">
<auth-button category="Button"
:show-btn-ids="['9080501']" />
</span>
</span> -->
<auth-button category="Button"
:show-btn-ids="['9080502']" />
</d2-table-header>
......@@ -54,7 +54,7 @@
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { getProductTypeBySceneId } from '@api/product'
import { getyqMerchantList, stockAllocatePage, yqRelatedList } from '@api/stockManage'
import { getyqMerchantList, stockAllocatePage, yqRelatedList, getServicemerchantrefList } from '@api/stockManage'
import allocationDetailDialog from './allocationDetailDialog'
export default {
name: 'AllocationList',
......@@ -68,7 +68,9 @@ export default {
allocateTime: '',
allocateCode: '',
callOutYqMerchantId: '',
callInYqMerchantId: ''
callInYqMerchantId: '',
callOutMerchantId: '',
callInMerchantId: ''
},
searchFormSearch: {},
searchSelectObj: {
......@@ -90,24 +92,53 @@ export default {
isClear: true,
pickerOptions: 'rangePickerOptions'
}, {
label: '调出门店',
label: '调出仓库',
name: 'callOutYqMerchantId',
type: 'select',
optionList: [],
// optionId: 'merchantNo',
// optionLabel: 'merchantName',
// optionsName: 'yqMerchantList'
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'yqRelatedMerchantList',
changeAttr: (value, targetItem) => {
value
? this.getServicemerchantrefList(value, 'out')
: (this.baseData.outMerchantList = [])
this.searchForm.callOutMerchantId = ''
this.getOptionsList()
}
}, {
label: '调出门店',
name: 'callOutMerchantId',
type: 'select',
noDataText: '请先选择调出仓库',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'yqRelatedMerchantList'
optionsName: 'outMerchantList'
}, {
label: '调入门店',
label: '调入仓库',
name: 'callInYqMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'yqRelatedMerchantList',
changeAttr: (value, targetItem) => {
value
? this.getServicemerchantrefList(value, 'in')
: (this.baseData.inMerchantList = [])
this.searchForm.callInMerchantId = ''
this.getOptionsList()
}
}, {
label: '调入门店',
name: 'callInMerchantId',
type: 'select',
noDataText: '请先选择调入仓库',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'yqRelatedMerchantList'
optionsName: 'inMerchantList'
}],
getListApi: stockAllocatePage,
tableParams: {
......@@ -130,12 +161,24 @@ export default {
prop: 'operator',
width: '150px'
}, {
label: '调出门店',
label: '调出仓库',
prop: 'callOutYqMerchantName',
}, {
label: '调入门店',
label: '调出门店',
prop: 'callOutMerchantName',
}, {
label: '调入仓库',
prop: 'callInYqMerchantName',
}, {
label: '调入门店',
prop: 'callInMerchantName',
}, {
label: '承运单号',
prop: 'deliveryNumber',
}, {
label: '承运公司',
prop: 'deliveryCompany',
}, {
label: '备注',
prop: 'remark',
}
......@@ -143,8 +186,9 @@ export default {
},
baseData: {
productTypeList: [],
yqMerchantList: [],
yqRelatedMerchantList: []
yqRelatedMerchantList: [],
outMerchantList: [],//调出门店
inMerchantList: [],//调入门店
},
allocationDetailVisible: false,
......@@ -164,17 +208,17 @@ export default {
this.getOptionsList()
})
// 获取当前登录账号可见的园区店列表
// getyqMerchantList({}).then(res => {
// this.baseData.yqMerchantList = res
// this.getOptionsList()
// })
//调入门店
yqRelatedList({}).then(res => {
//获取当前登录账号可见的园区店列表
getyqMerchantList({ mainPartnerMerchant: true }).then(res => {
this.baseData.yqRelatedMerchantList = res
this.getOptionsList()
})
// //调入门店
// yqRelatedList({}).then(res => {
// this.baseData.yqRelatedMerchantList = res
// this.getOptionsList()
// })
},
methods: {
......@@ -214,6 +258,31 @@ export default {
})
},
// 获取仓库门店
getServicemerchantrefList(merchantId, type) {
getServicemerchantrefList({
yqMerchantId: merchantId
}).then(res => {
let _headOffice = {}
if (type == 'out') {//调出门店
this.baseData.outMerchantList = res || []
//总店
_headOffice = this.baseData.yqRelatedMerchantList.find(item => item.merchantNo === merchantId)
_headOffice.merchantId = _headOffice.merchantNo
//门店选项中加入总店
this.baseData.outMerchantList.push(_headOffice)
} else if (type == 'in') {//调入门店
this.baseData.inMerchantList = res || []
//总店
_headOffice = this.baseData.yqRelatedMerchantList.find(item => item.merchantNo === merchantId)
_headOffice.merchantId = _headOffice.merchantNo
//门店选项中加入总店
this.baseData.inMerchantList.push(_headOffice)
}
this.getOptionsList()
})
},
handleSearch() {
this.$refs.recordTable.refreshTable()
},
......@@ -222,8 +291,13 @@ export default {
allocateTime: '',
allocateCode: '',
callOutYqMerchantId: '',
callInYqMerchantId: ''
callInYqMerchantId: '',
callOutMerchantId: '',
callInMerchantId: ''
}
this.baseData.outMerchantList = []//调出门店
this.baseData.inMerchantList = []//调入门店
this.getOptionsList()
this.$refs.recordTable.refreshTable()
},
......
......@@ -2,13 +2,21 @@
<template>
<div>
<d2-container>
<div class="header" slot="header" style="padding: 10px 20px;">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :form-data="showFormData" />
<div class="header"
slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData" />
<div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset">
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
......@@ -17,9 +25,14 @@
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" />
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope" />
</d2-table>
</div>
</d2-container>
......@@ -30,7 +43,7 @@
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { getProductTypeBySceneId } from '@api/product'
import { getyqMerchantList, inventoryWarningList } from '@api/stockManage'
import { getyqMerchantList, inventoryWarningList, getServicemerchantrefList } from '@api/stockManage'
import { membraneTypeList } from '@/common/constants.js'
export default {
name: 'EarlyWarningList',
......@@ -44,6 +57,7 @@ export default {
searchForm: {
upgradeGoodsName: '',
yqMerchantId: '',
merchantId: '',
goodsType: '',
goodsSeries: ''
},
......@@ -81,13 +95,29 @@ export default {
optionLabel: 'categoryName',
optionsName: 'productTypeList'
}, {
label: '所属门店',
label: '所属仓库',
name: 'yqMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'yqMerchantList'
optionsName: 'yqMerchantList',
changeAttr: (value, targetItem) => {
value
? this.getServicemerchantrefList(value)
: (this.baseData.merchantIdList = [])
this.searchForm.merchantId = ''
this.getOptionsList()
}
}, {
label: '所属门店',
name: 'merchantId',
type: 'select',
noDataText: '请先选择仓库',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'merchantIdList'
}],
getListApi: inventoryWarningList,
tableParams: {
......@@ -123,15 +153,20 @@ export default {
return (cellValue.warningValue || cellValue.warningValue == 0) ? parseFloat(cellValue.warningValue).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
}
}, {
label: '所属门店',
label: '所属仓库',
prop: 'yqMerchantName',
width: '200px'
}, {
label: '所属门店',
prop: 'merchantName',
width: '200px'
}
]
},
baseData: {
productTypeList: [],
yqMerchantList: []
yqMerchantList: [],
merchantIdList: []
}
}
},
......@@ -149,7 +184,7 @@ export default {
})
// 获取当前登录账号可见的园区店列表
getyqMerchantList({}).then(res => {
getyqMerchantList({ mainPartnerMerchant: true }).then(res => {
this.baseData.yqMerchantList = res
this.getOptionsList()
})
......@@ -166,6 +201,21 @@ export default {
// this.getOptionsList()
// },
// 获取仓库门店
getServicemerchantrefList(merchantId) {
getServicemerchantrefList({
yqMerchantId: merchantId
}).then(res => {
this.baseData.merchantIdList = res || []
//总店
let _headOffice = this.baseData.yqMerchantList.find(item => item.merchantNo === merchantId)
_headOffice.merchantId = _headOffice.merchantNo
//门店选项中加入总店
this.baseData.merchantIdList.push(_headOffice)
this.getOptionsList()
})
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
......@@ -194,6 +244,7 @@ export default {
this.searchForm = {
upgradeGoodsName: '',
yqMerchantId: '',
merchantId: '',
goodsType: '',
goodsSeries: ''
}
......
......@@ -23,11 +23,11 @@
</div>
<div class="d2-container-content">
<d2-table-header>
<span slot="left"
<!-- <span slot="left"
v-if="!userInfo.beSuper && userInfo.beYQMerchant">
<auth-button category="Button"
:show-btn-ids="['9080401']" />
</span>
</span> -->
<auth-button category="Button"
:show-btn-ids="['9080402']" />
</d2-table-header>
......@@ -68,7 +68,7 @@
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { getProductTypeBySceneId } from '@api/product'
import { getyqMerchantList, stockCheckPage } from '@api/stockManage'
import { getyqMerchantList, stockCheckPage, getServicemerchantrefList } from '@api/stockManage'
import inventoryDetailDialog from './inventoryDetailDialog'
export default {
name: 'InventoryList',
......@@ -81,7 +81,8 @@ export default {
searchForm: {
checkTime: '',
checkCode: '',
yqMerchantId: ''
yqMerchantId: '',
merchantId: ''
},
searchFormSearch: {},
searchSelectObj: {
......@@ -103,13 +104,29 @@ export default {
isClear: true,
pickerOptions: 'rangePickerOptions'
}, {
label: '盘点门店',
label: '盘点仓库',
name: 'yqMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'yqMerchantList'
optionsName: 'yqMerchantList',
changeAttr: (value, targetItem) => {
value
? this.getServicemerchantrefList(value)
: (this.baseData.merchantIdList = [])
this.searchForm.merchantId = ''
this.getOptionsList()
}
}, {
label: '盘点门店',
name: 'merchantId',
type: 'select',
noDataText: '请先选择盘点仓库',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'merchantIdList'
}],
getListApi: stockCheckPage,
tableParams: {
......@@ -132,9 +149,12 @@ export default {
prop: 'operator',
width: '150px'
}, {
label: '盘点门店',
label: '盘点仓库',
prop: 'yqMerchantName',
}, {
label: '盘点门店',
prop: 'merchantName',
}, {
label: '备注',
prop: 'remark',
}, {
......@@ -147,7 +167,8 @@ export default {
},
baseData: {
productTypeList: [],
yqMerchantList: []
yqMerchantList: [],
merchantIdList: []
},
inventoryDetailVisible: false,
......@@ -169,8 +190,8 @@ export default {
this.getOptionsList()
})
// 获取当前登录账号可见的园区店列表
getyqMerchantList({}).then(res => {
// 获取盘点仓库
getyqMerchantList({ mainPartnerMerchant: true }).then(res => {
this.baseData.yqMerchantList = res
this.getOptionsList()
})
......@@ -213,6 +234,21 @@ export default {
})
},
// 获取仓库门店
getServicemerchantrefList(merchantId) {
getServicemerchantrefList({
yqMerchantId: merchantId
}).then(res => {
this.baseData.merchantIdList = res || []
//总店
let _headOffice = this.baseData.yqMerchantList.find(item => item.merchantNo === merchantId)
_headOffice.merchantId = _headOffice.merchantNo
//门店选项中加入总店
this.baseData.merchantIdList.push(_headOffice)
this.getOptionsList()
})
},
handleSearch() {
this.$refs.recordTable.refreshTable()
},
......@@ -220,8 +256,11 @@ export default {
this.searchForm = {
checkTime: '',
checkCode: '',
yqMerchantId: ''
yqMerchantId: '',
merchantId: ''
}
this.baseData.merchantIdList = []
this.getOptionsList()
this.$refs.recordTable.refreshTable()
},
......
......@@ -2,13 +2,21 @@
<template>
<div>
<d2-container>
<div class="header" slot="header" style="padding: 10px 20px;">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :form-data="showFormData" />
<div class="header"
slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData" />
<div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset">
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
......@@ -17,9 +25,14 @@
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" />
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope" />
</d2-table>
</div>
</d2-container>
......@@ -30,7 +43,7 @@
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { getProductTypeBySceneId } from '@api/product'
import { getyqMerchantList, getMerchantGoodsStockReduceRecord } from '@api/stockManage'
import { getyqMerchantList, getMerchantGoodsStockReduceRecord, getServicemerchantrefList } from '@api/stockManage'
import { membraneTypeList } from '@/common/constants.js'
export default {
name: 'OutboundList',
......@@ -46,6 +59,7 @@ export default {
eventType: '',
upgradeGoodsName: '',
yqMerchantId: '',
merchantId: '',
goodsType: '',
businessCode: '',
goodsSeries: ''
......@@ -86,13 +100,29 @@ export default {
isClear: true
},
{
label: '出库门店',
label: '出库仓库',
name: 'yqMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'yqMerchantList'
optionsName: 'yqMerchantList',
changeAttr: (value, targetItem) => {
value
? this.getServicemerchantrefList(value)
: (this.baseData.merchantIdList = [])
this.searchForm.merchantId = ''
this.getOptionsList()
}
}, {
label: '出库门店',
name: 'merchantId',
type: 'select',
noDataText: '请先选择仓库',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'merchantIdList'
},
{
label: '使用门店',
......@@ -101,7 +131,6 @@ export default {
maxlength: '20',
isClear: true
},
{
label: '所属分类',
name: 'goodsType',
......@@ -174,11 +203,10 @@ export default {
label: '关联业务单号',
prop: 'businessCode'
}, {
label: '出库门店',
label: '出库仓库',
prop: 'yqMerchantName',
width: '200px'
}, {
// label: '适用门店',
label: '使用门店',
prop: 'storeUsage',
width: '200px',
......@@ -204,7 +232,8 @@ export default {
}
],
productTypeList: [],
yqMerchantList: []
yqMerchantList: [],
merchantIdList: []
}
}
......@@ -223,7 +252,7 @@ export default {
})
// 获取当前登录账号可见的园区店列表
getyqMerchantList({}).then(res => {
getyqMerchantList({ mainPartnerMerchant: true }).then(res => {
this.baseData.yqMerchantList = res
this.baseData.storeUsageList = res
this.getOptionsList()
......@@ -241,6 +270,21 @@ export default {
// this.getOptionsList()
// },
// 获取仓库门店
getServicemerchantrefList(merchantId) {
getServicemerchantrefList({
yqMerchantId: merchantId
}).then(res => {
this.baseData.merchantIdList = res || []
//总店
let _headOffice = this.baseData.yqMerchantList.find(item => item.merchantNo === merchantId)
_headOffice.merchantId = _headOffice.merchantNo
//门店选项中加入总店
this.baseData.merchantIdList.push(_headOffice)
this.getOptionsList()
})
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
......@@ -276,6 +320,7 @@ export default {
eventType: '',
upgradeGoodsName: '',
yqMerchantId: '',
merchantId: '',
goodsType: '',
businessCode: '',
goodsSeries: ''
......
<!-- 库存明细弹窗 -->
<template>
<d2-dialog title="库存明细" :is-visible="dialogVisible" class="stockMonthDailog" width="30%" :no-cancel="true"
btn-ok-label="关闭" @closeDialog="handleClose" @confirmDialog="handleClose">
<div>
<div class="d2-container-content">
<d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchForm" :table-params="tableParams">
</d2-table>
</div>
</div>
</d2-dialog>
</template>
<script>
import { mapActions, mapState } from 'vuex'
import { merchantShopGoodsStockPage } from '@api/stockManage'
import { membraneTypeList } from '@/common/constants.js'
export default {
name: 'StockDetailDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: membraneTypeList,
searchForm: {
upgradeGoodsId: '',
yqMerchantId: ''
},
getListApi: merchantShopGoodsStockPage,
tableData: [],
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
// tableOption: false,
tableColumns: [
{
label: '门店',
prop: 'merchantName',
width: '200px'
},
{
label: '当前库存',
prop: 'stock',
// width: ''
formatter: (cellValue) => {
return (cellValue.stock || cellValue.stock == 0) ? parseFloat(cellValue.stock).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
}
}
]
}
}
},
props: {
visible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => { }
}
},
computed: {
dialogVisible: {
get() {
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
},
mounted() {
if (this.recordInfo) {
this.searchForm.yqMerchantId = this.recordInfo.yqMerchantId
this.searchForm.upgradeGoodsId = this.recordInfo.upgradeGoodsId
}
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
// beforeSearchFn() {
// return new Promise(resolve => {
// this.searchFormSearch = deepClone(this.searchForm)
// resolve()
// })
// },
chooseYear() {
this.getList()
},
// getList() {
// var params = deepClone(this.searchForm)
// getReportByGoods(params).then(res => {
// this.tableData = res
// })
// },
handleClose() {
// this.$emit('dialogClose')
this.dialogVisible = false
}
}
}
</script>
<style scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.stockMonthDailog .el-dialog {
margin-top: 20vh !important;
min-width: 700px;
}
.stockMonthDailog .btn-tips img {
width: 18px;
height: 15px;
margin-right: 9px;
vertical-align: bottom;
}
.stockMonthDailog .btn-tips {
display: inline-block;
font-size: 12px;
height: 14px;
line-height: 14px;
background-color: #fff2e5;
color: #999999;
margin-right: 24px;
padding: 6.5px 10px;
}
.show-search {
margin-left: -65px;
}
</style>
......@@ -2,13 +2,21 @@
<template>
<div>
<d2-container>
<div class="header" slot="header" style="padding: 10px 20px;">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :form-data="showFormData" />
<div class="header"
slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData" />
<div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset">
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
......@@ -17,15 +25,26 @@
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" />
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope" />
</d2-table>
</div>
</d2-container>
<!-- 查看 -->
<stock-month-dialog :stock-month-visible="stockMonthVisible" :record-info="recordInfo" v-if="stockMonthVisible"
@dialogClose="dialogClose" />
<stock-month-dialog :stock-month-visible="stockMonthVisible"
:record-info="recordInfo"
v-if="stockMonthVisible"
@dialogClose="dialogClose" />
<stockDetailDialog :visible.sync="stockDetailDialogVisible"
:record-info="recordInfo"
v-if="stockDetailDialogVisible">
</stockDetailDialog>
</div>
</template>
......@@ -35,11 +54,13 @@ import { mapActions, mapState } from 'vuex'
import { getProductTypeBySceneId } from '@api/product'
import { getyqMerchantList, getMerchantGoodsStockMonthReport } from '@api/stockManage'
import stockMonthDialog from './stockMonthDialog'
import stockDetailDialog from './stockDetailDialog'
import { membraneTypeList } from '@/common/constants.js'
export default {
name: 'StockList',
components: {
stockMonthDialog
stockMonthDialog,
stockDetailDialog
},
data() {
return {
......@@ -86,13 +107,19 @@ export default {
optionLabel: 'categoryName',
optionsName: 'productTypeList'
}, {
label: '所属门店',
label: '所属仓库',
name: 'yqMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'yqMerchantList'
}, {
label: '所属商户',
name: 'partnerMerchantName',
type: 'input',
maxlength: '20',
isClear: true
}],
getListApi: getMerchantGoodsStockMonthReport,
tableParams: {
......@@ -134,9 +161,13 @@ export default {
return (cellValue.stock || cellValue.stock == 0) ? parseFloat(cellValue.stock).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) == 1 ? '米' : '件') : '-'
}
}, {
label: '所属门店',
label: '所属仓库',
prop: 'yqMerchantName',
width: '200px'
}, {
label: '所属商户',
prop: 'partnerMerchantName',
width: '200px'
}
]
},
......@@ -144,7 +175,7 @@ export default {
productTypeList: [],
yqMerchantList: []
},
stockDetailDialogVisible: false,
stockMonthVisible: false,
recordInfo: null
}
......@@ -163,7 +194,7 @@ export default {
})
// 获取当前登录账号可见的园区店列表
getyqMerchantList({}).then(res => {
getyqMerchantList({ mainPartnerMerchant: true }).then(res => {
this.baseData.yqMerchantList = res
this.getOptionsList()
})
......@@ -236,7 +267,11 @@ export default {
this.recordInfo = row
this.stockMonthVisible = true
},
handleDetail(row) {
this.recordInfo = row
console.log(row, 'row')
this.stockDetailDialogVisible = true
},
dialogClose(flag) {
this.stockMonthVisible = !this.stockMonthVisible
// if (flag) {
......
<!-- 月度库存结算单弹窗 -->
<template>
<d2-dialog title="月度库存结算单"
:is-visible="stockMonthVisible"
class="stockMonthDailog"
width="70%"
:no-cancel="true"
btn-ok-label="关闭"
@closeDialog="handleClose"
@confirmDialog="handleClose">
<d2-dialog title="月度库存结算单" :is-visible="stockMonthVisible" class="stockMonthDailog" width="70%" :no-cancel="true"
btn-ok-label="关闭" @closeDialog="handleClose" @confirmDialog="handleClose">
<div>
<div class="header"
slot="header">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:search-select-obj="searchSelectObj"
:form-data="showFormData">
<div slot="yearChoose"
slot-scope="scope">
<el-date-picker v-model="searchForm.year"
type="year"
placeholder="选择年"
value-format="yyyy"
format="yyyy"
:clearable="false"
:picker-options="pickerOption"
@change="chooseYear">
<div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :search-select-obj="searchSelectObj"
:form-data="showFormData">
<div slot="yearChoose" slot-scope="scope">
<el-date-picker v-model="searchForm.year" type="year" placeholder="选择年" value-format="yyyy" format="yyyy"
:clearable="false" :picker-options="pickerOption" @change="chooseYear">
</el-date-picker>
</div>
</d2-search>
......@@ -42,17 +25,11 @@
</div> -->
</div>
<div class="d2-container-content">
<d2-table ref="recordTable"
:tableData="tableData"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
:hasPage="false"
:has-num="false">
<d2-table ref="recordTable" :table-data="tableData" :search-form="searchFormSearch" :table-params="tableParams"
:before-search-fn="beforeSearchFn" :has-page="false" :has-num="false">
</d2-table>
</div>
<span class="btn-tips"><img
src="../../../assets/icon-warn.png">说明:月平均加权单价=上月结存库存金额+本月采购金额/上月结存库存数量+本月采购数量</span>
<span class="btn-tips"><img src="../../../assets/icon-warn.png">说明:月平均加权单价=上月结存库存金额+本月采购金额/上月结存库存数量+本月采购数量</span>
</div>
</d2-dialog>
</template>
......@@ -83,7 +60,7 @@ export default {
searchSelectObj: {},
showFormData: [{
label: '年度',
addHtml: 'yearChoose',
addHtml: 'yearChoose'
}],
// getListApi: getReportByGoods,
tableData: [],
......@@ -144,7 +121,7 @@ export default {
baseData: {
},
merchantDialogVisible: false,
merchantDialogVisible: false
}
},
......@@ -156,7 +133,7 @@ export default {
recordInfo: {
type: Object,
default: () => { }
},
}
},
computed: {
......@@ -210,16 +187,19 @@ export default {
color: #2a58ad;
margin: 0 2px;
}
.stockMonthDailog .el-dialog {
margin-top: 20vh !important;
min-width: 700px;
}
.stockMonthDailog .btn-tips img {
width: 18px;
height: 15px;
margin-right: 9px;
vertical-align: bottom;
}
.stockMonthDailog .btn-tips {
display: inline-block;
font-size: 12px;
......@@ -230,6 +210,7 @@ export default {
margin-right: 24px;
padding: 6.5px 10px;
}
.show-search {
margin-left: -65px;
}
......
......@@ -2,13 +2,21 @@
<template>
<div>
<d2-container>
<div class="header" slot="header" style="padding: 10px 20px;">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :form-data="showFormData" />
<div class="header"
slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData" />
<div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset">
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
......@@ -17,9 +25,14 @@
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" />
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope" />
</d2-table>
</div>
</d2-container>
......@@ -30,7 +43,7 @@
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { getProductTypeBySceneId } from '@api/product'
import { getyqMerchantList, getGoodsWarehousingList } from '@api/stockManage'
import { getyqMerchantList, getGoodsWarehousingList, getServicemerchantrefList } from '@api/stockManage'
import { membraneTypeList } from '@/common/constants.js'
export default {
name: 'WarehousingList',
......@@ -46,9 +59,11 @@ export default {
increaseStockType: '',
upgradeGoodsName: '',
yqMerchantId: '',
merchantId: '',
goodsType: '',
businessCode: '',
goodsSeries: ''
goodsSeries: '',
deliveryNumber: ''
},
searchFormSearch: {},
searchSelectObj: {
......@@ -87,14 +102,6 @@ export default {
isClear: true
},
{
label: '入库门店',
name: 'yqMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'yqMerchantList'
}, {
label: '所属分类',
name: 'goodsType',
type: 'select',
......@@ -109,11 +116,41 @@ export default {
maxlength: '20',
isClear: true
}, {
label: '发货单号',
name: 'deliveryNumber',
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '系列',
name: 'goodsSeries',
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '入库仓库',
name: 'yqMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'yqMerchantList',
changeAttr: (value, targetItem) => {
value
? this.getServicemerchantrefList(value)
: (this.baseData.merchantIdList = [])
this.searchForm.merchantId = ''
this.getOptionsList()
}
}, {
label: '入库门店',
name: 'merchantId',
type: 'select',
noDataText: '请先选择仓库',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'merchantIdList'
}],
getListApi: getGoodsWarehousingList,
tableParams: {
......@@ -164,11 +201,20 @@ export default {
}
}, {
label: '关联业务单号',
prop: 'businessCode'
prop: 'businessCode',
width: 150
}, {
label: '入库门店',
label: '关联发货单号',
prop: 'deliveryNumber',
width: 150
}, {
label: '入库仓库',
prop: 'yqMerchantName',
width: '200px'
}, {
label: '入库门店',
prop: 'merchantName',
width: '200px'
}
]
},
......@@ -188,7 +234,8 @@ export default {
}
],
productTypeList: [],
yqMerchantList: []
yqMerchantList: [],
merchantIdList: []
}
}
},
......@@ -206,7 +253,7 @@ export default {
})
// 获取当前登录账号可见的园区店列表
getyqMerchantList({}).then(res => {
getyqMerchantList({ mainPartnerMerchant: true }).then(res => {
this.baseData.yqMerchantList = res
this.getOptionsList()
})
......@@ -223,6 +270,21 @@ export default {
// this.getOptionsList()
// },
// 获取仓库门店
getServicemerchantrefList(merchantId) {
getServicemerchantrefList({
yqMerchantId: merchantId
}).then(res => {
this.baseData.merchantIdList = res || []
//总店
let _headOffice = this.baseData.yqMerchantList.find(item => item.merchantNo === merchantId)
_headOffice.merchantId = _headOffice.merchantNo
//门店选项中加入总店
this.baseData.merchantIdList.push(_headOffice)
this.getOptionsList()
})
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
......@@ -258,9 +320,11 @@ export default {
increaseStockType: '',
upgradeGoodsName: '',
yqMerchantId: '',
merchantId: '',
goodsType: '',
businessCode: '',
goodsSeries: ''
goodsSeries: '',
deliveryNumber: ''
}
this.$refs.recordTable.refreshTable()
},
......
......@@ -27,8 +27,10 @@
<div class="cont">
<div class="msg">
<div class="msg-title">分账品类:</div>
<div class="msg-val">{{ getTypeName(item.groupType,item.goodsTypes) }}</div>
<div class="msg-val">{{ getTypeText(item.groupType,item.goodsTypes) }}</div>
</div>
<div class="msg-name-val" v-if="item.groupType !== 1">{{ getTypeName(item.goodsTypes) }}</div>
<!-- <div class="msg-name-val" v-if="item.groupType !== 1"><goods-filter-component :goodsArr="item.goodsTypes"></goods-filter-component></div> -->
</div>
</div>
<div class="part1 part2">
......@@ -49,7 +51,6 @@
<div class="msg-title">金额分配设置:</div>
<div class="msg-val"
v-html="getDistribute(item.merchantDistributionRules)">
<!-- {{ getDistribute(item.merchantDistributionRules) }} -->
</div>
</div>
</div>
......@@ -300,6 +301,51 @@
<script>
import dayjs from "dayjs"
import { entrydateUpdate } from '@api/merchant'
// import Vue from "vue"
// var goodsFilterComponent = Vue.component('goods-filter-component', {
// template: '<div>{{formattedGoods}}</div>',
// props: {
// goodsArr: {
// type: Array,
// default: []
// }
// },
// data() {
// return { formattedGoods: '' }
// },
// mounted() {
// let text = ''
// let newVal = this.goodsArr
// if (newVal?.length) {
// // 按具体商品
// if (newVal[0]?.categoryType == 2) {
// let upgradeIdArr = []
// newVal.forEach(val => {
// upgradeIdArr.push(val.upgradeGoodsId)
// })
// if (!upgradeIdArr.length) return
// // 根据商品id获取商品名称
// getUpgradeGoodsNameById({ ids: upgradeIdArr }).then(res => {
// let upgradeNameArr = []
// res.forEach(val => {
// upgradeNameArr.push(`${val?.upgradeGoodsName}(${val?.commodityCode})`)
// })
// text = upgradeNameArr.join(',')
// this.formattedGoods = text
// })
// }
// // 按商品分类
// if (newVal[0]?.categoryType == 1) {
// const length = newVal.length - 1
// text = newVal.reduce((str, item, index) => {
// str += item.goodsTypeName + (index == length ? "" : "、")
// return str
// }, '')
// this.formattedGoods = text
// }
// }
// }
// })
export default {
name: 'LedgerAccount',
props: {
......@@ -308,6 +354,10 @@ export default {
default: () => ({})
}
},
// components: {
// 'goods-filter-component': goodsFilterComponent
// },
data() {
return {
stayVal: '', // 日期
......@@ -351,21 +401,39 @@ export default {
this.notice.okTips()
})
},
getTypeName(type, arr) {
getTypeText(type, arr) {
let res = ''
if (type == 1) {
return '全部品类'
}
if (arr.length == 0) return
const length = arr.length - 1
res = arr.reduce((str, item, index) => {
str += item.goodsTypeName + (index == length ? "" : "、")
return str
}, '')
// console.log('res: ', res)
if (arr?.length) {
res = arr[0].categoryType == 1 ? '按商品分类' : arr[0].categoryType == 2 ? '按具体商品' : '-'
}
return res
},
getTypeName(arr) {
let text = ''
if (arr?.length) {
// 按具体商品
if (arr[0]?.categoryType == 2) {
const length = arr.length - 1
text = arr.reduce((str, item, index) => {
str += `${item.upgradeGoodsName}(${item.commodityCode})${index == length ? "" : "、"}`
return str
}, '')
return text
}
// 按商品分类
if (arr[0]?.categoryType == 1) {
const length = arr.length - 1
text = arr.reduce((str, item, index) => {
str += item.goodsTypeName + (index == length ? "" : "、")
return str
}, '')
return text
}
}
},
getLederType(fatherType, childType) {
if (fatherType == 'Y' && childType == 'Y') {
return '线上分账'
......
......@@ -5,7 +5,7 @@
shopMerchantExpenseCategoryValue,
partnerMerchantTotalFeeCalculateType,
partnerMerchantExpenseCategoryValue -->
<div class="header">
<div class="header" v-if="formItem.shopMerchantTotalFeeCalculateType || formItem.partnerMerchantTotalFeeCalculateType">
<div class="shop" v-if="formItem.shopMerchantTotalFeeCalculateType">
<span class="label">流量方总对账费用:{{ severSelectOptionsLabel[formItem.shopMerchantTotalFeeCalculateType] }}</span>
<span class="value">{{ formItem.shopMerchantExpenseCategoryValue }}{{
......@@ -39,6 +39,7 @@
{{ formatGoodsTypeGroupRelations(item.groupType, item.goodsTypeGroupRelations) }}
</div>
</div>
<div class="msg-name-val" v-if="item.groupType !== 1">{{ getTypeName(item.goodsTypeGroupRelations) }}</div>
</div>
</div>
<div class="part1 part3">
......@@ -142,17 +143,50 @@ export default {
if (type == 1) {
return '全部品类'
}
if (arr.length == 0) return
const length = arr.length - 1
res = arr.reduce((str, item, index) => {
str += item.goodsTypeName + (index == length ? "" : "、")
return str
}, '')
if (arr?.length) {
res = arr[0].categoryType == 1 ? '按商品分类' : arr[0].categoryType == 2 ? '按具体商品' : '-'
}
return res
},
getTypeName(arr) {
let text = ''
if (arr?.length) {
// 按具体商品
if (arr[0]?.categoryType == 2) {
const length = arr.length - 1
text = arr.reduce((str, item, index) => {
str += `${item.upgradeGoodsName}(${item.commodityCode})${index == length ? "" : "、"}`
return str
}, '')
return text
}
// 按商品分类
if (arr[0]?.categoryType == 1) {
const length = arr.length - 1
text = arr.reduce((str, item, index) => {
str += item.goodsTypeName + (index == length ? "" : "、")
return str
}, '')
return text
}
}
}
},
components: {},
computed: {}
}
</script>
<style lang="scss"></style>
<style lang="scss" scoped>
.header{
height: 72px;
background: #FFFFFF;
padding: 0 50px;
display: flex;
align-items: center;
margin-bottom: 15px;
font-size: 14px;
div{
flex: 1;
}
}
</style>
......@@ -56,7 +56,8 @@
:goods-type-group-reconciliation-rules="goodsTypeGroupReconciliationRules"
:goods-select-list="goodsSelectList" :query-fee-category-by-type-flow="queryFeeCategoryByTypeFlow"
:query-fee-category-by-type-serve="queryFeeCategoryByTypeServe" :tabindex="idx" :key="idx"
@assignGoodsList="assignGoodsList" @deleteGoodsItem="deleteGoodsItem" />
@assignGoodsTypeList="assignGoodsTypeList" @deleteGoodsTypeItem="deleteGoodsTypeItem" :upgradeGoodsList="upgradeGoodsList"
@deleteUpgradeGoodsItem="deleteUpgradeGoodsItem" @assignUpgradeGoodsList="assignUpgradeGoodsList" :selectUpgradeGoodsList="selectUpgradeGoodsList"/>
</div>
</el-tab-pane>
<el-tab-pane key="add" v-if="addVisible" name="add">
......@@ -92,6 +93,7 @@ import {
import { getGoodsCategoryConfiguration } from '@/api/sys.base.js'
import classificationCpt from "./components/classificationCpt.vue"
import verificationCodeDialog from '../financialRules/components/verificationCodeDialog'
import { getAllGoodsList } from '@api/grounding'
export default {
name: "MerchantCheck",
props: {},
......@@ -139,7 +141,11 @@ export default {
// message: '服务商总对账费用方案',
// options: severSelectOptions
// }
]
],
currentPage: 1,
pageSize: 20,
selectUpgradeGoodsList: [],
upgradeGoodsList: []
}
},
computed: {
......@@ -242,7 +248,7 @@ export default {
initBaseData() {
this.goodsTypeGroupRelations = deepClone(this.productType)
},
assignGoodsList(list) {
assignGoodsTypeList(list) {
const newDatas = [...this.goodsSelectList, ...list]
const hash = {}
this.goodsSelectList = newDatas.reduce((item, next) => {
......@@ -252,7 +258,44 @@ export default {
return item
}, [])
},
assignUpgradeGoodsList(list) {
const newDatas = [...this.selectUpgradeGoodsList, ...list]
const hash = {}
this.selectUpgradeGoodsList = newDatas.reduce((item, next) => {
hash[next?.upgradeGoodsId] ? '' : hash[next?.upgradeGoodsId] = true && item.push(next)
return item
}, [])
},
// 进入页面获取第一页商品数据
getSelectingList(defaultSelect) {
getAllGoodsList({
goodsNameKeyword: this.goodsNameKeyword,
currentPage: this.currentPage,
pageSize: this.pageSize
}).then(res => {
this.allPages = res.pages
let resArr = []
res.list && res.list.forEach(val => {
val.upgradeGoodsList.forEach(v => {
resArr.push({
upgradeGoodsId: v.id,
upgradeGoodsName: v?.upgradeGoodsName,
commodityCode: v?.commodityCode
})
})
})
let arr = this.upgradeGoodsList.concat(resArr)
// 已选中的做为回显用 将数据追加进去
if (defaultSelect?.length) arr = arr.concat(defaultSelect)
this.upgradeGoodsList = this.unique(arr)
}).catch(() => {
})
},
// 数据去重
unique(arr){
const res= new Map()
return arr.filter((a)=> !res.has(a.upgradeGoodsId) && res.set(a.upgradeGoodsId,1))
},
getMerchantLevel(id, name) {
// console.log(this.merchantInfo)
var params = {
......@@ -352,6 +395,7 @@ export default {
const childCop = this.$refs[`classification${targetName}`][0]
const childParams = childCop.getParams()
this.deleteSelectGoodsList(childParams.goodsTypeGroupRelations)
this.deleteSelectUpgradeGoodsList(childParams.upgradeGoods)
var self = this
const tabs = self.editableTabs
let activeName = self.editableTabsValue
......@@ -398,11 +442,14 @@ export default {
// })
// },
deleteGoodsItem(item) {
deleteGoodsTypeItem(item) {
this.goodsSelectList = this.goodsSelectList.filter(
(el) => el.goodsType != item.goodsType
)
},
deleteUpgradeGoodsItem(item) {
this.selectUpgradeGoodsList = this.selectUpgradeGoodsList.filter(el => el?.upgradeGoodsId != item?.upgradeGoodsId)
},
deleteSelectGoodsList(list) {
// console.log(list)
this.goodsSelectList = this.goodsSelectList.reduce((arr, item) => {
......@@ -412,6 +459,14 @@ export default {
return arr
}, [])
},
deleteSelectUpgradeGoodsList(list) {
this.selectUpgradeGoodsList = this.selectUpgradeGoodsList.reduce((arr, item) => {
if (list && list.findIndex(el => item?.upgradeGoodsId == el?.upgradeGoodsId) == -1) {
arr.push(item)
}
return arr
}, [])
},
getRowItem() {
const params = this.$route.query?.params
if (params) {
......@@ -433,13 +488,34 @@ export default {
const typeList = res?.goodsTypeGroupReconciliationRules
this.goodsTypeGroupReconciliationRules = res?.goodsTypeGroupReconciliationRules
this.formObj = res
// 所有按具体商品已选中的商品数据
let upgradeArr = []
typeList.forEach((item, index) => {
index && this.editableTabs.push({
title: '特殊品类' + index,
name: (index + 1).toString()
})
// 按具体商品
if (item.goodsTypeGroupRelations?.length && item.goodsTypeGroupRelations[0]?.categoryType == 2) {
this.goodsTypeGroupReconciliationRules[index].upgradeGoods = deepClone(item.goodsTypeGroupRelations)
this.goodsTypeGroupReconciliationRules[index].categoryType = 2
item.goodsTypeGroupRelations.forEach(val => {
upgradeArr.push({
upgradeGoodsId: val.upgradeGoodsId,
upgradeGoodsName: val.upgradeGoodsName,
commodityCode: val.commodityCode
})
})
this.goodsTypeGroupReconciliationRules[index].goodsTypeGroupRelations = []
}
// 按商品分类
if (item.goodsTypeGroupRelations?.length && item.goodsTypeGroupRelations[0]?.categoryType == 1) {
this.goodsTypeGroupReconciliationRules[index].goodsTypeGroupRelations = deepClone(item.goodsTypeGroupRelations)
this.goodsTypeGroupReconciliationRules[index].categoryType = 1
this.goodsTypeGroupReconciliationRules[index].upgradeGoods = []
}
})
// console.log('this.editableTabs', this.editableTabs)
this.getSelectingList(upgradeArr)
}
},
// 显示smcode弹框
......
......@@ -88,7 +88,7 @@ export default {
sceneType: this.merchantRow.scene
}
const res = await getEffectRuleApi(params)
console.log(res)
this.checkRecordList = res
// this.checkRecordList = res?.goodsTypeGroupReconciliationRules
// console.log('res: ', res)
......@@ -184,6 +184,8 @@ $color: #2a58ad;
}
.cont {
display: flex;
flex-flow: column;
&.cont-table {
display: block;
}
......@@ -194,6 +196,7 @@ $color: #2a58ad;
display: flex;
flex-wrap: wrap;
flex-flow: column;
padding: 16px 20px 32px;
.mt16 {
......@@ -223,6 +226,10 @@ $color: #2a58ad;
text-align: left;
}
}
.msg-name-val{
margin-left: 138px;
font-size: 14px;
}
.compute {
margin-bottom: 10px;
......
......@@ -491,6 +491,8 @@ $color: #2a58ad;
}
.cont {
display: flex;
flex-flow: column;
&.cont-table {
display: block;
}
......@@ -530,7 +532,11 @@ $color: #2a58ad;
text-align: left;
}
}
.msg-name-val{
margin-left: 138px;
font-size: 14px;
}
.compute {
&:first-child {
margin-top: 0px;
......
<template>
<d2-container class="edit_service">
<div class="d2-container-content form_class">
<el-form label-width="120px"
:model="detailInfo"
ref="editServiceForm"
:rules="rules">
<el-form-item
label="采购模式:"
prop="procurementType">
<el-radio-group size="mini" v-model="detailInfo.procurementType">
<el-radio v-for="(subItem, subIdx) in procureModeList" :key="subIdx" :label="subItem.confId">{{
subItem.confName }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="发货主体:"
prop="shippingEntityId">
<el-select v-model="detailInfo.shippingEntityId"
class="select_class"
placeholder="请选择发货主体">
<el-option v-for="(subItem, subIndex) in shippingEntityList"
:key="subIndex"
:label="subItem.shippingEntity"
:value="subItem.shippingEntityId" />
</el-select>
</el-form-item>
</el-form>
</div>
<div style="margin-top: 40px;text-align: center;">
<el-button class="width_100 cancel-btn"
@click="handleClose">取消</el-button>
<el-button
type="primary"
@click="handleUp"
:disabled="$store.state.d2admin.loading.value"
class="width_100">提交</el-button>
</div>
</d2-container>
</template>
<script>
import { procureModeList } from "@/common/constants"
import { mapActions } from 'vuex'
import { getProviderProcurementInfo, updateProviderProcurementInfo, getShippingEntityInfoAll } from "@api/serviceManage"
export default {
name: "editService",
data() {
return {
procureModeList,
rules: {
procurementType: [{ required: true, message: '请选择采购模式', trigger: 'change' }],
shippingEntityId: [{ required: true, message: '请选择发货主体', trigger: 'change' }]
},
detailInfo: {
procurementType: '',
shippingEntityId: ''
},
shippingEntityList: [],
serviceMerchantId: ''
}
},
mounted() {
let { serviceMerchantId } = this.$route.params
this.serviceMerchantId = serviceMerchantId
// 获取发货主体数据
getShippingEntityInfoAll({}).then(res => {
this.shippingEntityList = res || []
this.getInfo()
})
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
getInfo() {
getProviderProcurementInfo({merchantId: this.serviceMerchantId}).then(res => {
this.detailInfo = res || {}
this.$nextTick(() => {
this.$refs['editServiceForm'].clearValidate()
})
})
},
// 取消
handleClose(isRefresh = false) {
if (isRefresh) {
this.close({ tagName: '/editService' })
this.$router.push({ name: 'serviceManage' })
this.close({ tagName: '/serviceManage' })
} else {
this.$confirm('内容未保存,是否返回?', '提示', {
confirmButtonText: '确定',
type: 'warning'
}).then(() => {
this.close({ tagName: '/editService' })
this.$router.push({ name: 'serviceManage' })
this.close({ tagName: '/serviceManage' })
})
}
},
// 保存
handleUp() {
this.$refs['editServiceForm'].validate(valid => {
if (valid) {
let params = {
partnerMerchantId: this.serviceMerchantId,
procurementType: this.detailInfo.procurementType,
shippingEntity: this.shippingEntityList.filter(val => val.shippingEntityId == this.detailInfo.shippingEntityId)[0]?.shippingEntity || '',
shippingEntityId: this.detailInfo.shippingEntityId
}
updateProviderProcurementInfo(params).then(res => {
this.notice.okTips()
this.handleClose(true)
})
} else {
return true
}
})
}
}
}
</script>
<style lang="scss" scoped>
.edit_service{
.form_class{
height: calc(100vh - 300px);
}
.select_class{
width: 432px;
}
.width_100{
width: 100px;
}
}
</style>
\ No newline at end of file
<!-- 服务商管理 -->
<template>
<d2-container class="service-manage">
<div class="header"
slot="header">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData" />
<div class="up-btns">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table ref="serviceStoreTable"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button"
slot-scope="scope"
:show-btn-ids="['9060503']"
:data="scope.scope" />
</d2-table>
</div>
</d2-container>
</template>
<script>
import { Util } from '@/common/util'
import { getList } from '@api/serviceManage'
import { mapActions } from 'vuex'
import { procureModeList } from "@/common/constants"
export default {
name: 'ServiceManage',
data() {
return {
procureModeList,
searchForm: {
merchantNameKeyWord: '',
merchantIdKeyWord: ''
},
showFormData: [{
label: '商户名称',
name: 'merchantNameKeyWord',
type: 'input',
placeholder: '请输入服务商/园区店名称',
isClear: true,
keyFn: this.keyDowmGetList
}, {
label: '商户号',
name: 'merchantIdKeyWord',
type: 'input',
inputType: 'number',
maxlength: '9',
placeholder: '请输入服务商/园区店编号',
isClear: true,
keyFn: this.keyDowmGetList
}],
getListApi: getList,
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: true,
tableColumns: [{
label: '服务商名称',
prop: 'partnerMerchantName'
}, {
label: '商户号',
prop: 'partnerMerchantId'
}, {
label: '登录账号',
prop: 'accountName'
}, {
label: '采购模式',
prop: 'merchantName',
formatter: (cellValue) => {
return this.procureModeList[cellValue?.procurementInfoDTO?.procurementType - 1]?.confName || '-'
}
}, {
label: '发货主体',
prop: 'merchantId',
width: '200',
formatter: (cellValue) => {
return cellValue?.procurementInfoDTO?.shippingEntity || '-'
}
}, {
label: '下级园区店',
prop: 'subMerchantName',
formatter: (cellValue) => {
return cellValue?.subMerchantName || '-'
}
}, {
label: '下级园区店商户号',
width: '180',
prop: 'subMerchantName',
formatter: (cellValue) => {
return cellValue?.subMerchantId || '-'
}
}, {
label: '关联园区店',
prop: 'yqMerchantId',
html: true,
formatter: (cellValue) => {
var html = ''
var list = []
if (cellValue.ymerchants && cellValue.ymerchants.length > 0) {
cellValue.ymerchants.map(item => {
list.push(item.ymerchantName)
})
html = list.join('<br>')
}
return html
}
}, {
label: '关联园区店商户号',
width: '180',
prop: 'yqMerchantId',
html: true,
formatter: (cellValue) => {
var html = ''
var list = []
if (cellValue.ymerchants && cellValue.ymerchants.length > 0) {
cellValue.ymerchants.map(item => {
list.push(item.ymerchantId)
})
html = list.join('<br>')
}
return html
}
}, {
label: '最近更新时间',
prop: 'lastRefDate',
width: '160',
formatter: (cellValue) => {
return Util.dateFormate(cellValue.lastRefDate, 'YYYY-MM-DD HH:mm:ss')
}
}]
},
}
},
components: {
},
mounted() {},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
beforeSearchFn() {
return new Promise(resolve => {
resolve()
})
},
keyDowmGetList() {
this.$refs.serviceStoreTable.refreshTable()
},
handleReset() {
this.searchForm = {
merchantNameKeyWord: '',
merchantIdKeyWord: ''
}
this.$refs.serviceStoreTable.refreshTable()
},
// 编辑服务商
handleEdit(row) {
this.close({ tagName: '/editService' })
this.$router.push({
name: 'editService',
params: { serviceMerchantId: row.partnerMerchantId}
})
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .service-manage {
/*下拉选择框-多选-内容过长-用...代替 begin */
.el-tag.el-tag--info {
background-color: #f4f4f5;
border-color: #e9e9eb;
color: #909399;
max-width: calc(100% - 50px);
/* white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;*/
}
.el-tag.el-tag--info {
width: calc(100% - 200px);
}
.el-tag.el-tag--info .el-select__tags-text {
width: calc(100% - 20px);
float: left;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
/*下拉选择框-多选-内容过长-用...代替 end */
.el-select-dropdown__item {
width: 395px !important;
}
}
</style>
......@@ -6,7 +6,7 @@
园区店配置
</div>
<div class="form_box">
<el-form label-width="100px" size="small">
<el-form label-width="180px" size="small">
<el-form-item label="登录控制:" class="loginClass">
<el-checkbox-group v-model="loginControlList" :min="1">
<el-checkbox v-for="(item, index) in loginTypeList" :key="index" :label="item.id" :disabled="item.disabled">
......@@ -34,6 +34,11 @@
<el-form-item label="营销服务商:">
<el-input style="width:350px" maxlength="50" v-model.trim="marketingMerchantName"></el-input>
</el-form-item>
<el-form-item label="设置为真实(主)服务商:">
<el-select style="width: 350px;" v-model="partnerMerchantId">
<el-option v-for="(subItem, subIndex) in serviceList" :key="subIndex" :label="subItem.partnerMerchantName" :value="subItem.partnerMerchantId"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="saveInfo">确认</el-button>
<el-button type="default" @click="goBack">取消</el-button>
......@@ -48,7 +53,8 @@
import { showToast } from '@/common/util'
import {
GETYQMERCHANTCONFIGDETAIL,
UPDATEYQMERCHANTCONFIG
UPDATEYQMERCHANTCONFIG,
getServiceListAPI
} from '@api/serviceManage'
import { manageTypeList } from '@/common/constants'
export default {
......@@ -70,11 +76,15 @@ export default {
businessModel: '',
installMerchantName: '',
loginControlList: [],
marketingMerchantName: ''
marketingMerchantName: '',
serviceList: [], // 服务商数据
partnerMerchantId: '', // 主服务商
}
},
mounted() {
this.getInfo()
// 获取服务商数据
this.getServiceList()
},
methods: {
// 获取园区店配置
......@@ -88,9 +98,19 @@ export default {
this.installMerchantName = res.installMerchantName || ''
this.marketingMerchantName = res.marketingMerchantName || ''
this.loginControlList = res.loginControlList || [0, 1]
this.partnerMerchantId = res.partnerMerchantId || ''
this.onChange(this.checkList)
})
},
// 获取服务商数据
getServiceList() {
const o = this.$route.query
const oParams = {}
oParams.yqMerchantId = o.yqMerchantId
getServiceListAPI(oParams).then(res => {
this.serviceList = res || []
})
},
onChangeByLogin() {
},
......@@ -159,7 +179,9 @@ export default {
const oParams = {
installMerchantName: this.installMerchantName,
marketingMerchantName: this.marketingMerchantName
marketingMerchantName: this.marketingMerchantName,
partnerMerchantId: this.partnerMerchantId,
partnerMerchantName: this.serviceList.filter(val => val.partnerMerchantId == this.partnerMerchantId)[0]?.partnerMerchantName || ''
}
oParams.yqMerchantId = this.$route.query.yqMerchantId
oParams.supportPayTypes = this.checkList
......
......@@ -131,6 +131,10 @@ export default {
prop: 'totalProvider'
},
{
label: '主服务商',
prop: 'partnerMerchantName'
},
{
label: '园区店号',
prop: 'yqMerchantId'
},
......@@ -244,6 +248,7 @@ export default {
merchantNameKeyWord: '',
merchantIdKeyWord: ''
}
this.$refs.serviceStoreTable.refreshTable()
},
// 编辑园区店配置
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!