Commit 1097640c by 王志慧

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

…stem into wangzh_dev_v4.17.0
2 parents 6c722cc2 57ee7c6e
Showing 121 changed files with 3292 additions and 592 deletions
# travis
# 指定构建模式
NODE_ENV=production
# 标记当前是 CI 自动构建
VUE_APP_BUILD_MODE=TRAVIS
......@@ -4,7 +4,11 @@
# 生产环境(http://dj.glsx.com.cn/dj-carlife-web/#/login) liushiquan1 liushiq123
开发环境 glsadmin 123456
预发布账号: yfbyyb a123456
测试环境账号 15816539335 a123456(超管)
aa123456 aa123456 (园区店)
bb123456 bb123456 (服务商)
从 develop 分支号 dev_v4.4.0 本来用来开发审核以及报表功能版本, wangql_dev_v4.4.0 已开发部分对应需求,未往 dev_v4.4.0 版本合并,因此目前 dev_v4.4.0 分支无用
从 develop 拉分支号 dev_v4.5.1 用来开发转化加 V4.5.0 功能需求
......@@ -42,3 +46,5 @@ dev_4.14.1 上线后已合并到主干上以及 dev_v4.14.2 上
dev_v4.12.2 已上线并合并到主干上
从主干拉取分支 dev_v4.15.0 用于开发 saas+0113 版本功能开发
从主干拉取分支 dev_v4.16.0 用于开发 SAAS+V4.16.0-0227-2 月份需求
......@@ -9,7 +9,6 @@
"dev": "set NODE_OPTIONS=--openssl-legacy-provider && npm run serve",
"build": "vue-cli-service build --no-module",
"build:nomock": "vue-cli-service build --mode nomock",
"build:travis": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode travis",
"lint": "vue-cli-service lint --fix",
"test:unit": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service test:unit",
"report": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --report"
......@@ -24,6 +23,7 @@
"@sentry/webpack-plugin": "^1.18.9",
"axios": "^0.18.0",
"better-scroll": "^1.15.2",
"bignumber.js": "^9.1.1",
"core-js": "^3.8.3",
"dayjs": "^1.8.12",
"default-passive-events": "^2.0.0",
......@@ -50,7 +50,6 @@
"ua-parser-js": "^0.7.19",
"vue": "^2.6.10",
"vue-router": "3.0.5",
"vue2-org-tree": "^1.3.6",
"vuex": "^3.0.1",
"webpack-theme-color-replacer": "^1.4.2",
"webpack5-svg-sprite-loader": "^5.1.1",
......
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.api.smartcarlife.pos.trm."
// 删除设备绑定
export function trmDelete(data) {
data.method = `${path}delete`
return request(data)
}
// 查询设备详情
export function trmDetail(data) {
data.method = `${path}detail`
return request(data, RequestMethods.POST)
}
// 查询设备管理历史记录
export function trmHistory(data) {
data.method = `${path}history`
return request(data, RequestMethods.POST)
}
// 设备信息查询列表
export function trmList(data) {
data.method = `dj.api.life.pos.trm.list`
return request(data, RequestMethods.POST)
}
// 增加设备绑定
export function trmSave(data) {
data.method = `${path}save`
return request(data, RequestMethods.POST)
}
// 更新设备绑定
export function trmUpdate(data) {
data.method = `${path}update`
return request(data, RequestMethods.POST)
}
// 4s店列表
export function getShopMerchantList(data) {
data.method = `dj.smartcarlife.api.shopMerchant.list`
return request(data, RequestMethods.POST)
}
import request from './request'
import request from "./request"
const path = 'dj.api.'
const path2 = 'dj.smartcarlife.api.'
const path = "dj.api."
const path2 = "dj.smartcarlife.api."
export function getList(data) {
data.method = `${path}goodsinfo.page`
......@@ -15,59 +15,59 @@ export function getType(data) {
// 添加产品
export function addGoods(data) {
data.method = `${path}goodsinfo.add`
return request(data, 'post')
return request(data, "post")
}
// 编辑产品
export function editGoods(data) {
data.method = `${path}goodsinfo.update`
return request(data, 'post')
return request(data, "post")
}
// 判断产品是否可删除
export function checkDeleteGoods(data) {
data.method = `${path2}goodsinfo.checkDeleteable`
return request(data, 'post')
return request(data, "post")
}
// 删除产品
export function deleteGoods(data) {
data.method = `${path2}goodsinfo.delete`
return request(data, 'post')
return request(data, "post")
}
// 导出产品
export function exportGoodsList(data) {
data.method = `${path}goodsinfo.export`
return request(data, 'post')
return request(data, "post")
}
// 获取场景下类目
export function getProductTypeBySceneId(data) {
data.method = `${path}goodsCategoryConfiguration.queryGoodsCategoryBySceneId`
return request(data, 'post')
return request(data, "post")
}
// 获取品牌方/供应方
export function getBrandSupplyMerchant(data) {
data.method = `${path}goods.type.queryGoodsRelatedParty`
return request(data, 'post')
return request(data, "post")
}
// 新增供应方
export function addBrandSupplyMerchant(data) {
data.method = `${path}goods.type.addGoodsRelatedParty`
return request(data, 'post')
return request(data, "post")
}
// 编辑/删除供应方
export function editBrandSupplyMerchant(data) {
data.method = `${path}goods.type.editGoodsRelatedParty`
return request(data, 'post')
return request(data, "post")
}
// 获取素材详情
export function getProductInfo(data) {
data.method = `${path}goodsinfo.get.byId`
return request(data, 'post')
return request(data, "post")
}
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)
}
......@@ -11,10 +11,10 @@ import RequestMethods from './request.methods'
import util from '@/libs/util.js'
import { baseConfig } from '@/main'
const request = (
params = {},
method = RequestMethods.GET,
noSignAttr = [],
options
params = {},
method = RequestMethods.GET,
noSignAttr = [],
options
) => {
// console.log(baseConfig)
// params.source = 'glsx'
......@@ -48,21 +48,19 @@ const request = (
? { baseURL: '/', data: sign(params, noSignAttr) }
: { params: sign(params, noSignAttr) }
reqData = reqData = Object.assign(reqData, options, {})
console.log(reqData)
return axios({
url,
method,
...reqData,
data:'isPoint'
...reqData
})
/**
* mock,请使用以下代码。
*/
// return axios({
// url,
// method,
// params: sign(params, noSignAttr)
// })
/**
* mock,请使用以下代码。
*/
// return axios({
// url,
// method,
// params: sign(params, noSignAttr)
// })
}
export default request
......@@ -72,3 +72,15 @@ export function serviceMerchantRelateQrcode(data) {
data.method = `dj.api.smartcarlife.serviceMerchant.relate.qrcode`
return request(data, 'post')
}
// 获取园区店配置的场景入口
export function getYqMerchantSceneConfigAPI(data) {
data.method = `dj.api.smartcarlife.select.openScene.info`
return request(data, 'post')
}
// 配置园区店场景入口
export function settingYqMerchantSceneAPI(data) {
data.method = `dj.api.smartcarlife.update.openScene.info`
return request(data, 'post')
}
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.api.smartcarlife."
const path2 = "dj.api."
const path3 = "dj.smartcarlife.api."
// 获取当前登录账号可见的园区店列表
export function getyqMerchantList(data) {
data.method = `${path}permission.yqMerchant.list`
return request(data)
}
// 入库管理列表
export function getGoodsWarehousingList(data) {
data.method = `${path2}life.GoodsWarehousingInfo.list`
return request(data, RequestMethods.POST)
}
// 库存记录分页查询
export function getMerchantGoodsStockMonthReport(data) {
data.method = `${path}MerchantGoodsStockMonthReport.page`
return request(data, RequestMethods.POST)
}
// 月度的库存结算单
export function getReportByGoods(data) {
data.method = `${path}MerchantGoodsStockMonthReport.listByGoods`
return request(data, RequestMethods.POST)
}
// 出库记录查询
export function getMerchantGoodsStockReduceRecord(data) {
data.method = `${path}MerchantGoodsStockReduceRecord.page`
return request(data, RequestMethods.POST)
}
// 分页查询盘点单列表
export function stockCheckPage(data) {
data.method = `${path3}stock.check.page`
return request(data, RequestMethods.POST)
}
// 分页查询盘点详细信息
export function stockCheckDetailPage(data) {
data.method = `${path3}stock.check.detail.page`
return request(data, RequestMethods.POST)
}
// 保存盘点确认单
export function saveStockCheck(data) {
data.method = `${path3}stock.check.save`
return request(data, RequestMethods.POST)
}
// 分页查询调拨单列表
export function stockAllocatePage(data) {
data.method = `${path3}stock.allocate.page`
return request(data, RequestMethods.POST)
}
// 分页查询调拨详细信息
export function stockAllocateDetailPage(data) {
data.method = `${path3}stock.allocate.detail.page`
return request(data, RequestMethods.POST)
}
// 创建调拨单调入园区店门店列表
export function stockAllocateMerchantList(data) {
data.method = `${path3}stock.allocate.merchant.list`
return request(data, RequestMethods.POST)
}
// 保存调拨单
export function saveStockAllocate(data) {
data.method = `${path3}stock.allocate.save`
return request(data, RequestMethods.POST)
}
// 商品库存列表(创建盘点、调拨时展示)
export function stockRemainPage(data) {
data.method = `${path3}stock.remain.page`
return request(data, RequestMethods.POST)
}
// 调入门店
export function yqRelatedList(data) {
data.method = `${path3}yqRelated.yqMerchant.list`
return request(data, RequestMethods.POST)
}
// 库存预警列表查询
export function inventoryWarningList(data) {
data.method = `${path2}life.InventoryWarning.list`
return request(data, RequestMethods.POST)
}
......@@ -90,3 +90,9 @@ export function queryFeeCategoryByType(data) {
data.method = `${path}smartcarlife.feeCategory.queryFeeCategoryByType`
return request(data, RequestMethods.POST)
}
// 2.0场景 素材可选的服务项目
export function getProductServiceItems(data) {
data.method = `dj.api.smartcarlife.vd.item.list.single`
return request(data)
}
// element 样式补丁
.el-card {
&.is-always-shadow {
box-shadow: 0 0 8px 0 rgba(232,237,250,.6), 0 2px 4px 0 rgba(232,237,250,.5);
}
&.is-hover-shadow {
&:hover {
box-shadow: 0 0 8px 0 rgba(232,237,250,.6), 0 2px 4px 0 rgba(232,237,250,.5);
}
}
}
.el-menu--horizontal {
border-bottom: none !important;
}
.el-tabs__item:focus.is-active.is-focus:not(:active) {
box-shadow: none !important;
}
.el-color-picker__trigger{
border-color:rgba(255,255,255,.1)
}
.el-table{
&--medium td{
padding: 10px 0 !important;
.el-button--text{
padding: 0px 0px;
}
.cell{
.el-tag{
width: 80px;
font-size: 13px;
}
}
}
margin:4px 0 !important;
}
.el-dialog{
margin-top: 6vh !important;
&__body{
padding:20px;
.el-form-item{
margin-bottom: 16px;
}
}
&__footer {
.el-button {
width: 150px;
}
}
}
.table-header{
height: 40px;
line-height: 40px;
color: #909399;
.el-col:nth-child(2){
position: relative; display: flex; justify-content: flex-end;
}
// element 样式补丁
.el-card {
&.is-always-shadow {
box-shadow: 0 0 8px 0 rgba(232, 237, 250, .6), 0 2px 4px 0 rgba(232, 237, 250, .5);
}
&.is-hover-shadow {
&:hover {
box-shadow: 0 0 8px 0 rgba(232, 237, 250, .6), 0 2px 4px 0 rgba(232, 237, 250, .5);
}
}
}
.el-menu--horizontal {
border-bottom: none !important;
}
.el-tabs__item:focus.is-active.is-focus:not(:active) {
box-shadow: none !important;
}
.el-color-picker__trigger {
border-color: rgba(255, 255, 255, .1)
}
.el-table {
&--medium td {
padding: 10px 0 !important;
.el-button--text {
padding: 0px 0px;
}
.cell {
.el-tag {
width: 80px;
font-size: 13px;
}
}
}
margin:4px 0 !important;
}
.el-dialog {
// margin-top: 6vh !important;
margin-top: 6vh;
&__body {
padding: 20px;
.el-form-item {
margin-bottom: 16px;
}
}
&__footer {
.el-button {
width: 150px;
}
}
}
.table-header {
height: 40px;
line-height: 40px;
color: #909399;
.el-col:nth-child(2) {
position: relative;
display: flex;
justify-content: flex-end;
}
}
\ No newline at end of file
......@@ -11,7 +11,8 @@ export const TYPE_NAME = "confType"
*/
export const BaseData = {
channelType: "channelType",
productType: "productType"
productType: "productType",
productServiceItemList: "productServiceItemList"
}
/**
......@@ -501,6 +502,73 @@ export const targetType = {
2: "服务商",
3: "平台方"
}
// 太阳膜部位
export const positionTypeList = [
{
position: 1,
confName: "前档玻璃",
deductionStandard: 1
},
{
position: 2,
confName: "侧后档玻璃",
deductionStandard: 2
},
{
position: 3,
confName: "单帖侧窗一个",
deductionStandard: 0.4
},
{
position: 4,
confName: "单帖后档一个",
deductionStandard: 0.8
},
{
position: 5,
confName: "单帖小天窗",
deductionStandard: 0.4
},
{
position: 6,
confName: "单帖中天窗",
deductionStandard: 0.8
},
{
position: 7,
confName: "单帖全景天窗",
deductionStandard: 1
}
]
// 太阳膜适用车型
export const applicableModelTypeList = [
{
confId: 1,
confName: "小轿车"
},
{
confId: 2,
confName: "SUV"
},
{
confId: 3,
confName: "MPV"
},
{
confId: 4,
confName: "货车"
}
]
/**
1-太阳膜
4-车衣(众筹)
6-改色膜(众筹)
12-车衣
14-改色膜
*/
export const membraneTypeList = [1, 4, 6, 12, 14]
export const businessType = [
{
optionId: 1,
......
......@@ -80,3 +80,22 @@ export const afterTodayOptions = {
return false
}
}
/**
* 时间控件-单年份选择时限制年份
*/
export const rangePickerOptions_year_2023 = {
disabledDate(date) {
// console.log(date)
// console.log(date.getFullYear())
// console.log(new Date())
if (
date.getFullYear() > new Date().getFullYear() ||
date.getFullYear() < 2023
) {
return true
}
return false
}
}
<template>
<el-dialog
id="baseDialog"
top="30vh"
:close-on-click-modal="true"
:close-on-press-escape="true"
:title="dialogConfig.title"
:width="dialogConfig.width"
:visible.sync="visible"
:show-close="config.showClose"
class="noborder"
:append-to-body="config.appendToBody">
<el-dialog id="baseDialog" top="15vh" :close-on-click-modal="true" :close-on-press-escape="true"
:title="dialogConfig.title" :width="dialogConfig.width" :visible.sync="visible" :show-close="config.showClose"
class="noborder" :append-to-body="config.appendToBody">
<slot />
<div
slot="footer"
v-if="config.isShowFooter">
<el-button
type="primary"
@click="confirmBtn">
<div slot="footer" v-if="config.isShowFooter">
<el-button type="primary" @click="confirmBtn">
{{ config.confirm_name }}
</el-button>
<el-button @click="visible = false">
<el-button v-preventReClick @click="visible = false">
{{ config.cancel_name }}
</el-button>
</div>
</el-dialog>
</el-dialog>
</template>
<script>
export default {
name: 'BaseDialog',
directives: {
// 函数节流 监控输入框 提高性能
throttle: {
// 指令的定义
inserted: function (el, obj) {
let timerId = null
let flag = true
el.addEventListener('click', function () {
if (!flag) return
flag = false
timerId && clearTimeout(timerId)
timerId = setTimeout(function () {
flag = true
// 调用绑定在v-throttle上的方法search
obj.value()
}, 1000)
})
}
}
},
props: {
dialogConfig: {
required: false,
......@@ -119,11 +127,12 @@ export default {
border-radius: 6px;
// padding: 0;
overflow: hidden;
.el-dialog__header {
// box-shadow: 0px 0px 5px 0px rgba(136, 152, 157, 0.3);
border-bottom: solid 1px #e6e6e6;
border-radius: 6px 6px 0px 0px;
padding: 18px 20px 18px 25px;
.el-dialog__title {
// color: #212121;
color: #333333;
......@@ -132,6 +141,7 @@ export default {
font-weight: 600;
// font-weight: 16px;
}
.el-dialog__close {
color: #666;
font-weight: 600;
......@@ -147,6 +157,7 @@ export default {
max-height: calc(100% - 121px);
// height: calc(100% - 121px);
}
.roleTitle {
margin-right: 40px;
}
......
......@@ -51,7 +51,7 @@ export default {
opacity: 0;
position: fixed;
z-index: 9999;
right: - $borderRadius - $rightOuter;
right: -$borderRadius - $rightOuter;
bottom: 20px;
font-size: $fontSize;
line-height: $fontSize;
......@@ -59,10 +59,10 @@ export default {
border-radius: $borderRadius;
padding: $paddingTB $paddingLR;
padding-right: $borderRadius + $paddingLR;
background-color: rgba(#000, .7);
background-color: rgba(#000, 0.7);
border: 1px solid #000;
color: #FFF;
transition: all .3s;
color: #fff;
transition: all 0.3s;
@extend %unable-select;
&.d2-source--active {
......@@ -70,8 +70,8 @@ export default {
}
&:hover {
right: - $borderRadius;
background-color: rgba(#000, .9);
right: -$borderRadius;
background-color: rgba(#000, 0.9);
}
}
</style>
......@@ -24,7 +24,7 @@
</span>
</span>
<div
:style="{'width': i.headImg ? 'calc(100% - 220px)' : '100%', 'display': 'inline-block'}">
:style="{'width': i.headImg ? 'calc(100% - 220px)' : '100%', 'display': 'inline-block'}">
<div v-for="(item, index) in i.formBlock"
:key="index"
:style="{'width': i.width || '100%', 'display': 'inline-block'}">
......@@ -47,6 +47,14 @@
<i slot="suffix"
class="suffix">{{ item.unit }}</i>
</el-input>
<el-input class="desc-input"
v-if="item.type === 'textarea'"
type="textarea"
v-model.trim="formData[item.name]"
:placeholder="item.label"
:rows="4"
:maxlength="item.maxlength"
show-word-limit />
<!-- 选择框 -->
<el-select v-else-if="item.type === 'select'"
v-model="formData[item.name]"
......@@ -159,7 +167,7 @@
{{ item.btnTxt }}
</el-button>
<span>已为该商品组合分配<span
class="relate-btn-txt">{{ formData[item.name] ? formData[item.name].length : 0 }}</span>家可见店铺</span>
class="relate-btn-txt">{{ formData[item.name] ? formData[item.name].length : 0 }}</span>家可见店铺</span>
</div>
<el-table :data="formData[item.name]"
style="width: 690px"
......@@ -204,7 +212,7 @@
添加绑定
</el-button>
<span>已将基础商品绑定<span
class="relate-btn-txt">{{ formData[item.name] ? formData[item.name].length : 0 }}</span>件升级商品</span>
class="relate-btn-txt">{{ formData[item.name] ? formData[item.name].length : 0 }}</span>件升级商品</span>
</div>
<div v-for="(subItem, subIndex) in formData[item.name]"
:key="subIndex"
......@@ -224,7 +232,7 @@
<div class="pro-price-block">
<p>建议升级价格:<span class="pro-price">{{ subItem.upgradePrice }}</span>元</p>
<p v-show="warrantyProList.includes(subItem.goodsType)">质保年限:<span
class="pro-price">{{ subItem.warrantyPeriod ? (subItem.warrantyPeriod + '年') : '无' }}</span>
class="pro-price">{{ subItem.warrantyPeriod ? (subItem.warrantyPeriod + '年') : '无' }}</span>
</p>
</div>
</div>
......@@ -242,7 +250,7 @@
+
</div>
<span
class="number">{{ formData[item.name].length }}/{{ item.maxPhotoNum }}</span>
class="number">{{ formData[item.name].length }}/{{ item.maxPhotoNum }}</span>
<input type="file"
name="thumbUrl"
:id="item.name + 'file'"
......@@ -281,7 +289,7 @@
+
</div>
<span
class="number">{{ formData[item.name].length }}/{{ item.maxPhotoNum }}</span>
class="number">{{ formData[item.name].length }}/{{ item.maxPhotoNum }}</span>
<input type="file"
style="opacity: 0"
:id="item.name + 'file'"
......
......@@ -15,12 +15,13 @@
<el-form-item :class="{'no-label': !item.label}"
:label="item.label ? (item.label + ':') : ''">
<el-input v-if="item.type === 'input'"
:style="{ width: item.width || '100%'}"
:placeholder="item.placeholder || ('请输入' + item.label)"
v-model.trim="searchForm[item.name]"
:disabled="item.isDisabled"
:clearable="item.isClear || false"
:type="item.inputType || 'text'"
:maxlength="item.maxlength||''"
:maxlength="item.maxlength||30"
@input="e => maxLengthInput(e, item)"
@keydown.native="e => handleInputDown(e, item)" />
......@@ -151,6 +152,10 @@ export default {
type: Object,
default: () => { }
}
// colWidth: {
// type: Number,
// default: 12
// }
},
mounted() { },
......
<!-- 表格+分页 -->
<template>
<div>
<el-table :data="getListApi ? data : tableData"
v-loading="loading"
border
:highlight-current-row="true"
:stripe="true"
@sort-change="sortChange">
<el-table-column align="center"
width="60px"
label="序号"
type="index"
:index="index=>index+(pagination.pageSize - 1) * pagination.pageCount + 1" />
<el-table-column v-for="(item, index) in tableParams.tableColumns"
:key="index"
:label="item.label"
:prop="item.prop"
:width="item.width"
:min-width="item.minWidth"
:align="item.align||'center'"
:sortable="item.sortable">
<template slot-scope="scope">
<slot v-if="item.addHtml"
:name="item.addHtml"
:scope="scope.row"
:prop="item.prop"
:mom-flag="item.momFlag" />
<template v-else-if="item.momFlag">
<div>
<span v-text="scope.row[item.prop]" />
<span v-if="scope.row[item.momFlag] > 0"
class="el-icon-top" />
<span v-else-if="scope.row[item.momFlag] < 0"
class="el-icon-bottom" />
<span v-else-if="scope.row[item.momFlag] == 0">--</span>
</div>
</template>
<template v-else-if="item.tagLabel">
<el-tag v-if="!item.tagName"
:type="tableParams.tag.type[scope.row[item.prop]]"
v-text="tableParams.tag.label[scope.row[item.prop]]" />
<el-tag v-else
:type="tableParams[item.tagName].type[scope.row[item.prop]]"
v-text="tableParams[item.tagName].label[scope.row[item.prop]]" />
</template>
<template v-else-if="item.formatter">
<span v-text="item.formatter(scope.row)" />
</template>
<template v-else-if="getListApi">
<p v-text="data[scope.$index][item.prop]" />
</template>
<template v-else>
<p v-text="tableData[scope.$index][item.prop]" />
</template>
</template>
</el-table-column>
<el-table-column v-if="tableParams.tableOption"
label="操作"
:align="tableParams.tableOption.align||'center'"
:width="tableParams.tableOption.width||'200'"
fixed="right">
<template slot-scope="scope">
<slot name="auth-button"
:scope="scope.row" />
</template>
</el-table-column>
</el-table>
<el-pagination v-if="hasPage"
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page.pageSize"
:page-sizes="[10,20,30,40]"
:page-size="page.pageCount"
:total="getListApi ? total : tableTotal"
layout="sizes,total,->,prev,pager,next,jumper" />
</div>
</template>
<script>
import { deepClone } from '@/common/util'
export default {
name: 'D2Table',
data() {
return {
loading: false,
oldValue: {},
data: [],
// 页码
page: {
pageCount: 10,
pageSize: 1
},
total: 10,
// 排序
sortColum: '',
sort: '',
pagination: {}
}
},
props: {
// 搜索条件
searchForm: {
type: Object,
default: () => []
},
// 表格数据-外部传入
tableData: {
type: Array,
default: () => []
},
tableTotal: {
type: Number,
default: 10
},
// 获取列表接口
getListApi: {
type: Function,
default: null
},
// 分页,默认有
hasPage: {
type: Boolean,
default: true
},
tableParams: {
type: Object,
default: () => {
return {
// 搜索按钮id;new Date().getTime() + parseInt(Math.random() * 1000)
// btnId: {
// type: String,
// default: ''
// },
// 后端返回列表参数名
listName: {
type: String,
default: ''
},
// 标签-默认标签名为tag;若有多个,那么需要在表格栏的列中加“tagName”
// tag: {
// type: Array,
// default: () => []
// },
// 表格操作,默认没有
// tableOption: {
// type: Object,
// default: null
// },
// 表格栏
tableColumns: {
type: Array,
default: () => []
}
}
}
}
},
watch: {
searchForm: {
handler(val) {
const attr = Object.keys(val).find(item => val[item] !== this.oldValue[item])
if (!val[attr] && this.oldValue[attr]) {
this.getListApi ? this.refreshEmit() : this.$emit('refreshTable', this.page)
}
this.oldValue = deepClone(val)
},
deep: true
}
// 调用其他接口,导致表格刷新-标识
// '$store.state.d2admin.refreshtable.value'(val) {
// (val === 'fresh') && this.refreshEmit()
// }
},
mounted() {
const btn = document.getElementById(this.tableParams.btnId)
btn && btn.addEventListener('click', this.refreshEmit)
this.getListApi && this.refreshTable()
},
methods: {
// 排序
sortChange({ column, prop, order }) {
this.sortColum = order ? prop : ''
this.sort = order
this.refreshTable()
},
// 发布事件,以期查询条件改变后,页面图表需要刷新
refreshEmit() {
this.$emit('searchChange')
this.refreshTable()
},
refreshTable() {
this.loading = true
var params = {
...this.page,
...this.searchForm
}
if (this.sort) {
params.sortColum = this.sortColum
params.sort = this.sort === 'descending' ? 1 : 0
}
this.getListApi(params).then(res => {
this.pagination = res.pagination ? res.pagination : this.page
this.data = res[this.tableParams.listName]
res.pagination && (this.total = res.pagination.totalCount)
this.loading = false
}).catch(() => {
this.loading = false
})
},
// 页码
handleSizeChange(value) {
this.page.pageCount = value
this.getListApi ? this.refreshTable() : this.$emit('refreshTable', this.page)
},
handleCurrentChange(value) {
this.page.pageSize = value
this.getListApi ? this.refreshTable() : this.$emit('refreshTable', this.page)
}
}
}
</script>
<style>
.a-click {
cursor: pointer;
}
</style>
......@@ -121,7 +121,7 @@ export default {
data: [],
// 页码
page: {
pageSize: 20,
pageSize: 10,
currentPage: 1
},
total: 10,
......@@ -326,7 +326,7 @@ export default {
shopPriceArr.push(v.upgradePrice)
v.listShowShopPrice = v.upgradePrice
v.listShowStock = v.stock
v.listShowSpecificationData = v.specificationData.replace(/;~;/g, ' ')
v.listShowSpecificationData = v.specificationData ? v.specificationData.replace(/;~;/g, ' ') : ''
v.goodsInfo.goodsName = val.baseGoodsName || v.goodsInfo.goodsName // 新数据显示商品名称,历史商品数据显示素材名称
stockTotal += v.stock
})
......@@ -379,7 +379,7 @@ export default {
refreshTable_noApi() {
this.page = {
pageSize: 20,
pageSize: 10,
currentPage: 1
}
}
......
/**
* 时间控件-限制月份
*/
export const beforeRangePickerOptions = {
disabledDate(date) {
if (date > new Date()) {
return true
}
return false
}
}
export const afterRangePickerOptions = {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate() - 1))
if (date < yesterday) {
return true
}
return false
}
}
<template>
<div class="map-box" :style="{ height: mapHeight + 'px', width: mapWidth + 'xp' }">
<div id="container">
<el-select v-model="input" class="map-input" filterable remote reserve-keyword placeholder="请输入" :remote-method="remoteMethod" @change="handleChangeAdr" :loading="loading">
<el-option v-for="item in adrList" :key="item.id" :label="item.address" :value="item.id"></el-option>
</el-select>
</div>
<div class="map-address">
<img class="icon-map" src="./images/icon-map.png" />
{{ address }}
</div>
</div>
</template>
<script>
let map, marker, placeSearch
export default {
name: 'map',
props: {
mapHeight: {
type: Number,
default: 460
},
mapWidth: {
type: Number,
default: 740
}
},
data() {
return {
input: [],
address: '',
adrList: [],
lnglat: [],
geocoderAddress: {}
}
},
mounted() {
this.mapInit()
},
methods: {
// initMap() {
// console.log(document.getElementsByTagName('head'))
// var script = document.createElement('script')
// script.type = 'text/javascript'
// script.src = 'https://webapi.amap.com/loader.js'
// document.getElementsByTagName('head')[0].appendChild(script)
// },
mapInit() {
/* eslint-disable */
AMapLoader.load({
/* eslint-enable */
key: '44cc16e43ad7ed3358df507bd0618181', // 申请好的Web端开发者Key,首次调用 load 时必填
version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
// 需要使用的的插件列表
plugins: ['AMap.ToolBar', 'AMap.Scale', 'AMap.Geocoder'],
AMapUI: {
// 是否加载 AMapUI,缺省不加载
version: '1.1', // AMapUI 版本
plugins: ['overlay/SimpleMarker'] // 需要加载的 AMapUI ui插件
},
Loca: {
// 是否加载 Loca, 缺省不加载
version: '2.0' // Loca 版本
}
})
.then(AMap => {
map = new AMap.Map('container', {
zoom: 20,
autoFitView: true,
resizeEnable: true,
cursor: 'move'
})
if (this.lnglat.length) {
this.addMarker(this.lnglat)
}
map.addControl(new AMap.Scale())
map.addControl(new AMap.ToolBar())
this.geocoder = new AMap.Geocoder()
map.setDefaultCursor('pointer')
AMap.plugin(['AMap.PlaceSearch'], function () {
//构造地点查询类
placeSearch = new AMap.PlaceSearch({
pageSize: 8, // 单页显示结果条数
pageIndex: 1, // 页码
citylimit: false, //是否强制限制在设置的城市内搜索
// panel: "panel", // 结果列表将在此容器中进行展示。
autoFitView: true, // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围
renderStyle: 'default'
})
})
map.on('click', this.getAddress)
})
.catch(e => {
console.error(e) //加载错误提示
})
},
remoteMethod(query) {
if (query == '') {
return true
}
let _this = this
placeSearch.search(query, function (status, result) {
if (status === 'complete' && result.poiList.pois.length) {
_this.adrList = result.poiList.pois
}
})
},
addMarker(lnglat) {
let position
if (lnglat.lng) {
position = [lnglat.lng, lnglat.lat]
} else {
position = lnglat
}
this.lnglat = position
marker = new AMap.Marker({
map: map,
icon: new AMap.Icon({
image: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
size: new AMap.Size(27, 34), //图标大小
imageSize: new AMap.Size(27, 34)
}),
// draggable: true,
position: position,
offset: new AMap.Pixel(-10, -10)
})
map.setCenter(position)
map.add(marker)
marker.setMap(map)
// this.map.setFitView()
},
getAddress(e) {
let self = this
let position
if (e.type == 'click') {
position = e.lnglat
} else {
let { lng, lat } = e
position = [lng, lat]
}
if (marker) {
map.remove(marker)
marker.setMap(null)
marker = null
}
self.addMarker(position)
AMap.plugin('AMap.Geocoder', () => {
const geocoder = new AMap.Geocoder()
geocoder.getAddress(position, (status, result) => {
self.address = result.regeocode.formattedAddress
geocoder.getLocation(self.address, (status, result) => {
if (status === 'complete' && result.info === 'OK') {
self.geocoderAddress = result.geocodes[0]
}
})
})
})
},
handleChangeAdr(val) {
if (val) {
var location = this.adrList.find(item => item.id == val)
this.getAddress(location.location)
this.input = ''
this.adrList = []
}
}
}
}
</script>
<style scoped lang="scss">
.map-box {
display: flex;
#container {
position: relative;
width: calc(100% - 284px - 16px);
height: 100%;
}
.map-input {
position: absolute;
top: 32px;
width: 60%;
left: 25%;
z-index: 2;
}
}
#panel {
position: absolute;
max-height: 90%;
overflow-y: auto;
top: 80px;
right: 10px;
width: 280px;
}
.map-address {
display: flex;
box-sizing: border-box;
width: 284px;
height: 100%;
background-color: #f9f9f9;
padding: 20px;
margin-left: 16px;
line-height: 20px;
.icon-map {
width: 16px;
height: 16px;
margin-right: 6px;
}
}
</style>
\ No newline at end of file
<template>
<div v-if="provinceView">
<el-form ref="provinceForm" :model="provinceForm" inline="true" class="province" style="padding-left: 0;">
<el-select size="small" v-model="provinceForm.provinceName" clearable :disabled="isDisabled" placeholder="选择省份" :style="{ width: defaultWidth }" @change="selectProvince" class="select-padding">
<el-option v-for="item in AllData" :key="item.adcode" :label="item.name" :value="item.name" @click.native="selectProvince(item)"></el-option>
</el-select>
<el-select size="small" v-model="provinceForm.cityName" clearable :disabled="isDisabled" placeholder="选择市" :style="{ width: defaultWidth }" @change="selectCity" class="select-padding">
<el-option v-for="item in cityList" :key="item.adcode" :label="item.name" :value="item.name" @click.native="selectCity(item)"></el-option>
</el-select>
<el-select v-if="subdistrict == 3" size="small" v-model="provinceForm.townName" clearable :disabled="isDisabled" placeholder="选择区" :style="{ width: defaultWidth }" @change="selectTown" class="select-padding">
<el-option v-for="item in townList" :key="item.adcode" :label="item.name" :value="item.name" @click.native="selectTown(item)"></el-option>
</el-select>
</el-form>
</div>
</template>
<script>
export default {
name: 'GLProvince',
props: {
// 省市级别,2--只显示省市,3--显示省市区,默认只显示省市
subdistrict: {
type: Number,
default: 2
},
// 省市下拉组件宽度
defaultWidth: {
type: String,
default: '150px'
},
// 组件是否展示,默认展示
provinceView: {
type: Boolean,
default: true
},
isDisabled: {
type: Boolean,
default: false
}
},
data() {
return {
// 所有数据
AllData: [],
// 城市列表
cityList: [],
// 地区列表
townList: [],
provinceForm: {
// 省份名称
provinceName: '',
// 城市名称
cityName: '',
// 地区名称
townName: '',
// 省份代码
provinceCode: '',
// 城市代码
cityCode: '',
// 地区代码
townCode: ''
}
}
},
mounted() {
this.provinceList()
},
methods: {
/*
* @params:传入的为一个key-value的对象
1、keywords --查询关键字,只支持单个关键词语搜索关键词支持:行政区名称、citycode、adcode
列如:this.provinceList({keywords: '山东省'}),这样就可以筛选出山东省下的市、区信息
2、subdistrict --设置显示下级行政区级数,0:不返回下级行政区;1:返回下一级行政区;2:返回下两级行政区;3:返回下三级行政区;
不传的话默认为2,可以在组件中穿,也可以在调用方法的时候传,如果需要展示省市组件,传值最小为2
3、page --最外层的districts最多会返回20个数据,若超过限制,请用page请求下一页数据。
例如page=2;page=3。默认page=1
4、extensions --控制行政区信息中返回行政区边界坐标点; 可选值:base、all;
base:不返回行政区边界坐标点;(默认)
all:只返回当前查询district的边界值,不返回子节点的边界值;目前不能返回乡镇/街道级别的边界值
5、filter -- 按照指定行政区划进行过滤,填入后则只返回该省/直辖市信息,需填入adcode,为了保证数据的正确,强烈建议填入此参数
6、callback -- callback值是用户定义的函数名称,此参数只在output=JSON时有效
7、output --返回数据格式类型,可选值:JSON,XML(默认JSON)
* @return:返回的是一个promise对象,如果不需要展示组件,只需要获取值,可以直接调用方法,异步获取返回值
列如:
const p = this.$refs.provinceForm.provinceList({xxxx(可传值,传值可参考上文params描述) })
p.then(r => {
// r 为返回结果
console.log(r)
})
**/
// 获取省市信息
provinceList(params = {}) {
params ? (params.subdistrict ? '' : (params.subdistrict = this.subdistrict)) : (params.subdistrict = this.subdistrict)
let data = ''
for (let key in params) {
data += '&' + key + '=' + params[key]
}
let path = `https://restapi.amap.com/v3/config/district?key=d22348363c34c266f772ae9b635eef2a`
path = path + data
const pro = fetch(path).then(res => {
return res.json()
})
if (this.provinceView) {
pro.then(r => {
this.AllData = r.districts[0].districts
})
}
return pro
},
// 省市回显
init(province, city, town) {
this.provinceForm = {
provinceName: province,
cityName: city,
townName: town
}
if (province) {
this.AllData.map(item => {
if (item.name.indexOf(province) != -1) {
this.provinceForm.provinceName = item.name
this.cityList = item.districts
this.provinceForm.provinceCode = item.adcode
if (city) {
this.cityList.map(itm => {
if (itm.name.indexOf(city) != -1) {
this.provinceForm.cityCode = itm.adcode
this.provinceForm.cityName = itm.name
this.townList = itm.districts
if (town) {
this.townList.map(itmx => {
if (itmx.name.indexOf(town) != -1) {
this.provinceForm.townCode = itmx.adcode
this.provinceForm.townName = itmx.name
}
})
}
}
})
}
}
})
}
},
// 选择省
selectProvince(val) {
this.provinceForm.cityName = ''
this.provinceForm.townName = ''
this.cityList = val.districts
this.$emit('selectProvince', { provinceName: val.name, provinceCode: val.adcode })
},
// 选择市
selectCity(val) {
this.provinceForm.townName = ''
this.townList = val.districts
this.$emit('selectCity', { cityName: val.name, cityCode: val.adcode })
},
// 选择区
selectTown(val) {
this.$emit('selectTown', { townName: val.name, townCode: val.adcode })
}
}
}
</script>
<style lang="scss">
.province {
display: inline-flex;
.el-select .el-input {
width: auto !important;
}
}
.select-padding {
margin-right: 10px;
}
</style>
<template>
<div>
<div id="div-demo"></div>
</div>
</template>
<script>
import E from 'wangeditor'
export default {
name: 'textBox',
data() {
return {
editor: '',
content: '',
editorOption: {}
}
},
props: {
excludeMenus: {
type: Array,
default: () => ['code']
},
boxHeight: {
type: Number,
default: 240
}
},
mounted() {
this.getEdit()
},
methods: {
getEdit() {
const _this = this
this.editor = new E('#div-demo')
this.editor.config.uploadImgShowBase64 = true
this.editor.config.showMenuTooltips = true
this.editor.config.menuTooltipPosition = 'down'
this.editor.config.height = this.boxHeight
this.editor.config.width = 500
this.editor.config.excludeMenus = this.excludeMenus
this.editor.config.onchange = html => {
// console.log(html);
this.content = html // 绑定当前逐渐地值
this.$emit('change', this.content) // 将内容同步到父组件中
}
this.editor.config.onfocus = () => {
this.$emit('focus')
}
// 上传图片
this.editor.config.customUploadImg = function(resultFiles, insertImgFn) {
var file = resultFiles[0]
var reader = new FileReader()
// 默认1MB
const limitSize = 10
const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) {
_this.$message.error('上传图片大小不能超过' + limitSize + 'MB!')
return true
}
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
_this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
// console.log(res)
insertImgFn(res)
}
})
// resultFiles 是 input 中选中的文件列表
// insertImgFn 是获取图片 url 后,插入到编辑器的方法
// 上传图片,返回结果,将图片插入到编辑器中
}
}
// 上传视频
this.editor.config.customUploadVideo = function(resultFiles, insertVideoFn) {
var file = resultFiles[0]
var reader = new FileReader()
// 默认1MB
const limitSize = 10
const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) {
_this.$message.error('上传视频大小不能超过' + limitSize + 'MB!')
return true
}
reader.readAsDataURL(file)
reader.onload = e => {
const videoFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + videoFile.split(',')[1]
_this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
// console.log(res)
insertVideoFn(res)
}
})
// resultFiles 是 input 中选中的文件列表
// insertImgFn 是获取图片 url 后,插入到编辑器的方法
// 上传图片,返回结果,将图片插入到编辑器中
}
}
this.editor.config.onchangeTimeout = 5000
this.editor.create()
},
setEdit(html) {
this.$nextTick(() => {
this.editor.txt.html(html)
})
},
forbidEdit() {
// this.editor.$textElem.attr('contenteditable', false)
this.editor.disable()
}
}
}
</script>
<style lang="scss" scoped>
#div-demo {
// margin: 16px 300px 0 0;
}
.el-form .editor {
margin-top: 20px;
}
.myQuillEditor {
background-color: #fff;
height: 200px;
}
</style>
<style>
.w-e-text-container {
z-index: 1 !important;
}
.w-e-toolbar {
z-index: 2 !important;
}
</style>
<!-- 弹窗 -->
<template>
<div>
<el-dialog :title="title" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose" :close-on-click-modal="false" :modal-append-to-body="false" :width="width" class="app-dialog">
<el-scrollbar v-if="hasScroll">
<span slot="title">
<span class="main-title"></span>
<span class="dialog-sub-title">
<slot name="sub-title"></slot>
</span>
</span>
<slot></slot>
</el-scrollbar>
<template v-if="!hasScroll">
<span slot="title">
<span class="main-title"></span>
<span class="dialog-sub-title">
<slot name="sub-title"></slot>
</span>
</span>
<slot></slot>
</template>
<div slot="footer">
<slot name="btn-start"></slot>
<el-button :type="typeName" v-if="!noClose" :size="btnSize" @click="handleClose"></el-button>
<el-button type="default" v-if="!noCancel" :size="btnSize" @click="handleClose"></el-button>
<el-button type="primary" v-if="!noBtnOk" :size="btnSize" @click="handleConfirm"></el-button>
<slot name="btn-middle"></slot>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'glsx-dialog',
data() {
return {}
},
props: {
hasScroll: {
type: Boolean,
default: true
},
title: {
type: String,
default: ''
},
isVisible: {
type: Boolean,
default: false
},
showClose: {
type: Boolean,
default: false
},
btnCloseLabel: {
type: String,
default: '关闭'
},
btnOkLabel: {
type: String,
default: '确定'
},
btnCancelLabel: {
type: String,
default: '取消'
},
noBtnOk: {
type: Boolean,
default: false
},
noCancel: {
type: Boolean,
default: false
},
noClose: {
type: Boolean,
default: true
},
typeName: {
type: String,
default: 'default'
},
width: {
type: String,
default: '580px'
},
btnSize: {
type: String,
default: 'small'
}
},
methods: {
handleClose() {
this.$emit('closeDialog')
},
handleConfirm() {
this.$emit('confirmDialog')
}
}
}
</script>
<style lang="scss">
.dialog-sub-title {
font-size: 12px;
color: #666666;
}
</style>
......@@ -17,5 +17,6 @@ Vue.component("RelateStoreDialog", () =>
import("./d2-form/relateStoreDialog.vue")
)
Vue.component("BaseDialog", () => import("./baseDialog/index.vue"))
Vue.component("GlsxCombiForm", () => import("./glsx-combi-form/index.vue"))
// Vue.component([authButton.name], authButton)
Vue.component(authButton.name, authButton)
......@@ -19,6 +19,8 @@ import router from "./router"
import "default-passive-events"
import notice from "@/common/notice"
import "element-ui/lib/theme-chalk/index.css"
// import { GLCombiForm } from "glsx-components" // 权限按钮 (根据权限动态创建)
// 实例化
process.env.NODE_ENV === "production" &&
Sentry.init({
......@@ -46,6 +48,7 @@ process.env.NODE_ENV === "production" &&
// 核心插件
Vue.use(d2Admin)
Vue.use(chaining)
// Vue.use(GLCombiForm)
Vue.prototype.notice = notice
const isProd = process.env.NODE_ENV === "production"
......@@ -54,35 +57,60 @@ if (!isProd) {
Vue.config.devtools = true
}
// console.log(test)
// Vue.use(D2Crud)
// 动态导入vuex 模块
// Vue.use(function () {
// Vue.mixin({
// beforeCreate: function () {
// // $options是组件选项,包含组件.vue文件的 `export default` 的属性
// // 为了拿到在组件定义的是否按需加载的属性值 `isNeedVuex`
// // console.log(this.$options.isNeedVuex)
// if (this.$options.isNeedVuex) {
// // 需要设置.vue文件的name属性,跟单文件组件名字命名一样
// const name = this.$options.name
// // console.log(name)
// import(`./store/modules/${name}/index`).then((res) => {
// // console.log("res", res)
// // res.default就是代表我们在store/modules文件夹下对应文件的export default对象
// // registerModule是vuex自带的方法,请自行搜索
// // 第一个参数是动态注入的模块名,第二个参数是模块导出对象
// this.$store.registerModule(name, res.default)
// })
// }
// }
// })
// })
Vue.prototype.$EventBus = new Vue()
Vue.directive("preventReClick", {
bind: (el, binding) => {
let time = binding.value // 防抖时间
if (!time) {
// 用户若不设置防抖时间,则默认1s
time = 1000
}
let fun
el.addEventListener(
"click",
(event) => {
if (!fun) {
// 第一次执行
fun = setTimeout(() => {
fun = null
}, time)
} else {
// 直接取消当前事件
event && event.stopImmediatePropagation()
}
},
true
)
}
})
var baseConfig = {
// 系统名字
sysName: "嘀加智享车生活",
// 系统说明
subName: "让你的生意慧简单",
// 是否需要注册-true;false
hasReg: false,
// 是否需要配置账号权限;true-有权限,从后台获取权限信息;false-无需权限
hasAuth: true,
subShopMerchantName: true, // 是否显示财务列表二级流量方
env: "production",
alipayPath: "https://dj.glsx.com.cn/dj-carlife-web-alipay/#/alipay",
css_url:
"https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/index.css",
axios: {
baseURL: "https://dj.glsx.com.cn/rop-dj-smartcarlife/router",
appkey: "d7ffc3346fc9a45bccaaa35300d59022",
secret: "4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353"
secret: "4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353",
timeout: 50000,
result: {
data_key: "data",
message_key: "message",
code_key: "code",
code_success_value: 0,
code_message_map: {}
}
}
}
// 使用fetch 解决axios提前实例化导致sign里面的secret不能通过配置中心动态获取
......@@ -101,8 +129,8 @@ fetch(
)
.then((response) => {
const { code, data } = response
// console.log(response)
// const code = "200"
// // console.log(response)
// const data = {
// // 系统名字
// sysName: "嘀加智享车生活",
......
......@@ -71,7 +71,7 @@ service.interceptors.request.use(
// config.url = baseConfig.axios.baseURL + config.url
// console.log(config.data.method.includes('dj.api.common.uploadImg'))
console.log(config, 'config')
console.log(config, "config")
// console.log(Object.prototype.toString.call(config.data))
// console.log(config.data.method)
if (process.env.NODE_ENV !== "development") {
......@@ -88,31 +88,37 @@ service.interceptors.request.use(
) {
console.log(1)
config.url = "http://dj.test.glsx.com.cn/rop-dj-smartcarlife/router"
} else {
console.log(2)
console.log(config)
if (config.isPoint) {
config.url = baseConfig.axios2.baseURL
} else if (config.isCommon) {
config.url = baseConfig.common.baseURL
} else {
config.url = baseConfig.axios.baseURL
}
return resolve(config)
}
// else {
// console.log(config)
// if (config.isPoint) {
// config.url = baseConfig.axios2.baseURL
// } else if (config.isCommon) {
// config.url = baseConfig.common.baseURL
// } else {
// config.url = baseConfig.axios.baseURL
// }
// }
}
// else {
// if (config.isPoint) {
// config.url = baseConfig.axios2.baseURL
// } else if (config.isCommon) {
// config.url = baseConfig.common.baseURL
// } else {
// config.url = baseConfig.axios.baseURL
// }
// }
if (config.isPoint) {
config.url = baseConfig.axios2.baseURL
} else if (config.isCommon) {
config.url = baseConfig.common.baseURL
} else {
console.log(3)
console.log(config)
if (config.isPoint) {
config.url = baseConfig.axios2.baseURL
} else if (config.isCommon) {
config.url = baseConfig.common.baseURL
} else {
config.url = baseConfig.axios.baseURL
}
config.url = baseConfig.axios.baseURL
}
console.log(config)
// if (config.params && config.params.method.includes('common.uploadImg')) {
// config.url = 'http://dj.test.glsx.com.cn/rop-dj-smartcarlife/router'
// } else {
......
......@@ -125,6 +125,12 @@ export const routerName = {
parentId: "90603",
label: "删除",
handle: "handleDelete"
},
{
authId: "90603011",
parentId: "90603",
label: "收款码",
handle: "collectionQRcode"
}
],
component: _import("systemConfig/merchant/merchantManage")
......@@ -444,5 +450,85 @@ export const routerName = {
activePath: "/costCategoryManage"
},
component: _import("systemConfig/costCategoryManage/editReconciliation")
},
90617: {
path: "/deviceManage",
name: "deviceManage",
meta: {
title: "设备管理",
authId: "90617",
parentId: "906",
cache: false
},
auth: [
{
authId: "9061701",
parentId: "90617",
label: "添加",
icon: "plus",
category: "Button",
type: "primary",
handle: "handleAdd",
addRoutePath: [
{
authId: "9061705",
name: "编辑设备",
parentId: "90617"
}
]
},
{
authId: "9061702",
parentId: "90617",
label: "编辑",
handle: "handleEdit"
},
{
authId: "9061703",
parentId: "90617",
label: "历史记录",
handle: "handleHistory",
addRoutePath: [
{
authId: "9061706",
name: "历史记录",
parentId: "90617"
}
]
},
{
authId: "9061704",
parentId: "90617",
label: "删除",
handle: "handleDelete"
}
],
component: _import("systemConfig/deviceManage/deviceList")
},
9061705: {
path: "/editDevice",
name: "editDevice",
meta: {
title: "编辑对账类目",
authId: "9061705",
parentId: "90617",
cache: false,
sideHidden: false,
activePath: "/deviceManage"
},
component: _import("systemConfig/deviceManage/editDevice")
},
9061706: {
path: "/deviceHistory",
name: "deviceHistory",
meta: {
title: "历史记录",
authId: "9061706",
parentId: "90617",
cache: false,
sideHidden: false,
activePath: "/deviceManage"
},
component: _import("systemConfig/deviceManage/deviceHistory")
}
}
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
908: {
path: "/stockManage",
name: "stockManage",
meta: {
title: "库存管理",
authId: "908",
parentId: "1",
cache: false
}
},
90801: {
path: "/warehousingList",
name: "warehousingList",
meta: {
title: "入库管理",
authId: "90801",
parentId: "908",
cache: false
},
auth: [
{
authId: "9080101",
parentId: "90801",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
}
],
component: _import("stockManage/warehousing/warehousingList")
},
90802: {
path: "/stockList",
name: "stockList",
meta: {
title: "库存管理",
authId: "90802",
parentId: "908",
cache: false
},
auth: [
{
authId: "9080201",
parentId: "90802",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9080202",
parentId: "90802",
label: "查看",
handle: "look"
}
],
component: _import("stockManage/stock/stockList")
},
90803: {
path: "/outboundList",
name: "outboundList",
meta: {
title: "出库管理",
authId: "90803",
parentId: "908",
cache: false
},
auth: [
{
authId: "9080301",
parentId: "90803",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
}
],
component: _import("stockManage/outbound/outboundList")
},
90804: {
path: "/inventoryList",
name: "inventoryList",
meta: {
title: "盘点管理",
authId: "90804",
parentId: "908",
cache: false
},
auth: [
{
authId: "9080401",
parentId: "90804",
label: "创建盘点",
icon: "plus",
category: "Button",
type: "primary",
handle: "gotoAdd",
addRoutePath: [
{
authId: "9080404",
name: "创建盘点",
parentId: "90804"
}
]
},
{
authId: "9080402",
parentId: "90804",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9080403",
parentId: "90804",
label: "查看",
handle: "look"
}
],
component: _import("stockManage/inventory/inventoryList")
},
9080404: {
path: "/addInventory",
name: "addInventory",
meta: {
title: "创建盘点",
authId: "9080404",
parentId: "90804",
cache: false,
sideHidden: false,
activePath: "/inventoryList"
},
component: _import("stockManage/inventory/addInventory")
},
90805: {
path: "/allocationList",
name: "allocationList",
meta: {
title: "调拨管理",
authId: "90805",
parentId: "908",
cache: false
},
auth: [
{
authId: "9080501",
parentId: "90805",
label: "创建调拨",
icon: "plus",
category: "Button",
type: "primary",
handle: "gotoAdd",
addRoutePath: [
{
authId: "9080504",
name: "创建调拨",
parentId: "90805"
}
]
},
{
authId: "9080502",
parentId: "90805",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9080503",
parentId: "90805",
label: "查看",
handle: "look"
}
],
component: _import("stockManage/allocation/allocationList")
},
9080504: {
path: "/addAllocation",
name: "addAllocation",
meta: {
title: "创建调拨",
authId: "9080504",
parentId: "90805",
cache: false,
sideHidden: false,
activePath: "/allocationList"
},
component: _import("stockManage/allocation/addAllocation")
},
90806: {
path: "/earlyWarningList",
name: "earlyWarningList",
meta: {
title: "库存预警",
authId: "90806",
parentId: "908",
cache: false
},
auth: [
{
authId: "9080601",
parentId: "90806",
label: "去补货",
category: "Button",
type: "primary",
handle: "gotoReplenishment"
},
{
authId: "9080602",
parentId: "90806",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
}
],
component: _import("stockManage/earlyWarning/earlyWarningList")
}
}
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")
}
}
......@@ -2,6 +2,7 @@ import Vue from 'vue'
import Vuex from 'vuex'
import d2admin, { storeResets } from './modules/d2admin'
import goodsInfoData from './modules/goodsInfoData'
Vue.prototype.$StoreReset = function() {
return new Promise(resolve => {
storeResets.forEach(reset => this.dispatch(reset))
......@@ -18,6 +19,7 @@ if (!isProd) {
export default new Vuex.Store({
modules: {
d2admin
d2admin,
goodsInfoData
}
})
......@@ -39,6 +39,20 @@ export default {
util.cookies.set("token", accountInfo.sessionId)
getUserInfo({}).then(async (userInfo) => {
userInfo.beSuper = userInfo.loginAccount.isAdmin == 1
if (userInfo.beSuper) {
// 是否园区店
userInfo.beYQMerchant = true
// 是否服务商
userInfo.beServerMerchant = true
} else {
// 是否园区店
userInfo.beYQMerchant =
userInfo.loginAccount.merchantAccountList.includes("6") ||
userInfo.loginAccount.merchantAccountList.includes("8")
// 是否服务商
userInfo.beServerMerchant =
userInfo.loginAccount.merchantAccountList.includes("7")
}
userInfo.detail = userInfo.merchant
Object.keys(userInfo.loginAccount).forEach((item) => {
if (userInfo.loginAccount[item] && !userInfo.detail[item]) {
......@@ -91,6 +105,18 @@ export default {
}
var tempAuths = []
var targetRoutes = res.beSuper ? routeAll : res.map((i) => i.authId)
// 先处理园区店角色是不能拿到 订单审批和发货的页面
// console.log("userInfo.beYQMerchant", userInfo.beYQMerchant)
const filterList = ["90903", "90904"]
if (!userInfo.beSuper && userInfo.beYQMerchant) {
targetRoutes = targetRoutes.filter((item) => {
return !filterList.includes(item.toString())
})
}
if (userInfo.beServerMerchant) {
targetRoutes.push("90904")
}
// console.log("targetRoutes", targetRoutes)
routeAll
.map((i) => i.authId)
.forEach((item, index) => {
......@@ -171,7 +197,7 @@ export default {
// DB -> store 持久化数据加载全局尺寸
await dispatch("d2admin/size/load", null, { root: true })
// DB - > 初始化 基础数据
await dispatch('d2admin/base/init', null, { root: true })
await dispatch("d2admin/base/init", null, { root: true })
// 后台接口 -> store
// await dispatch('d2admin/auth/init', null, { root: true })
// end
......
......@@ -5,7 +5,7 @@
* @Last Modified time: 2020-11-15 10:22:06
*/
import { getChannelType, getProductType } from "@/api/sys.base"
import { getChannelType, getProductType, getProductServiceItems } from "@/api/sys.base"
// import {
// BaseData
// } from '@/common/constants'
......@@ -19,7 +19,9 @@ export default {
// 渠道类型
channelType: [],
// 产品分类
productType: []
productType: [],
// 2.0场景素材可选服务项目
productServiceItemList: []
},
actions: {
/**
......@@ -29,10 +31,19 @@ export default {
*/
init({ state, dispatch, commit }) {
return new Promise(async (resolve) => {
Promise.all([getChannelType({}), getProductType({})]).then(
async ([channelType, productType]) => {
Promise.all([getChannelType({}), getProductType({}), getProductServiceItems({})]).then(
async ([channelType, productType, productServiceItemList]) => {
// 处理服务项目数据
let arr = []
productServiceItemList.forEach(val => {
arr.push({
serviceCode: val.serviceCode,
serviceName: val.serviceName
})
})
state.channelType = channelType
state.productType = productType
state.productServiceItemList = arr
// console.log(productType, "productType")
await dispatch("save2db", {
name: "",
......@@ -49,6 +60,7 @@ export default {
return new Promise(async (resolve) => {
state.channelType = []
state.productType = []
state.productServiceItemList = []
await dispatch("save2db", {
name: "",
value: state
......@@ -101,8 +113,8 @@ export default {
state =
(await dispatch("getFromdb", "base")) || (await dispatch("init"))
}
const { channelType, productType } = state
resolve({ channelType, productType })
const { channelType, productType, productServiceItemList } = state
resolve({ channelType, productType, productServiceItemList })
})
},
/**
......
export default {
namespaced: true,
state: {
// 商品数据
goodsInfoData: {
id: '',
baseGoodsId: '',
sapCode: '',
supplierCode: '',
supplierName: '',
sceneName: '',
sceneType: '',
goodsName: '',
baseGoodsName: '',
goodsCode: '',
brandMerchantName: '',
specificationType: '1',
thumbUrl: [],
goodsTypeName: '',
goodsImgList: [],
goodsId: [],
specificationDetailList: [],
upgradeGoodsList: [],
distributionType: '0',
goodsSpecificationNameList: [],
linkMerchants: [],
speciLinkMerchants: [],
status: '',
goodsSpecificationList: [],
goodsPositionList: [],
applicableModelNames: '',
positionNames: '',
copyGoodsCode: '',
shoppingMallFlag: '0',
goodsSpecificationSingleList: [],
specificationSingleDetailList: [],
selectedSceneCode: ''
}
},
mutations: {
/**
* @description 数据改变
* @param {Object} state state
*/
setUpdateGoodsInfo(state, data) {
state.goodsInfoData = Object.assign(state.goodsInfoData, data)
}
},
actions: {
},
getters: {
getGoodsInfoData(state) {
return state.goodsInfoData
}
}
}
......@@ -58,7 +58,7 @@
>未完成</span>
<span v-else>已完成</span> -->
<span
:class="{ 'red': scope.row.status === 1 }">{{ baseData.customerStatusList.find(item => item.confId == scope.row.status).confLabel }}</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>
......@@ -258,7 +258,7 @@ export default {
total: 0,
page: {
pageNum: 1,
pageSize: 20
pageSize: 10
}
}
},
......
......@@ -242,7 +242,7 @@ export default {
// 表格
tableList: [],
page: {
pageSize: 20,
pageSize: 10,
currentPage: 1
},
total: 0,
......
......@@ -303,7 +303,7 @@ export default {
// 表格
tableList: [],
page: {
pageSize: 20,
pageSize: 10,
currentPage: 1
},
total: 0,
......
......@@ -8,13 +8,15 @@
<el-tabs v-model="searchForm.sceneType">
<!-- <el-tab-pane label="1.0新车车损升级"
name="0" /> -->
<el-tab-pane label="1.1次新车精品升级"
<el-tab-pane :label="sceneList['1']"
name="1" />
<!-- <el-tab-pane label="1.2次新车膨胀金活动"
name="2" /> -->
<el-tab-pane v-if="!specialAccout"
label="1.3售后直播众筹活动"
:label="sceneList['3']"
name="3" />
<el-tab-pane :label="sceneList['0']"
name="0" />
</el-tabs>
<el-card class="finance_list_summary"
:body-style="{ padding: 0 }"
......@@ -517,7 +519,6 @@
<auth-button :data="scope" />
</template>
</el-table-column>
</el-table-column>
</el-table>
<el-pagination background
@size-change="handleSizeChange"
......@@ -549,6 +550,7 @@ import funnelOption from '../index/funnelOption'
import { getServiceStore, getParkStore } from '@api/editCustomer'
import { mapActions, mapState } from 'vuex'
import { baseConfig } from "@/main"
import { sceneList } from "@/common/constants"
import {
divisionTypeList,
payTypeList,
......@@ -741,7 +743,7 @@ export default {
total: 0,
page: {
currentPage: 1,
pageSize: 20
pageSize: 10
},
payTypeOpts: deepClone(payType),
shopProfitTypeOpts: {
......@@ -774,8 +776,9 @@ export default {
sunmmaryVisible: true, // 顶部统计模块
sellerName_visible: true, // 列表字段:转化员
shopProfitType_visible: true, // 列表字段:流量方比例
yq_visible: true// 列表字段:园区店
yq_visible: true, // 列表字段:园区店
/** 根据场景控制页面显示隐藏end */
sceneList: sceneList
}
},
......@@ -1038,6 +1041,7 @@ export default {
// console.log(params)
// api[apiName](params).then(res => {
this.tableData = []
api.getList(params).then(res => {
let temp = 1
this.tableData = res.list.map((item, index) => {
......
......@@ -291,10 +291,12 @@ export default {
}, {
label: '价格',
prop: 'listShowShopPrice'
}, {
label: '库存',
prop: 'listShowStock'
}, {
},
// {
// label: '库存',
// prop: 'listShowStock'
// },
{
label: '可见门店',
name: '',
type: 'slot',
......
......@@ -12,32 +12,32 @@
<div class="top">
<div class="top-left">
<span class="title">商品{{ index + 1 }}:</span>
<span>{{ baseGoodsName }}</span><span v-for="(val, idx) in item.specsValueList" :key="idx">{{ val }}</span>
<span>{{ baseGoodsName }}</span><span v-for="(val, idx) in item.specificationData.split(';~;')" :key="idx">{{ val }}</span>
</div>
<div class="top-center">>>></div>
<div class="top-right">
<span class="title"><span class="text-red">*</span>门店:</span>
<!-- v-el-select-loadmore="interestsLoadmore" remote reserve-keyword :remote-method="remoteMethod"
:loading="interesLoading"-->
<el-select style="width: 430px;" @change="e => selectChange(e, index)"
filterable collapse-tags remote reserve-keyword :remote-method="remoteMethod"
v-model="item.selectedMerchantIds" multiple @visible-change="visibleChange" placeholder="请选择">
<el-select style="width: 400px;" @change="e => selectChange(e, index)"
filterable collapse-tags remote reserve-keyword :remote-method="remoteMethod"
v-model="item.selectedMerchantIds" multiple @visible-change="visibleChange" placeholder="请选择"
:ref="'selectMerchant' + index"
v-el-select-loadmore="interestsLoadmore"
:loading="interesLoading">
<el-option
v-for="(v, k) in merchantList"
v-show="!merchantName || (merchantName && v.isShowItem == 1)"
:key="k"
:label="(v.merchant && v.merchant.merchantName) + ' ' + (v.merchant && v.merchant.merchantId)"
:value="v.merchant && v.merchant.merchantId"
:value="(v.merchant && v.merchant.merchantName) + ' ' + (v.merchant && v.merchant.merchantId)"
:disabled="!v.isSetUpgradeSettleRule">
</el-option>
</el-select>
</div>
</div>
<div class="bottom" v-if="item.selectedMerchantList && item.selectedMerchantList.length">
<div class="bottom" v-if="item.selectedMerchantIds && item.selectedMerchantIds.length">
<div style="margin-bottom: 15px;">已分配:</div>
<div class="merchant-tag">
<div class="flex_1" v-for="(subItem, subIndex) in item.selectedMerchantList" :key="subIndex">
<el-tag closable @close="handleSpescDelete(subItem, index)">{{ subItem.merchantName + ' ' + subItem.merchantId }}</el-tag>
<div class="flex_1" v-for="(subItem, subIndex) in item.selectedMerchantIds" :key="subIndex">
<el-tag closable @close="handleSpescDelete(subItem, index)">{{ subItem }}</el-tag>
</div>
</div>
</div>
......@@ -50,10 +50,9 @@ export default {
name: 'RelateStoreDialog',
data() {
return {
selectedData: [],
merchantList: [],
currentPage: 1,
pageSize: 9999,
pageSize: 50,
merchantName: '',
interesLoading: false
}
......@@ -73,14 +72,6 @@ export default {
type: Function,
default: () => { }
},
storeSelected: {
type: Array,
default: () => []
},
storeSearchForm: {
type: Object,
default: () => { }
},
specificationValueList: {
type: Array,
default: () => []
......@@ -89,25 +80,27 @@ export default {
type: String,
default: () => ''
},
baseGoodsId: {
type: Number,
default: () => 0
},
selectedSceneCode: {
typeof: Number,
default: () => 0
}
// 去掉表格中某些字段
// noTableField: {
// type: Array,
// default: () => []
// }
},
watch: {
speciRelateStoreVisible: {
handler(newValue) {
if (newValue) {
this.getSelectingList()
} else {
this.merchantList = []
this.currentPage = 1
}
},
deep: true
}
},
mounted() {
this.selectedData = this.storeSelected
if (this.merchantList.length) return
this.getSelectingList()
},
directives: {
......@@ -126,24 +119,28 @@ export default {
}
}
},
methods: {
selectChange(e, index) {
const arr = this.merchantList.filter(val => e.indexOf(val.merchantId) > -1)
this.specificationValueList[index].selectedMerchantList = arr
this.specificationValueList[index].selectedMerchantIds = e
},
remoteMethod(query) {
this.merchantName = query
this.currentPage = 1
this.interestsOptions = []
this.interesLoading = true
if (query) {
this.getSelectingList() // 请求接口
}
this.merchantList = []
this.getSelectingList() // 请求接口
},
visibleChange(data) {
// 获取焦点重新渲染下拉框数据
if (data) this.merchantName = ''
if (data) {
if (this.merchantName) {
this.merchantName = ''
this.currentPage = 1
this.merchantList = []
this.getSelectingList()
}
}
},
interestsLoadmore() {
setTimeout(() => {
......@@ -164,34 +161,19 @@ export default {
}).then(res => {
this.interesLoading = false
this.allPages = res.pages
const arr = []
res.list && res.list.forEach(val => {
val.merchantId = val.merchantId ? val.merchantId : val.merchant?.merchantId
val.merchantName = val.merchantName ? val.merchantName : val.merchant?.merchantName
val.yqMerchantId = val.yqMerchantId ? val.yqMerchantId : val.yqMerchant?.merchantId
val.yqMerchantName = val.yqMerchantName ? val.yqMerchantName : val.yqMerchant?.merchantName
if (this.merchantName) {
arr.push(val.merchantId)
}
})
if (!this.merchantName) {
this.merchantList = res.list
} else {
this.merchantList.forEach(val => {
if (arr.indexOf(val.merchantId) > -1) {
this.$set(val, 'isShowItem', 1)
} else {
this.$set(val, 'isShowItem', 0)
}
})
}
this.merchantList = this.merchantList.concat(res.list)
})
},
handleSpescDelete(subItem, index) {
this.specificationValueList[index].selectedMerchantList.splice(
this.specificationValueList[index].selectedMerchantList.findIndex(v => v.merchantId == subItem.merchantId), 1
this.specificationValueList[index].selectedMerchantIds.splice(
this.specificationValueList[index].selectedMerchantIds.findIndex(v => v.split(' ')[1] == subItem.merchantId), 1
)
this.specificationValueList[index].selectedMerchantIds.splice(this.specificationValueList[index].selectedMerchantIds.findIndex(v => v == subItem.merchantId), 1)
},
handleSpeciRelateStoreConfirm() {
let [flag, index] = [true, 0]
......@@ -212,15 +194,14 @@ export default {
const arr = []
this.specificationValueList.forEach(val => {
const merchantList = []
val.selectedMerchantList.forEach(v => {
val.selectedMerchantIds.forEach(v => {
merchantList.push({
merchantId: v.merchantId,
merchantName: v.merchantName
merchantId: v.split(' ')[1],
merchantName: v.split(' ')[0]
})
})
arr.push({
id: val.id,
// specificationData: val.specificationData,
merchantList: merchantList
})
})
......@@ -242,6 +223,7 @@ export default {
align-items: center;
padding: 10px 0;
.top-left{
flex: 2;
color: #666666;
span{
margin-right: 10px;
......@@ -251,12 +233,14 @@ export default {
}
}
.top-center{
flex: 1;
font-weight: 600;
background-image: -webkit-linear-gradient(left, #3E69E4, #C5CFF8);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.top-right{
flex: 2;
.title{
color: #1D1D1D;
.text-red{
......
<template>
<div class="d2-form-block distribution-form" id="distribution-form">
<p class="edit-sub-title title-backgroud">分配到门店</p>
<div class="add-btns">
<el-button type="primary" style="width: 140px;" @click="handleClick()">添加分配</el-button>
<div class="assi_type">
<span>分配方式:</span>
<el-radio-group v-model="goodsInfoData.distributionType"
@change="changeRadio">
<el-radio :label="'0'">统一分配</el-radio>
<!-- <el-radio :label="'1'">按规格分配</el-radio> -->
</el-radio-group>
</div>
</div>
<div>
</div>
<specRelateStoreTable v-if="goodsInfoData.distributionType == '1'" @handleDelete="handleDelete" :warrantyTypeList="warrantyTypeList"></specRelateStoreTable>
<relateStoreTable v-if="goodsInfoData.distributionType == '0'" @handleDelete="handleDelete" :warrantyTypeList="warrantyTypeList"></relateStoreTable>
<assi-relate-store-dialog
v-show="speciRelateStoreVisible"
:speci-relate-store-visible="speciRelateStoreVisible"
:specification-value-list="specificationDialogList"
:base-goods-name="goodsInfoData.baseGoodsName"
:store-api="storeApi"
:base-goods-id="goodsInfoData.baseGoodsId"
:selected-scene-code="goodsInfoData.selectedSceneCode"
@handleSpeciRelateStoreConfirm="handleSpeciRelateStoreConfirm"
@handleSpeciRelateStoreClose="handleSpeciRelateStoreClose">
</assi-relate-store-dialog>
<relate-store-dialog
v-if="relateStoreVisible"
ref="formRelateStore"
:relate-store-visible="relateStoreVisible"
:source-page="sourcePage"
:store-api="storeApi"
:selected-scene-code="goodsInfoData.selectedSceneCode"
:store-search-form="storeSearchForm"
:store-selected="storeSelected"
@handleRelateStoreConfirm="handleRelateStoreConfirm"
@handleRelateStoreClose="handleRelateStoreClose">
<el-row slot>
<el-form
:model="storeSearchForm"
ref="relate"
:inline="true">
<el-form-item label="园区店:">
<el-input
v-model.trim="storeSearchForm.yqMerchantName"
placeholder="园区店名称"
@keydown.native="handleStoreInput"
clearable />
</el-form-item>
<el-form-item label="4S店:">
<el-input
v-model.trim="storeSearchForm.merchantName"
placeholder="4S店名称"
@keydown.native="handleStoreInput"
clearable />
</el-form-item>
<el-button type="primary" @click="handleSearchStore">搜索</el-button>
</el-form>
</el-row>
</relate-store-dialog>
</div>
</template>
<script>
import { deepClone } from '@/common/util'
import specRelateStoreTable from './specRelateStoreTable.vue'
import relateStoreTable from './relateStoreTable.vue'
import assiRelateStoreDialog from './assiRelateStoreDialog.vue'
import relateStoreDialog from './relateStoreDialog.vue'
import { getSpecDataByMerchent, saveAssignBySpec } from '@/api/commodity'
import { mapGetters, mapMutations } from 'vuex'
export default {
name: 'distributionForm',
components: {
specRelateStoreTable,
relateStoreTable,
assiRelateStoreDialog,
relateStoreDialog
},
props: {
storeApi: {
type: Function,
default: () => { }
}
},
data() {
return {
warrantyTypeList: [{
confId: 0,
confLabel: '质保卡'
}, {
confId: 1,
confLabel: '质保权益卡'
}],
relateStoreVisible: false,
storeSelected: [],
speciRelateStoreVisible: false,
specificationDialogList: [],
storeSearchForm: {
yqMerchantName: '',
merchantName: ''
},
sourcePage: 'editProduct',
}
},
mounted() {
},
computed: {
...mapGetters('goodsInfoData', {goodsInfoData: 'getGoodsInfoData'})
},
methods: {
...mapMutations('goodsInfoData', ['setUpdateGoodsInfo']),
changeRadio(data) {
this.goodsInfoData.distributionType = data
},
handleClick() {
const _this = this
// 1提交 2保存 3关联门店
_this.$emit('checkGoodsInfo', 3, () => {
if (_this.goodsInfoData.distributionType == '0') {
_this.storeSelected = deepClone(_this.goodsInfoData.linkMerchants)
_this.relateStoreVisible = true
}
if (_this.goodsInfoData.distributionType == '1') {
_this.filterSelectData()
}
})
},
filterSelectData() {
// 已有关联门店
if (this.goodsInfoData.speciLinkMerchants?.length) {
getSpecDataByMerchent({ baseGoodsId: this.goodsInfoData.baseGoodsId }).then(res => {
const arr = []
res.forEach(val => {
const merchantIds = []
val.merchantList.forEach(i => {
merchantIds.push( i.merchantName + ' ' + i.merchantId)
})
arr.push({
id: val.id,
specificationData: val.specificationData,
selectedMerchantIds: merchantIds
})
})
this.speciRelateStoreVisible = true
this.specificationDialogList = arr
})
} else {
// 第一次关联
this.speciRelateStoreVisible = true
this.specificationDialogList = JSON.parse(JSON.stringify(this.goodsInfoData.goodsSpecificationList))
}
},
handleStoreInput(e) {
(e.keyCode === 13) && this.handleSearchStore()
},
// 门店搜索
handleSearchStore() {
this.$refs.formRelateStore.handleCurrentChange(1)
},
handleRelateStoreConfirm(selectedData) {
if (!selectedData.length) {
this.$message({
message: '请选择关联门店',
type: 'warning',
showClose: true
})
return true
}
selectedData.forEach(val => {
val.merchantName = val.merchantName ? val.merchantName : (val.merchant?.merchantName || '')
val.merchantId = val.merchantId ? val.merchantId : (val.merchant?.merchantId || '')
val.yqMerchantName = val.yqMerchantName ? val.yqMerchantName : (val.yqMerchant?.merchantName || '')
val.yqMerchantId = val.yqMerchantId ? val.yqMerchantId : (val.yqMerchant?.MerchantId || '')
})
this.relateStoreVisible = false
this.$set(this.goodsInfoData, 'linkMerchants', selectedData)
this.$set(this.goodsInfoData, 'distributionType', '0')
this.setUpdateGoodsInfo(this.goodsInfoData)
},
handleRelateStoreClose() {
this.relateStoreVisible = false
},
// 按规格关联弹窗关闭
handleSpeciRelateStoreClose() {
this.speciRelateStoreVisible = false
},
// 按规格关联 保存
handleSpeciRelateStoreConfirm(data) {
// 保存关联门店
saveAssignBySpec({
baseGoodsId: this.goodsInfoData.baseGoodsId,
upgradeGoodsMerchantRefList: data
}).then(() => {
// 获取详情
this.$emit('getGoodsInfo', this.goodsInfoData.baseGoodsId)
this.speciRelateStoreVisible = false
})
},
handleDelete(num, item) {
var filterArr = []
if (num == 1) { // 统一关联
filterArr = this.goodsInfoData.linkMerchants.filter(i => i.merchantId !== item.merchantId)
this.$set(this.goodsInfoData, 'linkMerchants', filterArr)
}
if (num == 2) {
filterArr = this.goodsInfoData.speciLinkMerchants.filter(i => i.merchantId !== item.merchantId)
this.$emit('saveAssignByMerchantEvent', filterArr, true)
}
},
}
}
</script>
<style lang="scss">
.distribution-form{
font-size: 14px;
.add-btns {
display: flex;
justify-content: space-between;
.el-button {
width: 140px;
margin: 0 16px 30px 0;
}
}
}
</style>
......@@ -224,7 +224,7 @@ export default {
this.selectingData.forEach(item => {
var isExit = this.selectedData.findIndex(subItem => subItem.merchantId === item.merchantId)
var isServed = item.hasOwnProperty('beServed') ? item.beServed : false
if (selection.length && (isExit === -1) && !isServed) {
if (selection.length && (isExit === -1) && !isServed && item.isSetUpgradeSettleRule) {
this.selectedData.push(item)
} else if (!selection.length && (isExit !== -1)) {
this.selectedData.splice(isExit, 1)
......
<template>
<div>
<el-table
:data="goodsInfoData.linkMerchants"
style="width: 100%"
border
class="store-table">
<el-table-column
prop="merchantName"
label="门店名称"
align="center" />
<el-table-column
prop="yqMerchantName"
label="园区店名称"
align="center" />
<el-table-column
prop="warrantyType"
label="质保类型"
align="center"
width="205">
<template slot-scope="scope">
<span>
<el-select
style="width: 90%;"
v-model="scope.row.warrantyType">
<el-option
v-for="item in warrantyTypeList"
:key="item.confId"
:label="item.confLabel"
:value="item.confId" />
</el-select>
</span>
</template>
</el-table-column>
<el-table-column
label="删除"
align="center"
width="90">
<template slot-scope="scope">
<el-button
type="text"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
name: 'relateProTable',
props: {
warrantyTypeList: {
type: Array,
default: []
}
},
data() {
return {
}
},
computed: {
...mapGetters('goodsInfoData', {goodsInfoData: 'getGoodsInfoData'})
},
methods: {
handleDelete(item) {
this.$confirm('是否确认解绑该关联商品?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$emit('handleDelete', 1, item)
})
}
}
}
</script>
<template>
<div class="d2-form-block sourceMaterial-form" id="sourceMaterial-form">
<p class="edit-sub-title title-backgroud">选SPU</p>
<el-form :model="goodsInfoData"
:rules="rules"
ref="sourceMaterialForm"
v-loading="$store.state.d2admin.loading.value">
<el-form-item
prop="goodsId"
label="选择SPU:"
label-width="140px"
class="dis-in-block"
style="margin-bottom: 22px">
<el-cascader
v-model="goodsInfoData.goodsId"
:options="thiredMaterialList"
placeholder="请选择SPU"
class="form-item-block"
filterable
:disabled="goodsInfoData.status == 1 || goodsInfoData.status == 2"
@change="changeSelect" />
</el-form-item>
<div v-if="goodsInfoData.goodsCode">
<el-form-item
prop="goodsTypeName"
label="类目:"
label-width="140px"
class="dis-in-block"
style="margin-bottom: 22px">
<el-input
v-model.trim="goodsInfoData.goodsTypeName"
class="form-item-block"
:disabled="true">
</el-input>
</el-form-item>
<el-form-item
prop="goodsTypeName"
label="附带信息:"
label-width="140px"
class="dis-in-block"
style="margin-bottom: 22px"
>
<div class="other-message-box">
<img
class="goods-image"
v-for="(val, indx) in goodsInfoData.thumbUrl"
:key="indx"
:src="val.content ? val.content : val">
<div style="width: 100%;">
<div class="line-block">
<span class="message-item-span">
<span class="label">场景:</span>
{{ goodsInfoData.sceneName || '--' }}
</span>
<span class="message-item-span">
<span class="label">品牌:</span>
{{ goodsInfoData.brandMerchantName || '--' }}
</span>
<span class="message-item-span">
<span class="label">供应方:</span>
{{ goodsInfoData.supplierName || '--' }}
</span>
</div>
<span class="message-item-block" v-if="goodsInfoData.goodsType == 1">
<span class="label">适用车型:</span>
{{ goodsInfoData.applicableModelNames || '--' }}
</span>
<span class="message-item-block" v-if="goodsInfoData.goodsType == 1">
<span class="label">部位:</span>
{{ goodsInfoData.positionNames || '--' }}
</span>
<span class="message-item-block" v-if="goodsInfoData.selectedSceneCode == 0">
<span class="label">包含服务项目:</span>
<span>{{ goodsInfoData.serviceItems || '--' }}</span>
</span>
</div>
</div>
</el-form-item>
</div>
</el-form>
</div>
</template>
<script>
import { deepClone } from '@/common/util'
import { getProductInfo } from '@/api/product'
import { positionTypeList, applicableModelTypeList, BaseData } from '@/common/constants'
import { mapMutations, mapGetters, mapActions } from 'vuex'
export default {
name: 'sourceMaterial',
data() {
return {
rules: {
goodsId: [{ required: true, message: '请选择素材', trigger: 'change' }],
}
}
},
props: {
thiredMaterialList: {
type: Array,
default: []
}
},
computed: {
...mapGetters('goodsInfoData', { goodsInfoData: 'getGoodsInfoData' })
},
mounted() {
this.getProductServiceItemList()
},
methods: {
...mapMutations('goodsInfoData', ['setUpdateGoodsInfo']),
...mapActions({
get: 'd2admin/base/get'
}),
async getProductServiceItemList() {
this.productServiceItemList = await this.get(BaseData.productServiceItemList)
},
changeSelect(value) {
// 获取素材详情数据
getProductInfo({
id: value.constructor === Array ? value[value.length - 1] : value
}).then(tempVal => {
let selectedPositions = tempVal?.goodsPositionList?.map((val) => {return val.position})
let ObjData = {
goodsName: tempVal.goodsName,
goodsTypeName: tempVal.goodsTypeName,
thumbUrl: [tempVal.thumbUrl],
sceneName: tempVal.sceneName,
brandMerchantName: tempVal.brandMerchantName,
supplierName: tempVal.supplierName,
goodsType: tempVal.goodsType,
goodsId: value,
positionNames: tempVal.goodsType == 1 ? deepClone(positionTypeList).filter(val => selectedPositions?.indexOf(val.position) > -1).map(item => item.confName).join('/') : '',
applicableModelNames: tempVal.goodsType == 1 ? deepClone(applicableModelTypeList).filter(val => tempVal?.carTypeList?.indexOf(val.confId) > -1).map(item => item.confName).join('/') : '',
goodsCode: tempVal.goodsCode,
goodsPositionList: selectedPositions,
status: this.goodsInfoData.status,
linkMerchants: [],
speciLinkMerchants: [],
selectedSceneCode: tempVal.sceneType,
serviceItems: this.productServiceItemList.map(v => {return v.serviceName})?.join(',') // 暂时不可配置 拿所有服务项目
}
this.setUpdateGoodsInfo(ObjData)
})
}
}
}
</script>
<style lang="scss">
.sourceMaterial-form{
.dis-in-block{
.form-item-block{
width: 400px;
}
.goods-image {
width: 100px;
height: 100px;
margin-right: 20px;
flex-shrink: 0;
}
.other-message-box{
display: flex;
padding: 16px;
background: #F9F9F9;
.line-block{
display: flex;
.message-item-span{
flex: 1;
.label{
flex-shrink: 0;
display: inline-block;
color: #666666;
width: 154px;
text-align: right;
}
}
}
.message-item-block{
display: flex;
.label{
flex-shrink: 0;
color: #666666;
width: 154px;
text-align: right;
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<div>
<el-table
:data="goodsInfoData.speciLinkMerchants"
style="width: 100%"
border
class="store-table">
<el-table-column prop="merchantName"
label="门店名称"
align="center" />
<el-table-column prop="yqMerchantName"
label="园区店名称"
align="center" />
<el-table-column prop="upgradeGoodsList"
label="规格"
align="center">
<template slot-scope="scope">
<span>
<span v-for="(item, index) in scope.row.upgradeGoodsList"
:key="index">{{ item.specificationData.replace(/;~;/g, ' ') }}<span
v-if="index !== scope.row.upgradeGoodsList.length - 1">;</span></span>
</span>
</template>
</el-table-column>
<el-table-column prop="warrantyType"
label="质保类型"
align="center"
width="205">
<template slot-scope="scope">
<span>
<el-select style="width: 90%;"
v-model="scope.row.warrantyType">
<el-option v-for="item in warrantyTypeList"
:key="item.confId"
:label="item.confLabel"
:value="item.confId" />
</el-select>
</span>
</template>
</el-table-column>
<el-table-column label="删除"
align="center"
width="90">
<template slot-scope="scope">
<el-button type="text"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
name: 'specRelateStoreTable',
props: {
warrantyTypeList: {
type: Array,
default: []
}
},
data() {
return {
}
},
computed: {
...mapGetters('goodsInfoData', {goodsInfoData: 'getGoodsInfoData'})
},
methods: {
handleDelete(item) {
this.$confirm('是否确认解绑该关联商品?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$emit('handleDelete', 2, item)
})
},
}
}
</script>
\ No newline at end of file
......@@ -53,7 +53,7 @@
v-for="(item,index) in commodityInfo.upgradeGoodsList"
:key="index">
<p class="car-sub-head">
商品{{ index + 1 }}-{{ item.specificationData ? (item.goodsInfo.goodsName + ' ' + item.specificationData.replace(/;~;/g, ' ')) : item.goodsInfo.goodsName }}
商品{{ index + 1 }}-{{ item.upgradeGoodsName }}
</p>
<!-- <el-form-item class="d2-drawer-item"
label="商品名称:">
......@@ -203,10 +203,7 @@ export default {
},
mounted() {
console.log(this.userInfo)
console.log(this.userInfo.loginAccount.userName)
const $store = this.$store.getters['d2admin/auth/curBtns']
// console.log($store)
const btnId = '9030207' // 审核权限ID
const _item = $store.find(i => (i.authId === btnId))
if (_item) {
......@@ -236,7 +233,6 @@ export default {
},
handleReview(info, review) {
console.log(info)
var html = {
1: '通过',
2: '驳回'
......
<!-- 产品编辑(素材管理) -->
<template>
<d2-container class="edit-product">
<d2-form v-if="show"
<productForm v-if="show"
ref="d2ProductForm"
:rules="rules"
:add-or-edit="addOrEdit"
......@@ -18,18 +18,21 @@
class="edit-title">
{{ addOrEdit === 'add' ? '新增素材' : '编辑素材' }}
</p>
</d2-form>
</productForm>
</d2-container>
</template>
<script>
// import _ from 'lodash'
import { deepClone } from '@/common/util'
import { mapActions } from 'vuex'
import { BaseData, brandMerchantList, sceneCodeList } from '@/common/constants.js'
import { sceneCodeList } from '@/common/constants.js'
import { addGoods, editGoods, getBrandSupplyMerchant, addBrandSupplyMerchant, editBrandSupplyMerchant, getProductTypeBySceneId } from '@/api/product'
import productForm from './d2-form/productForm.vue'
export default {
name: 'EditProduct',
components: {
productForm: productForm
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
......@@ -51,8 +54,9 @@ export default {
},
trigger: 'change'
}],
// thumbUrl: [{ required: true, message: '请选择缩略图', trigger: 'change' }],
thumbUrlList: [{ required: true, message: '请选择缩略图', trigger: 'blur' }]
thumbUrlList: [{ required: true, message: '请选择缩略图', trigger: 'blur' }],
positionIds: [{ required: true, message: '请选择部位', trigger: 'change' }],
convertedValue: [{ required: true, message: '请输入比例换算', trigger: 'change'}]
},
editData: {
merchantId: '',
......@@ -75,17 +79,16 @@ export default {
orderNo: 0,
content: ''
}],
videoUrl: ''
videoUrl: '',
convertedValue: '',
positionIds: [],
carTypeList: [1, 2, 3, 4],
goodsPositionList: []
},
proFormRef: 'pro',
editForm: [{
title: '素材基本信息',
formBlock: [
// {
// name: 'yqMerchantId',
// label: '园区店',
// type: 'select'
// },
{
name: 'goodsName',
label: '产品名称',
......@@ -107,7 +110,6 @@ export default {
label: '类目',
isRequired: true,
type: 'select',
// tips: '选择产品类目',
isClear: false,
optionList: [],
optionId: 'categoryType',
......@@ -124,7 +126,6 @@ export default {
label: '品牌方',
isRequired: true,
type: 'special-select',
// tips: '选择品牌方',
isClear: true,
optionList: [],
optionId: 'id',
......@@ -136,7 +137,6 @@ export default {
label: '供应方',
isRequired: true,
type: 'special-select',
// tips: '选择品牌方',
isClear: true,
optionList: [],
optionId: 'id',
......@@ -185,6 +185,12 @@ export default {
this.editData.thumbUrlList = [{
content: ''
}]
// 太阳膜默认适用全部车型 部位回显
if (this.editData.goodsType == 1) {
this.editData.carTypeList = deepClone(this.$route.params.form).carTypeList ? deepClone(this.$route.params.form).carTypeList : [1, 2, 3, 4]
this.editData.positionIds = deepClone(this.$route.params.form)?.goodsPositionList?.map(item => { return item.position })
}
this.editData.goodsVideoList = []
// 获取场景下类目
if ((this.editData.sceneType ?? '') !== '') {
......@@ -196,13 +202,11 @@ export default {
this.show = true
})
} else {
// this.editData.yqMerchantId = this.userInfo.beSuper ? '' : this.userInfo.detail.merchantId
this.show = true
}
// 获取品牌方/供应方数据 1品牌商 2供应方
this.getBrandSupplyList(1)
this.getBrandSupplyList(2)
this.getBaseData()
this.editForm[0].formBlock[1].optionList = sceneCodeList
},
......@@ -211,11 +215,6 @@ export default {
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
async getBaseData() {
// const temp = await this.get(BaseData.productType)
// this.baseData.productType = temp
// this.editForm[0].formBlock[2].optionList = temp
},
handleAddClose(isRefresh = false) {
this.close({ tagName: '/product' })
this.$router.push({ name: 'product' })
......@@ -259,8 +258,11 @@ export default {
thumbUrl: data.thumbUrl,
videoUrl: data.videoUrl,
goodsImgList: data.goodsImgList,
goodsDescList: data.goodsDescList
goodsDescList: data.goodsDescList,
goodsPositionList: data.goodsPositionList || [],
carTypeList: data.carTypeList,
convertedValue: data.convertedValue,
productServiceItemList: data.productServiceItemList
}
params.goodsImgList.forEach(i => {
delete i.createdDate
......
......@@ -8,7 +8,7 @@
:search-form="searchForm"
@handleChangeSelect="handleChangeSelect"
:form-data="showFormData">
<!-- <p>
<!-- <p>
<el-input
size="small"
class="custom-input"
......@@ -277,7 +277,7 @@ export default {
}
},
handleAdd(form) {
this.close({ tagName: '/editProduct' })
// this.close({ tagName: '/editProduct' })
this.$router.push({
name: 'editProduct',
params: {
......
......@@ -71,33 +71,33 @@
<!-- 已分帐无可操作内容 -->
<div v-if="scope.scope.inputStatus !== '6'">
<el-button type="text"
v-if="scope.scope.inputStatus == '1'"
@click="orderDetail(scope.scope)">
v-if="scope.scope.inputStatus == '1'"
@click="orderDetail(scope.scope)">
订单详情
</el-button>
<el-button type="text"
v-if="scope.scope.inputStatus == '0'"
@click="relatActivityOrder(scope.scope)">
v-if="scope.scope.inputStatus == '0'"
@click="relatActivityOrder(scope.scope)">
关联活动订单
</el-button>
<el-button type="text"
v-if="scope.scope.inputStatus == '4'"
@click="record(scope.scope)">
v-if="scope.scope.inputStatus == '4'"
@click="record(scope.scope)">
确认补录
</el-button>
<el-button type="text"
v-if="scope.scope.inputStatus == '4'"
@click="cancelRelat(scope.scope)">
v-if="scope.scope.inputStatus == '4'"
@click="cancelRelat(scope.scope)">
取消关联
</el-button>
<el-button type="text"
v-if="scope.scope.inputStatus == '5'"
@click="chooseRule(scope.scope)">
v-if="scope.scope.inputStatus == '5'"
@click="chooseRule(scope.scope)">
发起分账
</el-button>
<el-button type="text"
v-if="scope.scope.manualFlag == '1'"
@click="ruleHistory(scope.scope)">
v-if="scope.scope.manualFlag == '1'"
@click="ruleHistory(scope.scope)">
分账记录
</el-button>
</div>
......@@ -131,7 +131,7 @@
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { getParkStore } from '@api/editCustomer'
import { getServiceStore, getParkStore } from '@api/editCustomer'
import { payTypeList } from '@/common/constants.js'
import { waitinputorderCount, waitinputorderPage, getList, markAsNoUse, batchUpdateToNotInput, batchUpdateConfirmInput } from '@api/order'
import updateYqMerchantDialog from './updateYqMerchantDialog'
......@@ -158,7 +158,8 @@ export default {
inputStatus: '',
yqMerchantId: '',
posTrmNo: '',
payType: ''
payType: '',
shopMerchantId: ''
},
searchFormSearch: {},
searchSelectObj: {
......@@ -215,7 +216,36 @@ export default {
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'parkServiceList'
optionsName: 'parkServiceList',
changeAttr: (value, targetItem) => {
if (value) {
// 获取流量方
this.getServiceStore(value)
} else {
this.baseData.storeIdList = []
}
this.searchForm.shopMerchantId = ''
this.getOptionsList()
}
}, {
label: '流量来源',
name: 'shopMerchantId',
type: 'select',
noDataText: '请先选择服务对接',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'storeIdList',
// changeAttr: (value, targetItem) => {
// if (value) {
// // // 获取二级流量方
// this.getDiversionMerchantRef(value)
// } else {
// this.baseData.subShopMerchantList = []
// }
// this.searchForm.subShopMerchantId = ''
// this.getOptionsList()
// }
}, {
label: '终端编码',
name: 'posTrmNo',
......@@ -280,6 +310,15 @@ export default {
// label: '园区店商户号',
prop: 'yqMerchantId',
width: '120px'
}, {
label: '流量方',
prop: 'shopMerchantName',
width: '200px'
},
{
label: '流量方商户号',
prop: 'shopMerchantId',
width: '120px'
},
{
label: '通知状态',
......@@ -343,7 +382,8 @@ export default {
confLabel: '已分帐'
}
],
payTypeList: clonePayTypeList
payTypeList: clonePayTypeList,
storeIdList: [],
},
merchantDialogVisible: false,
......@@ -434,7 +474,8 @@ export default {
inputStatus: '',
yqMerchantId: '',
posTrmNo: '',
payType: ''
payType: '',
shopMerchantId: ''
}
this.searchSelectObj = {
orderOrTrade: {
......@@ -442,6 +483,7 @@ export default {
value: ''
}
}
this.baseData.storeIdList = []
this.$refs.recordTable.refreshTable()
this.getCount()
},
......@@ -669,7 +711,16 @@ export default {
if (flag) {
this.$refs.recordTable.refreshTable()
}
}
},
getServiceStore(merchantId) {
getServiceStore({
yqMerchantId: merchantId
}).then(res => {
this.baseData.storeIdList = res || []
this.getOptionsList()
})
},
}
}
......
......@@ -121,7 +121,16 @@ export default {
prop: 'goodsName',
formatter: (cellValue) => {
if (cellValue.subOrderList && cellValue.subOrderList.length > 0) {
return cellValue.subOrderList[0].goodsName
return cellValue.subOrderList.reduce((str, item, index) => {
// return item.goodsName
if (index) {
str += '/' + item.goodsName
} else {
str += item.goodsName
}
return str
}, '')
// return cellValue.subOrderList[0].goodsName
} else {
return ''
}
......@@ -135,7 +144,7 @@ export default {
prop: 'merchantName'
// width: '200px'
}, {
label: '支付总价',
label: '尾款总额',
prop: 'balancePaymentPrice',
formatter: (cellValue) => {
return cellValue.balancePaymentPrice ? '¥' + cellValue.balancePaymentPrice : ''
......
<!-- 选择分账规则弹窗 -->
<template>
<d2-dialog title="查看分账操作记录"
:is-visible="ruleInfoVisible"
class="ruleInfoDialog"
width="60%"
@closeDialog="handleClose">
<el-form class="rule-form"
label-width="110px"
:inline="true">
<el-form-item class="d2-drawer-item"
label="订单所属商户:">
<d2-dialog title="查看分账操作记录" :is-visible="ruleInfoVisible" class="ruleInfoDialog" width="60%" @closeDialog="handleClose">
<el-form class="rule-form" label-width="110px" :inline="true">
<el-form-item class="d2-drawer-item" label="订单所属商户:">
<span>{{ recordInfo.merchantName }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="主订单编号:">
<el-form-item class="d2-drawer-item" label="主订单编号:">
<span>{{ recordInfo.inputtedOrderCode }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="订单金额:">
<el-form-item class="d2-drawer-item" label="订单金额:">
<span>{{ recordInfo.totalFee ? '¥' + recordInfo.totalFee / 100 : '' }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="支付时间:">
<el-form-item class="d2-drawer-item" label="支付时间:">
<span>{{ recordInfo.accountDate }}</span>
</el-form-item>
</el-form>
<div class="fontD">已应用分账规则:</div>
<div>
<div class="merchant-checkrecord">
<div class="account-detail"
ref="accountDetail">
<div class="account-detail" ref="accountDetail">
<div v-if="ruleInfo">
<p class="sub-title"
:class="{ 'sub-border': !ruleInfo.show }">
<p class="sub-title" :class="{ 'sub-border': !ruleInfo.show }">
<span class="label">
<span>{{ ruleInfo.formatEffectStartDate }}</span>
<span v-if="ruleInfo.formatEffectStartDate"> - </span>
<span :class="{ labelColor: !ruleInfo.formatEffectEndDate }">{{
ruleInfo.formatEffectStartDate
? ruleInfo.formatEffectEndDate
? ruleInfo.formatEffectEndDate
? ruleInfo.formatEffectEndDate
: "生效中"
: "待生效"
: "生效中"
: "待生效"
}}</span>
</span>
<span class="updatedInfo">
......@@ -51,26 +39,19 @@
</p>
</div>
<div v-else
class="nothingtips">
<img style="height: 109px; width: 109px"
src="../systemConfig/merchant/images/empty.png" />
<div v-else class="nothingtips">
<img style="height: 109px; width: 109px" src="../systemConfig/merchant/images/empty.png" />
<p class="title">暂无财务规则</p>
<p class="tips">快去设置看看~</p>
</div>
</div>
</div>
</div>
<el-form class="rule-form"
style="marginTop:35px"
label-width="110px"
:inline="true">
<el-form-item class="d2-drawer-item"
label="分账操作人:">
<el-form class="rule-form" style="marginTop:35px" label-width="110px" :inline="true">
<el-form-item class="d2-drawer-item" label="分账操作人:">
<span>{{ recordInfo.updatedBy }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="分账操作时间:">
<el-form-item class="d2-drawer-item" label="分账操作时间:">
<span>{{ recordInfo.updatedDate }}</span>
</el-form-item>
</el-form>
......@@ -82,7 +63,7 @@ import dayjs from "dayjs"
import { Util, deepClone } from '@/common/util'
import { getDivisionRecordById } from '@api/order'
export default {
name: "ruleInfoDialog",
name: "RuleInfoDialog",
props: {
ruleInfoVisible: {
type: Boolean,
......@@ -158,15 +139,18 @@ export default {
handleClose() {
this.$emit('dialogClose')
}
},
}
}
</script>
<style lang="scss" scoped>
$color: #2a58ad;
.merchant-checkrecord {
padding-left: 20px;
padding-right: 16px;
padding-bottom: 20px;
.account-detail {
// height: 400px;
// height: calc(100vh - 200px);
......@@ -174,6 +158,7 @@ $color: #2a58ad;
overflow-y: scroll;
overflow-x: hidden;
}
.sub-title {
font-weight: 700;
color: #333333;
......@@ -191,57 +176,70 @@ $color: #2a58ad;
padding-left: 8px;
width: 37%;
}
.labelColor {
color: #0947c6;
}
.updatedInfo {
width: 40%;
text-align: left;
}
.collapse {
padding-right: 20px;
color: #0947c6;
cursor: pointer;
.arrow {
transition: all 1s;
}
.move {
transform: rotate(-180deg);
}
}
}
.sub-border {
animation: border-delay 1s forwards;
}
@keyframes border-delay {
0% {
/* opacity: 0; */
/* right: -100%; */
}
100% {
border-bottom: 1px solid #d8d8d8;
}
}
.nothingtips {
// align-items: center;
text-align: center;
font-size: 16px;
padding-top: 40px;
.title {
font-size: 20px;
color: #666;
margin: 16px 0;
}
.tips {
font-size: 12px;
color: #999;
}
}
.title {
}
.title {}
.type {
margin-top: 6px;
display: flex;
.btn {
width: 96px;
height: 40px;
......@@ -251,6 +249,7 @@ $color: #2a58ad;
text-align: center;
cursor: pointer;
}
.act {
font-weight: 500;
color: $color;
......@@ -258,12 +257,14 @@ $color: #2a58ad;
}
}
}
.rule-form {
padding: 0 20px 20px;
margin-bottom: 20px;
background: #ffffff;
margin: 0 0 0 10px;
}
.rule-form .d2-drawer-item {
font-family: PingFangSC-Regular;
font-size: 14px;
......@@ -272,6 +273,7 @@ $color: #2a58ad;
width: 25%;
margin: 0 0 0 0;
}
.fontD {
margin: 10px 20px 15px;
}
......
<template>
<el-drawer class="shoppingCartDrawerCon" title="收货地址管理" size="500px" :visible.sync="dialogShow" :direction="direction">
<glsx-combi-form class="edit-form-container" ref="editFormRef" label-width="100px" default-width="350px"
:form-ref="editChildRef" :form-obj="editForm" :form-data="editFormData" :form-rules="editRule"></glsx-combi-form>
<div class="footer">
<el-button @click="submit" type="primary">保存</el-button>
<el-button @click="dialogShow = false">取消</el-button>
</div>
</el-drawer>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { addressSave } from '@/api/purchaseShopping'
export default {
name: 'AddressCom',
props: {
visible: {
type: Boolean,
default: false
},
addressInfo: {
type: Object,
default: () => {
return {}
}
}
},
data() {
function checkPhone(rule, value, callback) {
if (!Util.checkPhone(value)) {
callback(new Error('请输入正确的手机号码'))
return false
}
callback()
}
return {
direction: 'rtl',
editFormData: [
{
label: '收货人',
name: 'contactName',
type: 'input',
maxlength: 10,
placeholder: '请输入姓名'
},
{
label: '收货人电话',
name: 'contactPhone',
type: 'input',
maxlength: 20,
placeholder: '请输入电话号码'
},
{
label: '收货地址',
name: 'contactAddress',
type: 'input',
maxlength: 50,
placeholder: '请输入收货地址',
inputType: 'textarea'
// tips: '如XX店车主关怀活动'
}
],
editForm: {
contactName: '',
contactPhone: '',
contactAddress: ''
},
editRule: {
contactName: [{ required: true, message: '请输入姓名', trigger: 'change' }],
contactPhone: [{ required: true, message: '请输入电话号码', trigger: 'change' },
{ validator: checkPhone, trigger: 'blur' }],
contactAddress: [{ required: true, message: '请输入收货地址', trigger: 'change' }]
},
editChildRef: 'editChildRef'
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
},
watch: {
visible(val) {
if (val) {
this.editForm = this.addressInfo ? deepClone(this.addressInfo) : {}
}
}
},
methods: {
handleDetailClose() {
},
handleOkFn() {
console.log('您点击了确定')
},
handleRestFn() {
console.log('您点击了取消')
},
submit() {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
console.log(valid)
if (valid) {
const params = deepClone(this.editForm)
addressSave(params).then((result) => {
this.$notify({
type: 'success',
title: '保存成功'
})
this.dialogShow = false
this.$emit('handleConfirmAddress')
}).catch((err) => {
})
// this.infoForm.idList = this.idList
// var params = deepClone(this.infoForm)
}
})
},
navBack() {
}
}
}
</script>
<style lang="scss" scoped>
.shoppingCartDrawerCon {
// position: relative;
::v-deep .el-drawer__header {
border-bottom: 1px solid #e7eaec;
margin-bottom: 20px;
padding-bottom: 10px;
font-weight: 600;
font-size: 20px;
}
.footer {
text-align: center;
}
}
</style>
<template>
<!-- <div>商品详情</div> -->
<baseDialog :is-show.sync="dialogShow" :config="dialogConfig.setting" :dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose">
<div class="detail-content">
<!-- 商品详情 -->
<div class="goodsInfoCom">
<div class="goodsInfoCom__left">
<img :src="goodsInfo.thumbUrl" alt="">
</div>
<div class="goodsInfoCom__right">
<p class="title two-line-ellipsis">{{ goodsInfo.goodsName }}</p>
<div class="priceCon">
<span class="price">价格: <span class="priceNum">¥{{ handleItemInfo.purchasePrice }}</span></span>
<span class="turnover">成交量: <span class="num">{{ goodsInfo.purchaseOrderCount || 0 }}笔</span></span>
</div>
<div class="skuCon">
<div class="label">规格:</div>
<div class="itemCon">
<div class="skuItem one-line-ellipsis pointer" :class="{ active: index === selectIndex }"
v-for="(item, index) in goodsInfo.upgradeGoodsList" :key="index"
@click="selectIndex = index; setHandleItemInfo(item)">{{ item.upgradeGoodsName }}
</div>
</div>
</div>
<div class="munCom">
<div class="label">数量:</div>
<div class="munItem">
<el-input-number v-model="handleItemInfo.goodsNumber" :min="1" :max="9999"></el-input-number>
</div>
<div class="tips">
<!-- goodsItem.goodsType == 1 -->
{{ membraneTypeList.includes(goodsInfo.goodsType) ? `卷(1卷=${goodsInfo.convertedValue || 30}米)` : '件' }}
</div>
</div>
<el-button class="carBtn" icon="carIcon" type="primary" @click="updateCarShopping">加入购物车</el-button>
</div>
<!-- <i class="carIcon"></i> -->
</div>
<h3>产品详情</h3>
<div class="goodsDescList">
<div class="goodsDescItem" v-for="(item, index) in goodsInfo.goodsDescList" :key="index">
<img :src="item.content" v-if="item.resType == 1" class="productDetailsImg" alt="">
<!-- <div class="goodsDescItem__title">{{ item.title }}</div> -->
<div v-if="item.resType == 2" class="goodsDescItem__content" v-html="item.content"></div>
</div>
</div>
</div>
</baseDialog>
</template>
<script>
// import from ''
import { getProductInfo } from '@/api/product'
import { shoppingCarAdd } from '@/api/purchaseShopping'
import { membraneTypeList } from '@/common/constants.js'
export default {
name: 'GoodsDetailCom',
props: {
visible: {
type: Boolean,
default: false
},
selectItemInfo: {
type: Object,
default: () => { }
},
goodsId: {
type: [String, Number]
// required: true
// default: '24'
}
},
data() {
return {
// dialogShow: false,
membraneTypeList,
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
// width: '720px',
btnList: [
]
},
config: {
title: '产品详情',
width: '1008px'
}
},
goodsInfo: {},
selectIndex: 0,
handleItemInfo: {
goodsNumber: 1,
upgradeGoodsId: '',
purchasePrice: 0
}
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
// selectItemInfo(){
// // this.goodsInfo[]
// if (this.goodsInfo.upgradeGoodsList.length) {
// let item = this.goodsInfo.upgradeGoodsList[this.selectIndex]
// return {
// goodsNumber: this.goodsInfo.num,
// upgradeGoodsId: item.id
// }
// }
// // return this.selectItemInfo
// }
},
watch: {
visible(val) {
if (val) {
this.getGoodsDetail()
}
}
},
methods: {
getGoodsDetail() {
getProductInfo({ id: this.goodsId }).then(res => {
this.goodsInfo = res
// 调试用
// for (let index = 0; index < 12; index++) {
// this.goodsInfo.upgradeGoodsList[index] = this.goodsInfo.upgradeGoodsList[0]
// }
// 默认选中第一个
const item = this.goodsInfo.upgradeGoodsList[0]
// console.log(item)
item && this.setHandleItemInfo(item)
})
},
setHandleItemInfo(item) {
console.log(item)
const { id, purchasePrice } = item
this.handleItemInfo = Object.assign(this.handleItemInfo, {
upgradeGoodsId: id,
purchasePrice
})
},
handleDetailClose() {
},
updateCarShopping() {
const params = {
goodsNumber: this.handleItemInfo.goodsNumber,
upgradeGoodsId: this.handleItemInfo.upgradeGoodsId
}
// 判断是否有值
params.upgradeGoodsId && shoppingCarAdd(params).then(res => {
// console.log(res)
this.$message.success('加入购物车成功')
this.$EventBus.$emit('updateCarShopping')
this.dialogShow = false
})
// this.$message.success('加入购物车成功')
// this.$EventBus.$emit('updateCarShopping')
}
}
}
</script>
<style lang="scss" scoped>
.goodsInfoCom {
display: flex;
.goodsInfoCom__left {
width: 400px;
height: 400px;
img {
width: 100%;
height: 100%;
}
}
.goodsInfoCom__right {
flex: 1;
margin-left: 20px;
.title {
margin: 0;
font-weight: 600;
font-size: 20px;
color: #333333;
}
.priceCon {
box-sizing: border-box;
width: 100%;
height: 65px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 10px;
margin: 16px 0 20px;
background: #f2f5fb;
border-radius: 2px;
color: #666666;
.price {
display: flex;
align-items: center;
margin-left: 8px;
}
.num {
margin-left: 8px;
}
.priceNum {
font-weight: 600;
font-size: 30px;
color: #ee3040;
}
}
.skuCon {
display: flex;
// flex-wrap: wrap;
// align-items: center;
.itemCon {
flex: 1;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.skuItem {
box-sizing: border-box;
width: 234px;
height: 36px;
background: #ffffff;
border: 1px solid #e7edf9;
border-radius: 2px;
color: #333333;
text-align: center;
line-height: 36px;
padding: 0 10px;
margin-bottom: 16px;
&.active {
border: 1px solid #185efe;
}
}
}
.label {
box-sizing: border-box;
width: 60px;
height: 36px;
text-align: center;
padding-left: 18px;
line-height: 36px;
color: #666666;
}
}
}
.productDetailsImg {
// width: 100%;
// height: 338px;
max-width: fit-content;
// min-width: fit-content;
}
.munCom {
display: flex;
margin-bottom: 20px;
.tips {
height: 36px;
line-height: 36px;
margin-left: 8px;
font-size: 12px;
color: #666666;
}
}
.carBtn {
// color: #ffffff;
// background-color: #185efe;
display: flex;
align-items: center;
}
</style>
<style>
.carIcon {
display: inline-block;
width: 22px;
height: 22px;
background: url(../images/shoppingCarIcon.webp) no-repeat;
background-size: 100% 100%;
margin-right: 4px;
}
</style>
<template>
<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">
<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" @refreshTable="refreshTable"
:table-data="detailInfo.tableData" :table-total="detailInfo.tableTotal">
</d2-table>
</div>
</div>
</baseDialog>
</template>
<script>
import { purchaseOrderDetail } from '@/api/purchaseShopping.js'
import { membraneTypeList } from '@/common/constants.js'
export default {
name: 'OrderDetailDialog',
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
dialogShow: {
get() {
if (this.visible) {
this.getDetail({ currentPage: 1, pageSize: 20 })
}
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: [
]
},
config: {
title: '详细信息',
width: '1010px'
}
},
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableColumns: [
{
label: '商品名称',
prop: 'upgradeGoodsName'
},
{
label: '系列',
prop: 'goodsName'
},
{
label: '所属分类',
prop: 'goodsTypeName'
},
{
label: '采购数量',
prop: 'goodsNumber',
formatter: (cellValue) => {
return membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.goodsNumber}卷/${cellValue.conversionValue ? cellValue.goodsNumber * cellValue.conversionValue : '-'}米` : `${cellValue.goodsNumber}件`
}
},
{
label: '采购总价/元',
prop: 'goodsTotalPrice',
formatter: (cellValue) => {
return "¥" + cellValue.goodsTotalPrice
}
}
]
},
detailInfo: {}
}
},
methods: {
handleDetailClose() {
this.dialogShow = false
},
refreshTable(pageObj) {
this.getDetail(pageObj)
},
getDetail(pageObj) {
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
})
}
}
}
</script>
<style lang="scss" scoped>
.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;
}
}
</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: "按(产值-流量成本-其他费用包含产品成本)比例"
// }
No preview for this file type
No preview for this file type
No preview for this file type
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!