Commit af55ee68 by 前端

Merge branch 'develop' into 'master'

Develop

See merge request !204
2 parents 3cc6c136 61daac62
Showing 46 changed files with 2043 additions and 620 deletions
......@@ -17,4 +17,10 @@ export function addProductManage(data) {
export function UpdateProductManage(data) {
data.method = `${path}productManager.update`
return request(data, 'post')
}
// 获取权益/升级类目服务项目
export function getProductServiceItems(data) {
data.method = `${path}vd.item.queryServiceItemsGradeConfig`
return request(data, 'post')
}
\ No newline at end of file
......@@ -73,7 +73,13 @@ export function getPurchaseOrderShipmentList(data) {
// 查看采购订单
export function purchaseOrderDetail(data) {
data.method = `${path}purchaseOrder.view`
return request(data)
return request(data, "post")
}
// 查看采购订单-仓库工厂
export function factoryOrderDetail(data) {
data.method = 'dj.api.smarcarlife.warehousedeliver.view'
return request(data, "post")
}
// 采购订单入库
......@@ -103,7 +109,7 @@ export function purchaseOrderCancelOrCheck(data) {
// 确认发货
export function purchaseOrderDelivery(data) {
data.method = "dj.api.smarcarlife.purchaseOrder.delivery"
return request(data)
return request(data, "post")
} // 发货单分页查询
export function purchaseOrderDeliveryPage(data) {
data.method = `${path}purchaseOrder.delivery.page`
......@@ -153,6 +159,12 @@ export function operatorreviewView(data) {
return request(data)
}
// 仓库/工厂发货-查看
export function factoryView(data) {
data.method = 'dj.api.smarcarlife.warehousedeliver.detail'
return request(data)
}
// 商务审核分页查询
export function businessreviewPage(data) {
data.method = `${path}businessreview.page`
......@@ -176,3 +188,45 @@ export function businessreviewView(data) {
data.method = `${path}businessreview.view`
return request(data)
}
// 工厂发货列表
export function warehousedeliverPage(data) {
data.method = `${path}warehousedeliver.page`
return request(data)
}
// 仓库/工厂发货-查看
export function warehousedeliverView(data) {
data.method = `${path}warehousedeliver.view`
return request(data)
}
// 批量添加卡号
export function deliveryCard(data) {
data.method = "dj.api.smarcarlife.purchaseOrder.generatedDeliveryCard"
return request(data, "post")
}
// 卡号excel导入
export function importDeliveryCard(data) {
data.method = "dj.api.smarcarlife.purchaseOrder.importDeliveryCard"
return request(data, "post", ["file"])
}
// 校验发货卡号
export function checkCard(data) {
data.method = "dj.api.smarcarlife.purchaseOrder.checkDeliveryCard"
return request(data, "post")
}
// 发货发=(查询账户中心-广联数科-仓库/工厂的角色列表)
export function getShipperList(data) {
data.method = "dj.api.smarcarlife.purchaseOrder.listShipper"
return request(data, "post")
}
// 保存发货方
export function saveshipper(data) {
data.method = "dj.api.smarcarlife.purchaseOrder.saveshipper"
return request(data, "post")
}
......@@ -106,3 +106,15 @@ export function merchantShopGoodsStockPage(data) {
data.method = `${path}merchantShopGoodsStock.page`
return request(data, RequestMethods.POST)
}
// 分页查询库存管理-权益卡
export function vdCardPage(data) {
data.method = `dj.smartcarlife.stock.vdCard.page`
return request(data, RequestMethods.POST)
}
// 统计库存管理-权益卡
export function vdCardCount(data) {
data.method = `dj.smartcarlife.stock.vdCard.count`
return request(data, RequestMethods.POST)
}
......@@ -90,9 +90,3 @@ 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)
}
......@@ -622,7 +622,8 @@ export const afterSaleStatusList = [
export const invouceType = [
{ confId: 1, confName: "未入库" },
{ confId: 2, confName: "已入库" }
{ confId: 2, confName: "已入库" },
{ confId: 3, confName: "部分入库" }
]
// 服务商管理 采购模式
export const procureModeList = [
......
<template>
<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">
{{ config.confirm_name }}
</el-button>
<el-button v-preventReClick @click="visible = false">
{{ config.cancel_name }}
</el-button>
</div>
</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,
type: Object,
default: function () {
return {
title: '提示',
width: '480px'
}
}
},
config: {
required: false,
type: Object,
default: function () {
return {
showClose: true,
appendToBody: false, // 是否将自身插入至 body 元素,有嵌套的弹窗时一定要设置
isShowFooter: true,
cancel_name: '取 消',
confirm_name: '确 定'
}
}
},
isShow: {
// 弹窗是否展示
type: Boolean,
default: false
}
// width: {
// //弹窗宽度
// type: String,
// default: '',
// },
// cancel_name: {
// //取消按钮名称
// type: String,
// default: '取 消',
// },
// confirm_name: {
// //确定按钮名称
// type: String,
// default: '确 定',
// },
// isShowFooter: {
// //是否自定底部
// type: Boolean,
// default: true,
// },
// closeClick: {
// type: Boolean,
// default: false,
// },
// appendToBody: {
// // 是否将自身插入至 body 元素,有嵌套的弹窗时一定要设置
// type: Boolean,
// default: false,
// },
},
data() {
return {}
},
computed: {
visible: {
get() {
return this.isShow
},
set(val) {
this.$emit('update:isShow', false)
}
}
},
methods: {
confirmBtn() {
// 触发保存
this.$emit('handleClick')
}
},
created() {
// console.log('baseDialog')
},
mounted() { }
}
</script>
<style scoped lang="scss">
::v-deep .el-dialog {
// height: 90vh;
border-radius: 6px;
// padding: 0;
overflow: hidden;
.el-dialog__header {
border-bottom: solid 1px #e6e6e6;
border-radius: 6px 6px 0px 0px;
padding: 18px 20px 18px 25px;
.el-dialog__title {
// color: #212121;
color: #333333;
font-family: PingFangSC-Medium;
font-size: 20px;
font-weight: 600;
// font-weight: 16px;
}
.el-dialog__close {
color: #666;
font-weight: 600;
font-size: 20px;
}
}
.el-dialog__body {
box-sizing: border-box;
// padding-left: 25px;
padding: 15px 20px 30px;
color: #333;
max-height: calc(100% - 121px);
// height: calc(100% - 121px);
}
.roleTitle {
margin-right: 40px;
}
}
</style>
<template>
<el-dialog id="baseDialog" top="15vh" :close-on-click-modal="false" :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">
{{ config.confirm_name }}
</el-button>
<el-button v-preventReClick @click="visible = false">
{{ config.cancel_name }}
</el-button>
</div>
</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,
type: Object,
default: function () {
return {
title: '提示',
width: '480px'
}
}
},
config: {
required: false,
type: Object,
default: function () {
return {
showClose: true,
appendToBody: false, // 是否将自身插入至 body 元素,有嵌套的弹窗时一定要设置
isShowFooter: true,
cancel_name: '取 消',
confirm_name: '确 定'
}
}
},
isShow: {
// 弹窗是否展示
type: Boolean,
default: false
}
// width: {
// //弹窗宽度
// type: String,
// default: '',
// },
// cancel_name: {
// //取消按钮名称
// type: String,
// default: '取 消',
// },
// confirm_name: {
// //确定按钮名称
// type: String,
// default: '确 定',
// },
// isShowFooter: {
// //是否自定底部
// type: Boolean,
// default: true,
// },
// closeClick: {
// type: Boolean,
// default: false,
// },
// appendToBody: {
// // 是否将自身插入至 body 元素,有嵌套的弹窗时一定要设置
// type: Boolean,
// default: false,
// },
},
data() {
return {}
},
computed: {
visible: {
get() {
return this.isShow
},
set(val) {
this.$emit('update:isShow', false)
}
}
},
methods: {
confirmBtn() {
// 触发保存
this.$emit('handleClick')
}
},
created() {
// console.log('baseDialog')
},
mounted() { }
}
</script>
<style scoped lang="scss">
::v-deep .el-dialog {
// height: 90vh;
border-radius: 6px;
// padding: 0;
overflow: hidden;
.el-dialog__header {
border-bottom: solid 1px #e6e6e6;
border-radius: 6px 6px 0px 0px;
padding: 18px 20px 18px 25px;
.el-dialog__title {
// color: #212121;
color: #333333;
font-family: PingFangSC-Medium;
font-size: 20px;
font-weight: 600;
// font-weight: 16px;
}
.el-dialog__close {
color: #666;
font-weight: 600;
font-size: 20px;
}
}
.el-dialog__body {
box-sizing: border-box;
// padding-left: 25px;
padding: 15px 20px 30px;
color: #333;
max-height: calc(100% - 121px);
// height: calc(100% - 121px);
}
.roleTitle {
margin-right: 40px;
}
}
</style>
......@@ -94,9 +94,11 @@
:width="tableParams.tableOption.width||'auto'">
<template slot-scope="scope">
<slot name="auth-button"
:scope="scope.row" />
:scope="scope.row"
:index="scope.$index" />
<slot name="auth-button-other"
:scope="scope.row" />
:scope="scope.row"
:index="scope.$index" />
</template>
</el-table-column>
</el-table>
......
......@@ -2,58 +2,42 @@
<div>
<div class="d2-mr personal-wrap">
<!-- <p class="bg-blue-500 text-5xl">111111</p> -->
<i class="el-icon-s-tools"
style="marginRight:20px;cursor:pointer"
v-if="userInfo.beSuper"
@click="setTitle" />
<el-popover ref="popover1"
placement="top-start"
width="400"
@show="redPotShow = false"
popper-class="popper"
v-model="visible"
trigger="hover">
<i class="el-icon-s-tools" style="marginRight:20px;cursor:pointer" v-if="userInfo.beSuper" @click="setTitle" />
<el-popover ref="popover1" placement="top-start" width="400" @show="redPotShow = false" popper-class="popper"
v-model="visible" trigger="hover">
<p class="title">
导出和导入任务
</p>
<p class="tips">
导出和导入任务加载完成后将自动进行下载,加载过程中不要离开系统,否则将导致任务自动清空
</p>
<div v-for="(item,index) in dowloadList"
:key="index"
class="downloadSty">
<div v-for="(item, index) in dowloadList" :key="index" class="downloadSty">
<span class="one-line-ellipsis downName">{{ item.name }}</span>
<span class="downLabel"> {{ item.labelText?item.labelText:'导出中' }}</span>
<span class="downLabel"> {{ item.labelText ? item.labelText : '导出中' }}</span>
</div>
<div v-for="(item,index) in updateList"
:key="index+'a'"
class="updateListClass">
<div v-if="item.progress!= 100">
<div v-for="(item, index) in updateList" :key="index + 'a'" class="updateListClass">
<div v-if="item.progress != 100">
<p>{{ item.name }}</p>
<el-progress :percentage="item.progress?item.progress:2" />
<el-progress :percentage="item.progress ? item.progress : 2" />
</div>
<div v-else>
<p>{{ item.name||'' }}</p>
<p>{{ item.name || '' }}</p>
<p>成功{{ item.succNum }}条<span v-if="item.failNum">,失败{{ item.failNum }}条</span></p>
</div>
</div>
<!-- @click="test" -->
<span slot="reference">
<i class="el-icon-bell tipsIcon "
:class="{'redPot':redPotShow }" />
<i class="el-icon-bell tipsIcon " :class="{ 'redPot': redPotShow }" />
</span>
</el-popover>
<span v-if="show"
class="btn-text">{{ info && info.detail ? (info.detail.userType == 2 ? `${info.detail.userName}` : '管理员') : '未登录' }}</span>
<span class="btn-text out-txt"
@click="clear">退出</span>
<span v-if="show" class="btn-text">{{ info && info.detail ? (info.detail.userType == 2 ? `${info.detail.userName}` :
'管理员') : '未登录' }}</span>
<span class="btn-text out-txt" @click="clear">退出</span>
</div>
<!-- 隐私协议 -->
<privacy-agreement-dialog :privacy-visible="privacyVisible"
v-if="privacyVisible"
@dialogClose="privacyClose" />
<privacy-agreement-dialog :privacy-visible="privacyVisible" v-if="privacyVisible" @dialogClose="privacyClose" />
</div>
</template>
......@@ -422,7 +406,8 @@ export default {
if (this.$router.currentRoute.name === 'index') {
reload()
} else {
this.$router.push({ name: 'index' })
// this.$router.push({ name: 'index' })
this.$router.push({ name: 'login' })
var _t = setInterval(() => {
if (this.$router.currentRoute.name === 'index') {
clearInterval(_t)
......@@ -470,12 +455,15 @@ export default {
.personal-wrap {
transform: translateY(-3px);
}
.personal-wrap .arrow-icon {
cursor: pointer;
}
.el-icon-arrow-down {
transition: all 0.2s ease-in-out;
}
.personal-wrap .arrow-icon.drOpen {
transform: rotate(-180deg);
}
......@@ -484,6 +472,7 @@ export default {
font-size: 12px;
position: relative;
}
.redPot::after {
content: "";
width: 6px;
......@@ -494,9 +483,11 @@ export default {
top: -2px;
right: -2px;
}
.popper {
padding: 20px 18px 16px;
z-index: 200;
.title {
font-weight: 600;
font-size: 16px;
......@@ -504,31 +495,38 @@ export default {
margin-top: 0;
color: #333;
}
.downloadSty {
display: flex;
align-items: center;
justify-content: space-between;
}
.downName {
width: 70%;
overflow: hidden;
}
.tips {
word-break: break-all;
font-size: 14px;
color: #333;
}
.updateListClass {
margin-bottom: 15px;
p {
margin: 5px 0;
}
}
}
.accout-panel {
left: -160px;
top: 0;
}
.accout-panel .panel-item {
overflow: hidden;
text-overflow: ellipsis;
......@@ -542,15 +540,19 @@ export default {
user-select: none;
cursor: pointer;
}
.accout-panel .i {
margin-right: 5px;
}
.accout-panel .hidden {
display: none;
}
.accout-panel .el-button--text {
color: #606266;
}
.setC {
margin-right: 20px;
}
......
......@@ -51,29 +51,20 @@
清空本地缓存
</div>
</div>-->
<div
class="panel-item"
@click="handleChangeAccount">
<el-button
type="text"
:disabled="accountInfo.accountList.length == 1">
<i class="i el-icon-sort" />{{ user && user.merchantAccountLevel ? (user.merchantAccountLevel == 4 ? `${user.detail.userName}` : '管理员') : '未登录' }}
<div class="panel-item" @click="handleChangeAccount">
<el-button type="text" :disabled="accountInfo.accountList.length == 1">
<i class="i el-icon-sort" />{{ user && user.merchantAccountLevel ? (user.merchantAccountLevel == 4 ?
`${user.detail.userName}` : '管理员') : '未登录' }}
</el-button>
</div>
<div
class="panel-item"
@click="clear">
<div class="panel-item" @click="clear">
<el-button type="text">
<i class="i el-icon-switch-button" />退出账户
</el-button>
</div>
</div>
<personal-dialog
:visible="personalVisible"
:user="info" />
<password-dialog
:visible="passwordVisible"
:user="info" />
<personal-dialog :visible="personalVisible" :user="info" />
<password-dialog :visible="passwordVisible" :user="info" />
</div>
</template>
......@@ -137,7 +128,7 @@ export default {
}
)
.then(() => {
const reload = async() => {
const reload = async () => {
localStorage.clear()
await this.logout()
this.$store.commit('d2admin/gray/set', false)
......@@ -171,7 +162,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
})
.then(async() => {
.then(async () => {
await this.$store.commit('d2admin/gray/set', false)
resolve(true)
})
......@@ -201,11 +192,13 @@ export default {
width: 182px;
background: #fff;
}
.personal-desc {
/* padding: 15px;
color: #fff; */
padding: 24px 0;
}
// .avatar {
// width: 80px;
// height: 80px;
......@@ -273,6 +266,7 @@ export default {
// background: #b1a6a61e;
// }
}
.personal-panel .panel-item {
overflow: hidden;
text-overflow: ellipsis;
......@@ -286,9 +280,11 @@ export default {
user-select: none;
cursor: pointer;
}
.personal-panel .i {
margin-right: 5px;
}
.personal-panel .el-button--text {
color: #606266;
}
......
......@@ -225,5 +225,26 @@ export const routerName = {
}
],
component: _import("stockManage/earlyWarning/earlyWarningList")
},
90807: {
path: "/benefitCardManage",
name: "benefitCardManage",
meta: {
title: "权益卡管理",
authId: "90807",
parentId: "908",
cache: false
},
auth: [
{
authId: "9080701",
parentId: "90807",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
}
],
component: _import("stockManage/BenefitCardManage/index")
}
}
......@@ -187,6 +187,12 @@ export const routerName = {
parentId: "90904",
label: "驳回",
handle: "handleReject"
},
{
authId: "9090404",
parentId: "90904",
label: "分配",
handle: "handleAllocat"
}
],
component: _import("purchase/purchaseAndDelivery")
......@@ -274,5 +280,51 @@ export const routerName = {
}
],
component: _import("purchase/procurementBusiness")
},
90907: {
path: "/factoryPurchaseAndDelivery",
name: "factoryPurchaseAndDelivery",
role: "service",
meta: {
title: "仓库/工厂发货",
authId: "90907",
parentId: "909",
cache: false
},
auth: [
{
authId: "9090701",
parentId: "90907",
label: "查看",
handle: "handleDetail"
},
{
authId: "9090702",
parentId: "90907",
label: "发货",
ruleObj: {
attr: "deliveryStatus",
rule: {
1: "发货",
3: "发货"
// 2: "发货"
}
},
handle: "handleDelivery"
}
// {
// authId: "9090703",
// parentId: "90907",
// label: "驳回",
// handle: "handleReject"
// }
// {
// authId: "9090404",
// parentId: "90907",
// label: "分配",
// handle: "hadleAllocat"
// }
],
component: _import("purchase/factoryPurchaseAndDelivery")
}
}
......@@ -90,12 +90,14 @@ export default {
userInfo.detail.merchantId = userInfo.detail.merchantNo
var routeAll = util.permision.flatten(Object.values(localRoutes))
var indexPage = routeAll.find((item) => item.authId === "907")
routeAll.splice(
routeAll.findIndex((item) => item.authId === "907"),
1
)
routeAll.unshift(indexPage)
// var indexPage = routeAll.find((item) => item.authId === "907")
// routeAll.splice(
// routeAll.findIndex((item) => item.authId === "907"),
// 1
// )
// routeAll.unshift(indexPage)
// console.log(routeAll, "routeAll")
// if (userInfo.detail.accountType !== 7) {
// !res.map((i) => i.authId).includes("907") &&
......@@ -133,18 +135,54 @@ export default {
// }
// console.log("targetRoutes", targetRoutes)
routeAll
.map((i) => i.authId)
.forEach((item, index) => {
targetRoutes.includes(item) && tempAuths.push(routeAll[index])
if (routeAll[index].hasOwnProperty("addRoutePath")) {
routeAll[index].addRoutePath.forEach((k) => {
if (!tempAuths.map((m) => m.authId).includes(k.authId)) {
tempAuths.push(k)
}
})
}
// routeAll
// .map((i) => i.authId)
// .forEach((item, index) => {
// targetRoutes.includes(item) && tempAuths.push(routeAll[index])
// if (routeAll[index].hasOwnProperty("addRoutePath")) {
// routeAll[index].addRoutePath.forEach((k) => {
// if (!tempAuths.map((m) => m.authId).includes(k.authId)) {
// tempAuths.push(k)
// }
// })
// }
// })
// let routeAllId = routeAll.map((i) => i.authId)
targetRoutes.forEach((item) => {
// routeAll.
// if (!routeAll.map((i) => i.authId).includes(item))
const authInfo = routeAll.find((ele) => {
return ele.authId === item
})
// console.log(authInfo, "authInfo")
authInfo && tempAuths.push(authInfo)
// console.log(authInfo && authInfo.hasOwnProperty("addRoutePath"))
if (authInfo && authInfo.hasOwnProperty("addRoutePath")) {
// authInfo.
authInfo.addRoutePath.forEach((k) => {
if (!tempAuths.map((m) => m.authId).includes(k.authId)) {
tempAuths.push(k)
}
})
}
})
// tempAuths.
var indexPage = tempAuths.find((item) => item.authId === "907")
if (indexPage) {
tempAuths.splice(
tempAuths.findIndex((item) => item.authId === "907"),
1
)
tempAuths.unshift(indexPage)
}
// var ind = tempAuths.findIndex((item) => item.authId === "907")
// if (ind) {
// tempAuths = [
// tempAuths[ind],
// ...tempAuths.filter((item) => item.authId !== "907")
// ]
// }
// const authes = (+accountInfo.roleType === SUPPER_ADMIN) ?
// util.permision.flatten(Object.values(localRoutes))
// .map(obj => ({ authId: obj.authId, parentId: obj.parentId })) :
......
......@@ -5,7 +5,7 @@
* @Last Modified time: 2020-11-15 10:22:06
*/
import { getChannelType, getProductType, getProductServiceItems } from "@/api/sys.base"
import { getChannelType, getProductType } from "@/api/sys.base"
// import {
// BaseData
// } from '@/common/constants'
......@@ -19,9 +19,7 @@ export default {
// 渠道类型
channelType: [],
// 产品分类
productType: [],
// 2.0场景素材可选服务项目
productServiceItemList: []
productType: []
},
actions: {
/**
......@@ -31,19 +29,10 @@ export default {
*/
init({ state, dispatch, commit }) {
return new Promise(async (resolve) => {
Promise.all([getChannelType({}), getProductType({}), getProductServiceItems({})]).then(
async ([channelType, productType, productServiceItemList]) => {
// 处理服务项目数据
let arr = []
productServiceItemList.forEach(val => {
arr.push({
serviceCode: val.serviceCode,
serviceName: val.serviceName
})
})
Promise.all([getChannelType({}), getProductType({})]).then(
async ([channelType, productType]) => {
state.channelType = channelType
state.productType = productType
state.productServiceItemList = arr
// console.log(productType, "productType")
await dispatch("save2db", {
name: "",
......@@ -60,7 +49,6 @@ export default {
return new Promise(async (resolve) => {
state.channelType = []
state.productType = []
state.productServiceItemList = []
await dispatch("save2db", {
name: "",
value: state
......@@ -113,8 +101,8 @@ export default {
state =
(await dispatch("getFromdb", "base")) || (await dispatch("init"))
}
const { channelType, productType, productServiceItemList } = state
resolve({ channelType, productType, productServiceItemList })
const { channelType, productType } = state
resolve({ channelType, productType })
})
},
/**
......
......@@ -60,25 +60,34 @@ export default {
*/
openedLoad({ state, commit, dispatch }) {
return new Promise(async (resolve) => {
const indexPage = await dispatch("getIndexPage")
// store 赋值
let value = await dispatch(
"d2admin/db/get",
{
dbName: "sys",
path: "page.opened",
defaultValue: [defaultPage],
// defaultValue: [defaultPage],
defaultValue: [indexPage],
user: true
},
{
root: true
}
)
if (value[0].fullPath !== INDEX_PATH) {
const index = value.some((page) => page.fullPath === INDEX_PATH)
// if (value[0].fullPath !== INDEX_PATH) {
// const index = value.some((page) => page.fullPath === INDEX_PATH)
// if (index) {
// value = value.filter((page) => page.fullPath !== INDEX_PATH)
// }
// value.unshift(indexPage)
// }
if (value[0].fullPath !== indexPage.path) {
const index = value.some((page) => page.fullPath === indexPage.path)
if (index) {
value = value.filter((page) => page.fullPath !== INDEX_PATH)
value = value.filter((page) => page.fullPath !== indexPage.path)
}
value.unshift(defaultPage)
value.unshift(indexPage)
}
// 在处理函数中进行数据优化 过滤掉现在已经失效的页签或者已经改变了信息的页签
// 以 fullPath 字段为准
......@@ -382,7 +391,9 @@ export default {
// dispatch('currentSet', _index)
// 持久化
// await dispatch('opend2db')
router.replace(INDEX_PATH)
const indexPage = await dispatch("getIndexPage")
router.replace(indexPage.path)
// router.replace(INDEX_PATH)
// end
resolve()
})
......@@ -464,6 +475,7 @@ export default {
*/
async currentGet({ state, dispatch }, fullPath) {
return new Promise(async (resolve) => {
const indexPage = await dispatch("getIndexPage")
const _current =
state.current ||
(await dispatch(
......@@ -471,7 +483,8 @@ export default {
{
dbName: "sys",
path: "page.current",
defaultValue: INDEX_PATH,
// defaultValue: INDEX_PATH,
defaultValue: indexPage.path,
user: true
},
{
......@@ -481,7 +494,14 @@ export default {
const _in = await dispatch("d2admin/menu/has", _current, {
root: true
})
resolve(_in ? _current : INDEX_PATH)
// const
// console.log(_in, _current, "currentGet", INDEX_PATH)
// console.log(rootState, "rootState.aside")
// const { aside } = rootState.d2admin.menu
// const indexPage = commit("getIndexPage")
// console.log(indexPage, "indexPage")
resolve(_in ? _current : indexPage.path)
})
},
/**
......@@ -522,12 +542,28 @@ export default {
state.opened.find((page) => page.name === name).meta.cache = true
dispatch("opend2db")
},
reset({ state }) {
state.pool = []
state.opened = [defaultPage]
state.openedLoaded = false
state.current = ""
state.keepAlive = []
},
// 动态获取首页 处理首页可能不是总览的问题
getIndexPage({ rootState }) {
return new Promise((resolve) => {
// state.current = path
// console.log(rootState, "rootState")
const { aside } = rootState.d2admin.menu
// console.log(aside[0], "aside[0]")
// console.log(aside, "aside[0]")
if (aside[0] && aside[0].authId != "907") {
resolve(aside[0].children[0])
}
// return
resolve(aside[0] || defaultPage)
})
}
},
mutations: {
......
<!-- 预录客户列表 -->
<template>
<d2-container class="record-list">
<div class="header"
slot="header">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData">
<!-- <p class="custom-input">
<div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :form-data="showFormData">
<!-- <p class="custom-input">
<el-input
size="small"
v-model="searchForm.standNoOrCustomerName"
......@@ -17,13 +13,10 @@
</p> -->
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
<el-button :id="tableParams.btnId" size="small" type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
<el-button size="small" @click="handleReset">
重置
</el-button>
</div>
......@@ -31,70 +24,44 @@
<div class="d2-container-content">
<d2-table-header>
<span slot="left">
<auth-button category="Button"
style="{display: inline-block}"
:show-btn-ids="['9020201']" />
<auth-button category="Button" style="{display: inline-block}" :show-btn-ids="['9020201']" />
<span class="table-header-left-txt">已预录客户列表{{ total }}条记录。</span>
</span>
<span>
<span class="btn-tips"><img src="../../assets/icon-warn.png">所有号码已启用隐私号码保护功能!</span>
<auth-button category="Button"
:show-btn-ids="['9020202']" />
<auth-button category="Button" :show-btn-ids="['9020202']" />
</span>
</d2-table-header>
<d2-table ref="recordTable"
:search-form="tableSearchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<span slot="baseGoodsStr"
slot-scope="scope">
<p v-for="(item, index) in scope.scope.baseGoodsStr ? scope.scope.baseGoodsStr.split(',') : []"
:key="index">{{ item }}</p>
<d2-table ref="recordTable" :search-form="tableSearchForm" :table-params="tableParams" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<span slot="baseGoodsStr" slot-scope="scope">
<p v-for="(item, index) in scope.scope.baseGoodsStr ? scope.scope.baseGoodsStr.split(',') : []" :key="index">{{
item }}</p>
</span>
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope" />
<auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" />
</d2-table>
</div>
<d2-dialog :title="'上传文件'"
:is-visible="fileVisible"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport">
<d2-dialog :title="'上传文件'" :is-visible="fileVisible" @closeDialog="handleImport" @confirmDialog="handleConfirmImport">
<slot>
<el-form :model="fileForm"
ref="fileRuleForm"
:rules="fileRules"
label-width="120px">
<el-form-item v-if="userInfo.beSuper"
label="园区店:"
prop="yqMerchantId">
<el-form :model="fileForm" ref="fileRuleForm" :rules="fileRules" label-width="120px">
<el-form-item v-if="userInfo.beSuper" label="园区店:" prop="yqMerchantId">
<el-select v-model="fileForm.yqMerchantId">
<el-option v-for="item in baseData.parkServiceList.filter(i => i.merchantName !== '全部')"
:key="item.merchantId"
:value="item.merchantId"
:label="item.merchantName" />
:key="item.merchantId" :value="item.merchantId" :label="item.merchantName" />
</el-select>
</el-form-item>
<el-form-item label="导入文件:"
prop="fileName">
<el-form-item label="导入文件:" prop="fileName">
<el-col :span="16">
<el-input readonly
v-model="fileForm.fileName" />
<el-input readonly v-model="fileForm.fileName" />
</el-col>
<el-col :span="4"
class="m-l-md">
<el-col :span="4" class="m-l-md">
<el-button class="import-btn">
导入文件
<input type="file"
id="fileUpload"
class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@change="importFile($event)">
<el-link href="http://img01.glsx.com.cn/upload/salesexcel/预录订单导入模板.xlsx"
type="primary"
class="import-template"
icon="el-icon-link">
<input type="file" id="fileUpload" class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)">
<el-link href="http://img01.glsx.com.cn/upload/salesexcel/预录订单导入模板.xlsx" type="primary"
class="import-template" icon="el-icon-link">
模版下载
</el-link>
</el-button>
......@@ -471,16 +438,19 @@ export default {
.record-list {
position: relative;
}
.record-list .custom-input {
display: inline-block;
width: 220px;
}
.record-list .btn-tips img {
width: 18px;
height: 15px;
margin-right: 9px;
vertical-align: bottom;
}
.record-list .btn-tips {
display: inline-block;
font-size: 12px;
......@@ -491,15 +461,19 @@ export default {
margin-right: 24px;
padding: 6.5px 10px;
}
.record-list .custom-input {
margin: 0 0;
}
.record-list .m-l-md {
margin-left: 20px;
}
.record-list .import-btn {
position: relative;
}
.record-list .import-input {
opacity: 0;
position: absolute;
......@@ -510,6 +484,7 @@ export default {
cursor: pointer;
font-size: 0;
}
.record-list .import-template {
position: absolute;
height: 20px;
......
......@@ -45,6 +45,11 @@
</div>
<!-- 商品分类 权益升级 (线上126) -->
<div class="item" v-if="equitySceneType.includes(formData[item.key])">
<div class="label">实体卡:</div>
<div class="value">{{ formData['entityCardFlag'] == 'Y' ? '是' : '否' }}</div>
</div>
<!-- 商品分类 权益升级 (线上126) -->
<div class="item flex_1" v-if="equitySceneType.includes(formData[item.key])">
<div class="label">服务项目:</div>
<div class="value">{{ formData['serviceItemNames'] }}</div>
</div>
......@@ -284,6 +289,9 @@ export default {
text-align: right;
}
}
.flex_1{
flex: 0 0 100%;
}
}
}
}
......
......@@ -34,11 +34,6 @@
<div class="label">{{ subItem.unit ? (membraneTypeList.includes(formData[item.key]) ? subItem.label + `(元)/${subItem.value == 'purchasePrice' ? '卷' : '车'}` : (subItem.label + '(元)/件')) : subItem.label }}:</div>
<div class="value">{{ subItem.unit ? priceFilter(formData[subItem.value]) : formData[subItem.value] }}</div>
</div>
<!-- 上架至采购商城 -->
<div class="item" v-if="formData['purchasePrice']">
<div class="label">采购价:</div>
<div class="value">{{ formData['purchasePrice'] }}</div>
</div>
<!-- 商品分类 1太阳膜 -->
<div class="item" v-if="formData[item.key] == 1">
<div class="label">部位:</div>
......@@ -56,6 +51,11 @@
</div>
<!-- 商品分类 权益升级 (线上126) -->
<div class="item" v-if="equitySceneType.includes(formData[item.key])">
<div class="label">实体卡:</div>
<div class="value">{{ formData['entityCardFlag'] == 'Y' ? '是' : '否' }}</div>
</div>
<!-- 商品分类 权益升级 (线上126) -->
<div class="item flex_1" v-if="equitySceneType.includes(formData[item.key])">
<div class="label">服务项目:</div>
<div class="value">{{ formData['serviceItemNames'] }}</div>
</div>
......@@ -362,7 +362,6 @@ export default {
mounted() {
this.formData = deepClone(this.originData)
console.log(this.formData)
this.copyFormList = deepClone(this.formList)
this.filterEditForm()
},
......@@ -509,6 +508,7 @@ export default {
_formData.warrantyPeriod = _valueObj?.warrantyPeriod // 质保年限
_formData.serviceYears = _valueObj?.serviceYears // 服务时间
_formData.supplierCode = _valueObj?.supplierCode // 供应方 判断是否需要走审核流程
_formData.entityCardFlag = _valueObj?.entityCardFlag // 实体卡
}
// 切换业务场景 将选中的上架门店清空
if (targetItem.name === 'sceneType') {
......@@ -606,6 +606,9 @@ export default {
text-align: right;
}
}
.flex_1{
flex: 0 0 100%;
}
}
.width_100{
display: inline-block;
......
......@@ -264,11 +264,12 @@ export default {
thirdPartyCode: v?.thirdPartyCode,
goodsType: val?.goodsInfo?.goodsType,
position: v?.position,
serviceItemNames: v?.upgradeGoodsServiceItemsList?.map(item => { return item.serviceName })?.join(','),
serviceItemNames: v?.upgradeGoodsServiceItemsList?.map(item => { return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}` })?.join(','),
upgradeCommodityCode: v?.commodityCode,
warrantyPeriod: v?.warrantyPeriod,
serviceYears: v?.serviceYears,
supplierCode:val?.goodsInfo?.supplierCode
supplierCode: val?.goodsInfo?.supplierCode,
entityCardFlag: v?.entityCardFlag
}
})
})
......@@ -322,12 +323,13 @@ export default {
res.serviceYears = res?.upgradeGoods?.serviceYears // 服务时间
res.supplierCode = res?.goodsInfo?.supplierCode // 供应方code
res.thirdPartyCode = res?.upgradeGoods?.thirdPartyCode // 第三方编码
res.entityCardFlag = res?.upgradeGoods?.entityCardFlag
let defaultSelect = [{ // 默认选中项 用于回显
confId: res?.upgradeGoodsId,
confNameValue: res?.upgradeGoodsName,
confTypeNameValue: `(${res?.goodsTypeName} / ${res?.goodsName} / ${res?.upgradeCommodityCode})`,
}]
res.serviceItemNames = res.upgradeGoods?.upgradeGoodsServiceItemsList?.map(v => { return v.serviceName })?.join(',') // 服务项目
res.serviceItemNames = res.upgradeGoods?.upgradeGoodsServiceItemsList?.map(v => { return `${v.serviceName}-${v.serviceGrade}/${v.servicePeriod}` })?.join(',') // 服务项目
res.merchantGoodsRefList = res.merchantGoodsRefList || [] // 上架门店
this.editData = res || {}
this.getSelectingList(defaultSelect)
......
......@@ -189,11 +189,12 @@ export default {
res.purchasePrice = res.upgradeGoods?.purchasePrice
res.positionNames = positionNamesArr.length ? positionNamesArr[0]?.confName : ''
res.productType = productType
res.serviceItemNames = res.upgradeGoods?.upgradeGoodsServiceItemsList?.map(v => { return v.serviceName })?.join(',')
res.serviceItemNames = res.upgradeGoods?.upgradeGoodsServiceItemsList?.map(v => { return `${v.serviceName}-${v.serviceGrade}/${v.servicePeriod}` })?.join(',')
res.warrantyPeriod = res.upgradeGoods?.warrantyPeriod
res.serviceYears = res.upgradeGoods?.serviceYears
res.merchantGoodsRefList = res.merchantGoodsRefList || []
res.thirdPartyCode = res?.upgradeGoods?.thirdPartyCode || ''
res.thirdPartyCode = res?.upgradeGoods?.thirdPartyCode || '',
res.entityCardFlag = res?.upgradeGoods?.entityCardFlag
this.editData = res || {}
this.$nextTick(() => {
this.show = true
......
......@@ -44,43 +44,49 @@
<div class="flex_box">
<el-form-item class="d2-drawer-item"
label="编码:">
<span>{{ item.type }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="第三方编码:">
<span>{{ item.thirdPartyCode }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
v-if="$$(commodityInfo.goodsInfo,'goodsType') == 1"
label="部位:">
<span>{{ item.positionNames }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
:label="membraneTypeList.includes(commodityInfo.goodsInfo.goodsType) ? '参考售价(元)/车:' : '参考售价(元)/件:'">
<span>{{ !filterEmpty(item.upgradePrice) ? priceFilter(item.upgradePrice) : '无' }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
:label="membraneTypeList.includes(commodityInfo.goodsInfo.goodsType) ? '采购价(元)/卷:' : '采购价(元)/件:'">
<span>{{ !filterEmpty(item.purchasePrice) ? priceFilter(item.purchasePrice) : '无' }}</span>
</el-form-item>
<el-form-item
class="d2-drawer-item"
v-if="membraneTypeList.includes($$(commodityInfo.goodsInfo,'goodsType'))"
label="质保年限:">
<span>{{ !filterEmpty(item.warrantyPeriod) ? (item.warrantyPeriod + '年') : '无' }}</span>
</el-form-item>
<el-form-item
class="d2-drawer-item"
v-if="equitySceneType.includes($$(commodityInfo.goodsInfo,'goodsType'))"
label="服务项目:">
<span>{{ !filterEmpty(item.serviceItemNames) ? item.serviceItemNames : '无' }}</span>
</el-form-item>
<el-form-item
class="d2-drawer-item"
v-if="equitySceneType.includes($$(commodityInfo.goodsInfo,'goodsType'))"
label="服务时间:">
<span>{{ !filterEmpty(item.serviceYears) ? (item.serviceYears + '年') : '无' }}</span>
</el-form-item>
<span>{{ item.type }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="第三方编码:">
<span>{{ item.thirdPartyCode }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
v-if="$$(commodityInfo.goodsInfo,'goodsType') == 1"
label="部位:">
<span>{{ item.positionNames }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
:label="membraneTypeList.includes(commodityInfo.goodsInfo.goodsType) ? '参考售价(元)/车:' : '参考售价(元)/件:'">
<span>{{ !filterEmpty(item.upgradePrice) ? priceFilter(item.upgradePrice) : '无' }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
:label="membraneTypeList.includes(commodityInfo.goodsInfo.goodsType) ? '采购价(元)/卷:' : '采购价(元)/件:'">
<span>{{ !filterEmpty(item.purchasePrice) ? priceFilter(item.purchasePrice) : '无' }}</span>
</el-form-item>
<el-form-item
class="d2-drawer-item"
v-if="membraneTypeList.includes($$(commodityInfo.goodsInfo,'goodsType'))"
label="质保年限:">
<span>{{ !filterEmpty(item.warrantyPeriod) ? (item.warrantyPeriod + '年') : '无' }}</span>
</el-form-item>
<el-form-item
class="d2-drawer-item"
v-if="equitySceneType.includes($$(commodityInfo.goodsInfo,'goodsType'))"
label="服务时间:">
<span>{{ !filterEmpty(item.serviceYears) ? (item.serviceYears + '年') : '无' }}</span>
</el-form-item>
<el-form-item
class="d2-drawer-item"
v-if="equitySceneType.includes($$(commodityInfo.goodsInfo,'goodsType'))"
label="实体卡:">
<span>{{ item.entityCardFlag == 'Y' ? '是' : '否' }}</span>
</el-form-item>
<el-form-item
class="d2-drawer-item flex_1"
v-if="equitySceneType.includes($$(commodityInfo.goodsInfo,'goodsType'))"
label="服务项目:">
<span>{{ !filterEmpty(item.serviceItemNames) ? item.serviceItemNames : '无' }}</span>
</el-form-item>
</div>
</el-form>
......@@ -137,7 +143,7 @@ export default {
res?.upgradeGoodsList?.forEach(item => {
let positionNamesArr = item?.goodsInfo?.goodsType == 1 ? deepClone(positionTypeList).filter(val => item.position == val.position) : []
item.positionNames = positionNamesArr.length ? positionNamesArr[0]?.confName : ''
item.serviceItemNames = item?.upgradeGoodsServiceItemsList?.map(v => { return v.serviceName })?.join(',')
item.serviceItemNames = item?.upgradeGoodsServiceItemsList?.map(v => { return `${v.serviceName}-${v.serviceGrade}/${v.servicePeriod}` })?.join(',')
})
this.commodityInfo = res
})
......@@ -211,6 +217,9 @@ export default {
flex-shrink: 0;
}
}
.flex_1{
width: 100%;
}
}
}
......
......@@ -204,7 +204,7 @@
</div>
</div>
<!-- 2.0场景 服务项目字段 -->
<div v-if="equitySceneType.includes(formData['goodsType'])">
<!-- <div v-if="equitySceneType.includes(formData['goodsType'])">
<el-form-item prop="serviceItems"
label="包含服务项目"
id="serviceItems"
......@@ -220,7 +220,7 @@
</el-input>
</div>
</el-form-item>
</div>
</div> -->
</div>
<div>
<div v-for="(item, index) in i.formBlock" :key="index" style="position: relative;">
......@@ -499,7 +499,7 @@ export default {
},
selectedPositionIds: [],
membraneTypeList: membraneTypeList,
productServiceItemList: []
// productServiceItemList: []
}
},
......@@ -587,7 +587,7 @@ export default {
} else if (this.formData.goodsType == 12 || this.formData.goodsType == 14 || this.formData.goodsType == 4 || this.formData.goodsType == 6) {
this.membranesFormBlock = [copyMembranesFormBlock[1]]
}
this.getProductServiceItemList()
// this.getProductServiceItemList()
},
methods: {
......@@ -595,9 +595,9 @@ export default {
get: 'd2admin/base/get'
}),
...mapMutations('goodsInfoData', ['setUpdateGoodsInfo']),
async getProductServiceItemList() {
this.productServiceItemList = await this.get(BaseData.productServiceItemList)
},
// async getProductServiceItemList() {
// this.productServiceItemList = await this.get(BaseData.productServiceItemList)
// },
selectBlur() {
this.editOptionIndex = -1
this.showOptionInput = false
......@@ -809,7 +809,7 @@ export default {
this.$refs[this.formRef + 'd2FormRuleForm'].validate((valid, options) => {
if (valid) {
// 会员权益 类目
if (this.equitySceneType.includes(this.formData.goodsType)) this.formData.productServiceItemList = this.productServiceItemList
// if (this.equitySceneType.includes(this.formData.goodsType)) this.formData.productServiceItemList = this.productServiceItemList
this.formData.goodsPositionList = this.filterPosiotion()
let brandOptionList = this.formList[0].formBlock[this.formList[0].formBlock.findIndex(val => val.name == 'brandMerchantCode')].optionList || []
let supplierOptionList = this.formList[0].formBlock[this.formList[0].formBlock.findIndex(val => val.name == 'supplierCode')].optionList || []
......
<!-- 关联门店弹窗 -->
<template>
<d2-dialog title="选择服务项目"
:is-visible.sync="relateServiceVisible"
width="70%"
btn-ok-label="确定"
@confirmDialog="handleRelateServiceConfirm"
@closeDialog="handleRelateServiceClose"
class="relateService">
<slot />
<el-row class="tableCon">
<div class="tableBox">
<el-table ref="seletingTable"
:data="selectingData"
height="464px"
class="table"
border
@select="handleChange">
<el-table-column type="selection"
:selectable="selectable"
width="55"
align="center" />
<el-table-column
width="55"
label="序号"
type="index"
align="center" />
<el-table-column
prop="serviceName"
label="服务项目"
:show-overflow-tooltip="true"
width="190"
align="center">
</el-table-column>
<el-table-column prop="serviceGrade"
label="等级"
align="center">
</el-table-column>
<el-table-column prop="servicePeriod"
label="年限"
align="center">
</el-table-column>
<el-table-column prop="standardSalesCost"
label="销售成本/元"
width="140"
align="center">
</el-table-column>
<el-table-column prop="serviceOverview"
width="210"
:show-overflow-tooltip="true"
label="描述"
align="center">
<template slot-scope="scope">
<span v-html="scope.row.serviceOverview" class="text_hide"></span>
</template>
</el-table-column>
</el-table>
<el-pagination small
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-size="pageSize"
layout="total, prev, pager, next"
:total="total" />
</div>
<div class="selectedBox">
<div class="title">
<div class="title_txt">已选</div>
<div class="title_btn" @click="clearSelect">清空</div>
</div>
<div class="content">
<div class="item" v-for="(subItem, subIdx) in selectedData" :key="subIdx">
<div class="item_txt"><span>{{ subItem.uniqueValue }}</span></div>
<div class="del_item" @click="delItem(subItem)"><i class="el-icon-error"></i></div>
</div>
</div>
</div>
</el-row>
</d2-dialog>
</template>
<script>
import { deepClone } from '@/common/util'
export default {
name: 'RelateServiceDialog',
data() {
return {
selectedData: [],
selectingData: [],
// 分页
total: 0,
currentPage: 1,
pageSize: 20
}
},
props: {
relateServiceVisible: {
type: Boolean,
default: false
},
serviceApi: {
type: Function,
default: () => { }
},
serviceSelected: {
type: Array,
default: () => []
},
serviceSearchForm: {
type: Object,
default: () => { }
}
},
mounted() {
this.selectedData = deepClone(this.serviceSelected)
this.getSelectingList()
},
methods: {
selectable(row) {
let { selectedData } = this
// 每个服务项目code只能选中一个 按等级和年限区分
if (selectedData.filter(v => v.uniqueValue == row.uniqueValue).length) {
return true
} else if (selectedData.filter(v => v.serviceCode == row.serviceCode).length) {
return false
} else {
return true
}
},
recoverySelection() {
var exitIds = this.selectedData.map(item => item.uniqueValue)
this.selectingData.forEach(item => {
exitIds.includes(item.uniqueValue) && this.$refs.seletingTable.toggleRowSelection(item, true)
})
},
getSelectingList() {
this.serviceApi({
...this.serviceSearchForm,
currentPage: this.currentPage,
pageSize: this.pageSize,
}).then(res => {
res?.list?.forEach(val => {
val.uniqueValue = `${val.serviceName}-${val.serviceGrade}/${val.servicePeriod}`
})
this.selectingData = res.list
this.total = res.total
this.$nextTick(() => {
this.recoverySelection()
})
})
},
handleChange(selection, row) {
var addOrDelete = !!selection.find(item => item.uniqueValue === row.uniqueValue)
addOrDelete
? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter(item => item.uniqueValue !== row.uniqueValue))
},
handleAll(selection) {
this.selectingData.forEach(item => {
var isExit = this.selectedData.findIndex(subItem => subItem.serviceCode === item.serviceCode)
if (selection.length && (isExit === -1)) {
this.selectedData.push(item)
} else if (!selection.length && (isExit !== -1)) {
this.selectedData.splice(isExit, 1)
}
})
},
clearSelect() {
this.selectedData = []
this.$refs.seletingTable.clearSelection()
},
delItem(row) {
this.selectedData = this.selectedData.filter(item => item.uniqueValue !== row.uniqueValue)
const obj = this.selectingData.find(v => v.uniqueValue == row.uniqueValue)
if (obj) this.$refs.seletingTable.toggleRowSelection(obj)
},
handleCurrentChange(val) {
this.currentPage = val
this.getSelectingList()
},
handleRelateServiceConfirm() {
this.$emit('handleRelateServiceConfirm', this.selectedData)
},
handleRelateServiceClose() {
this.$emit('handleRelateServiceClose')
}
}
}
</script>
<style lang="scss" scoped>
.relateService .table {
margin: 0 auto 20px !important;
width: 100%;
}
.relateService .tableCon {
margin-top: 20px;
display: flex;
.tableBox {
flex: 2;
}
.selectedBox{
flex: 1;
height: 462px;
border: 1px solid #E5E5E5;
margin-left: 10px;
.title{
height: 38px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 8px 0 16px;
border-bottom: 1px solid #E5E5E5;
.title_txt{
font-size: 16px;
font-weight: 600;
color: #333333;
}
.title_btn{
cursor: pointer;
font-size: 14px;
color: #185EFE;
}
}
.content{
padding: 16px 10px;
height: calc(100% - 75px);
overflow-y: scroll;
.item{
display: flex;
align-items: center;
justify-content: space-between;
height: 32px;
color: #666666;
padding: 0 8px;
.del_item{
cursor: pointer;
}
}
.item:hover{
background: #F6F9FF;
}
}
}
}
.service-service .relateService .el-table .cell,
.d2-form .relateService .el-table .cell {
line-height: 26px !important;
}
.service-service .relateService .el-table--medium td,
.d2-form .relateService .el-table--medium td {
padding: 6px 8px !important;
}
.relateService .red {
color: red;
}
.relateService .tip-icon {
position: absolute;
display: inline-block;
height: 10px;
width: 10px;
line-height: 10px;
color: #ffffff;
background-color: red;
border: 1px solid red;
border-radius: 50%;
cursor: pointer;
font-size: 6px;
margin-left: 2px;
}
.text_hide{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-table__header-wrapper .has-gutter .el-checkbox{
display: none;
}
::v-deep .text_hide p{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin: 0;
}
</style>
......@@ -100,7 +100,6 @@ export default {
this.show = true
})
}
this.getProductServiceItemList()
},
computed: {
...mapGetters('goodsInfoData', { goodsInfoData: 'getGoodsInfoData' })
......@@ -111,14 +110,14 @@ export default {
}),
...mapMutations('goodsInfoData', ['setUpdateGoodsInfo']),
...mapActions({ close: 'd2admin/page/close' }),
async getProductServiceItemList() {
this.productServiceItemList = await this.get(BaseData.productServiceItemList)
},
getGoodsInfo(id) {
getGoodsInfoById({ id: id }).then(res => {
let specificationDetailList = []
let objData = {}
this.copyUpgradeGoodsList = deepClone(res.upgradeGoodsList).map(val => {
val?.upgradeGoodsServiceItemsList?.forEach(v => {
v.uniqueValue = `${v.serviceName}-${v.serviceGrade}/${v.servicePeriod}`
})
return {
id: val.id,
position: val.position,
......@@ -132,8 +131,9 @@ export default {
warningValueMax: val.warningValueMax,
warrantyPeriod: val.warrantyPeriod,
editGoodNameInput: false,
serviceItemArr: val.upgradeGoodsServiceItemsList?.map(v => { return v.serviceCode }) || [],
serviceYears: val.serviceYears
serviceItemArr: val.upgradeGoodsServiceItemsList || [],
serviceYears: val.serviceYears,
entityCardFlag: val.entityCardFlag == 'Y'
}
})
res.goodsInfo.goodsSource = 0
......@@ -214,6 +214,17 @@ export default {
})
let arr = []
data.goodsSpecificationSingleList.forEach(item => {
let serviceArr = []
item.serviceItemArr.forEach(val => {
serviceArr.push({
gradeId: val.gradeId,
serviceCode: val.serviceCode,
serviceName: val.serviceName,
serviceGrade: val.serviceGrade,
servicePeriod: val.servicePeriod,
standardSalesCost: val.standardSalesCost
})
})
arr.push({
baseGoodsId: data.baseGoodsId,
goodsCode: data.goodsCode,
......@@ -228,8 +239,9 @@ export default {
purchasePrice: data?.shoppingMallFlag == 1 ? item.purchasePrice : '', // 采购价 仅上架至采购商城
warningValue: item.warningValue,
warningValueMax: item.warningValueMax,
upgradeGoodsServiceItemsList: this.equitySceneType.includes(productFormData?.goodsType) ? deepClone(this.productServiceItemList).filter(v => item.serviceItemArr.includes(v.serviceCode)) : [], // 服务项目 仅权益类木
serviceYears: this.equitySceneType.includes(productFormData?.goodsType) ? item.serviceYears : '' // 服务时间 仅权益类目
upgradeGoodsServiceItemsList: this.equitySceneType.includes(productFormData?.goodsType) ? serviceArr : [], // 服务项目 仅权益类木
serviceYears: this.equitySceneType.includes(productFormData?.goodsType) ? item.serviceYears : '', // 服务时间 仅权益类目
entityCardFlag: this.equitySceneType.includes(productFormData?.goodsType) ? (item.entityCardFlag ? 'Y' : 'N') : '' // 是否实体卡
})
})
goodsSpecificationList = arr
......@@ -256,6 +268,17 @@ export default {
}
specificationData = specificationData + subItem
})
let serviceArr = []
item.serviceItemArr.forEach(val => {
serviceArr.push({
gradeId: val.gradeId,
serviceCode: val.serviceCode,
serviceName: val.serviceName,
serviceGrade: val.serviceGrade,
servicePeriod: val.servicePeriod,
standardSalesCost: val.standardSalesCost
})
})
goodsSpecificationList.push({
baseGoodsId: data.baseGoodsId,
goodsCode: data.goodsCode,
......@@ -269,8 +292,9 @@ export default {
purchasePrice: data?.shoppingMallFlag == 1 ? item.purchasePrice : '', // 采购价 仅上架至采购商城
warningValue: item.warningValue,
warningValueMax: item.warningValueMax,
upgradeGoodsServiceItemsList: this.equitySceneType.includes(productFormData?.goodsType) ? deepClone(this.productServiceItemList).filter(v => item.serviceItemArr.includes(v.serviceCode)) : [], // 服务项目 仅权益类木
serviceYears: this.equitySceneType.includes(productFormData?.goodsType) ? item.serviceYears : '' // 服务时间 仅权益类目
upgradeGoodsServiceItemsList: this.equitySceneType.includes(productFormData?.goodsType) ? serviceArr : [], // 服务项目 仅权益类木
serviceYears: this.equitySceneType.includes(productFormData?.goodsType) ? item.serviceYears : '', // 服务时间 仅权益类目
entityCardFlag: this.equitySceneType.includes(productFormData?.goodsType) ? (item.entityCardFlag ? 'Y' : 'N') : '' // 是否实体卡
})
})
}
......@@ -291,6 +315,7 @@ export default {
},
saveDraft: flag !== 1 // flag 1提交 2存草稿
}
console.log(params)
if (params?.upgradeGoods?.goodsSpecificationList?.length > 75) {
return this.$message({
type: 'warning',
......
......@@ -48,7 +48,7 @@
<el-table-column prop="outputValue" label="区域督导" width="150">
<template slot-scope="scope">
<!-- multiple -->
<el-select clearable value-key="userId" v-model="scope.row['areaSupervision']" class="select"
<el-select clearable filterable value-key="userId" v-model="scope.row['areaSupervision']" class="select"
collapse-tags placeholder="请选择">
<el-option v-for="item in supervisionOptionsList" :key="item.userId" :label="item.userName"
:value="item">
......@@ -101,7 +101,7 @@
<el-button class="import-btn">
导入文件
<input type="file" id="fileUpload" class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)" />
<!-- href="https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/对账单模版.xlsx" -->
<el-link type="primary" class="import-template" @click="downLoadTemplate" icon="el-icon-link">
......
<!-- 企微推送产值进度表 -->
<template>
<d2-container class="outputValue-list">
<div class="header"
slot="header">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData" />
<div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :form-data="showFormData" />
<div class="up-btns">
<el-button :id="tableParams.btnId"
size="small"
type="primary">查询</el-button>
<el-button size="small"
@click="handleReset">重置</el-button>
<el-button :id="tableParams.btnId" size="small" type="primary">查询</el-button>
<el-button size="small" @click="handleReset">重置</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<span slot="left">
<auth-button category="Button"
:show-btn-ids="['9070301']" />
<auth-button category="Button" :show-btn-ids="['9070301']" />
</span>
<auth-button category="Button"
:show-btn-ids="['9070303']" />
<auth-button category="Button" :show-btn-ids="['9070303']" />
</d2-table-header>
<d2-table ref="outputValueTable"
:search-form="tableSearchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<div slot="concatType"
slot-scope="scope">
<d2-table ref="outputValueTable" :search-form="tableSearchForm" :table-params="tableParams"
:get-list-api="getListApi" :before-search-fn="beforeSearchFn">
<div slot="concatType" slot-scope="scope">
<p v-if="scope.scope.concatType == 1">督导</p>
<p v-if="scope.scope.concatType == 2">驻店</p>
</div>
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope" />
<auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" />
</d2-table>
</div>
<d2-dialog :title="'上传文件'"
:is-visible="fileVisible"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport">
<d2-dialog :title="'上传文件'" :is-visible="fileVisible" @closeDialog="handleImport" @confirmDialog="handleConfirmImport">
<slot>
<el-form :model="fileForm"
ref="fileRuleForm"
:rules="fileRules"
label-width="120px">
<el-form-item label="导入文件:"
prop="fileName">
<el-form :model="fileForm" ref="fileRuleForm" :rules="fileRules" label-width="120px">
<el-form-item label="导入文件:" prop="fileName">
<el-col :span="16">
<el-input readonly
v-model="fileForm.fileName" />
<el-input readonly v-model="fileForm.fileName" />
</el-col>
<el-col :span="4"
class="m-l-md">
<el-col :span="4" class="m-l-md">
<el-button class="import-btn">导入文件
<input type="file"
id="fileUpload"
class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@change="importFile($event)">
<el-link href="http://img01.glsx.com.cn/upload/salesexcel/企微推送对象导入模板.xlsx"
type="primary"
class="import-template"
icon="el-icon-link">模版下载</el-link>
<input type="file" id="fileUpload" class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)">
<el-link href="http://img01.glsx.com.cn/upload/salesexcel/企微推送对象导入模板.xlsx" type="primary"
class="import-template" icon="el-icon-link">模版下载</el-link>
</el-button>
</el-col>
</el-form-item>
</el-form>
</slot>
</d2-dialog>
<d2-dialog :title="chooseType"
@closeDialog="handleObject"
@confirmDialog="handleConfirmObject"
:is-visible="pushVisible">
<d2-dialog :title="chooseType" @closeDialog="handleObject" @confirmDialog="handleConfirmObject"
:is-visible="pushVisible">
<slot>
<el-form :model="pushForm"
ref="pushForm"
:rules="rules"
style="margin-left: 59px;">
<el-form-item label="类型:"
prop="concatType">
<el-select v-model="pushForm.concatType"
clearable
style="width: 280px;"
placeholder="请选择"
@change="changeValue">
<el-option v-for="item in state"
:key="item.value"
:label="item.label"
:value="item.value" />
<el-form :model="pushForm" ref="pushForm" :rules="rules" style="margin-left: 59px;">
<el-form-item label="类型:" prop="concatType">
<el-select v-model="pushForm.concatType" clearable style="width: 280px;" placeholder="请选择"
@change="changeValue">
<el-option v-for="item in state" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="商户:"
prop="merchantName">
<el-select v-model="pushForm.merchantName"
clearable
filterable
style="width: 280px;"
placeholder="请选择">
<el-option v-for="item in changeList"
:key="item.merchantId"
:label="item.merchantName"
:value="item.merchantName" />
<el-form-item label="商户:" prop="merchantName">
<el-select v-model="pushForm.merchantName" clearable filterable style="width: 280px;" placeholder="请选择">
<el-option v-for="item in changeList" :key="item.merchantId" :label="item.merchantName"
:value="item.merchantName" />
</el-select>
</el-form-item>
<el-form-item label="姓名:"
prop="name">
<el-input v-model="pushForm.name"
style="width: 280px;"
placeholder="请输入姓名"
clearable />
<el-form-item label="姓名:" prop="name">
<el-input v-model="pushForm.name" style="width: 280px;" placeholder="请输入姓名" clearable />
</el-form-item>
<el-form-item label="手机号:"
prop="phone"
style="margin-left: -15px;">
<el-input v-model="pushForm.phone"
style="width: 280px;"
placeholder="请输入手机号"
clearable />
<el-form-item label="手机号:" prop="phone" style="margin-left: -15px;">
<el-input v-model="pushForm.phone" style="width: 280px;" placeholder="请输入手机号" clearable />
</el-form-item>
</el-form>
</slot>
......@@ -217,13 +161,13 @@ export default {
merchantName: [{ required: true, message: '请选择商户', trigger: 'change' }],
name: [{ required: true, message: '请输入姓名', trigger: 'change' }],
phone: [{ required: true, message: '请输入手机号', trigger: 'change' },
{
validator: (rule, value, callback) => {
const phoneReg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
return phoneReg.test(value) ? callback() : callback(new Error('请输入正确的联系号码'))
},
trigger: 'change'
}
{
validator: (rule, value, callback) => {
const phoneReg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
return phoneReg.test(value) ? callback() : callback(new Error('请输入正确的联系号码'))
},
trigger: 'change'
}
]
},
fileRules: {
......@@ -456,12 +400,15 @@ export default {
.outputValue-list {
position: relative;
}
.outputValue-list .m-l-md {
margin-left: 20px;
}
.outputValue-list .import-btn {
position: relative;
}
.outputValue-list .import-input {
opacity: 0;
position: absolute;
......@@ -472,6 +419,7 @@ export default {
cursor: pointer;
font-size: 0;
}
.outputValue-list .import-template {
position: absolute;
height: 20px;
......
......@@ -75,9 +75,8 @@
<span class="txt-blue" v-if="scope.scope.shareStaffSource == 3">@员工</span>
</span>
</div>
<span v-if="
!scope.scope.shareStaffImageUrl && !scope.scope.shareStaffName
">-</span>
<span v-if="!scope.scope.shareStaffImageUrl && !scope.scope.shareStaffName
">-</span>
</div>
<div slot="assignName" slot-scope="scope">
<div class="flex-align">
......@@ -127,18 +126,17 @@
</div>
<div slot="auth-button" slot-scope="scope">
<span style="margin-left: 10px;">
<auth-button slot="auth-button" :show-btn-ids="['9040106']" :data="scope.scope" />
<auth-button slot="auth-button" :show-btn-ids="['9040106']" :data="scope.scope" />
</span>
<span>
<el-button type="text" size="mini" style="margin-left: 10px" @click="handleEnd(scope.scope)" v-if="
scope.scope.marketingStatus &&
<el-button type="text" size="mini" style="margin-left: 10px" @click="handleEnd(scope.scope)" v-if="scope.scope.marketingStatus &&
scope.scope.marketingStatus == 3
">
">
设为已完结
</el-button>
</span>
<!-- 仅预支付状态显示 -->
<span v-if="scope.scope.tailOrderStatus == '3'">
<span v-if="scope.scope.tailOrderStatus == '3'">
<el-button type="text" size="mini" style="margin-left: 10px" @click="record(scope.scope)">
确认补录
</el-button>
......@@ -180,7 +178,7 @@
<el-button class="import-btn">
导入文件
<input type="file" id="fileUpload" class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)" />
<el-link type="primary" class="import-template"
href="https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/对账单模版.xlsx" icon="el-icon-link">
......@@ -1315,11 +1313,11 @@ export default {
orderCode: row?.orderCode,
refundRemark: value
}).then(res => {
this.notice.okTips()
this.$refs.crowdfundTable.refreshTable()
this.handleSearch()
this.notice.okTips()
this.$refs.crowdfundTable.refreshTable()
this.handleSearch()
})
}).catch(() => {})
}).catch(() => { })
},
ruleInfoDialogClose(flag) {
this.ruleInfoVisible = !this.ruleInfoVisible
......
......@@ -176,7 +176,8 @@
<el-button class="import-btn">
导入文件
<input type="file" id="fileUpload" class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" @change="importFile($event)">
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)">
<!-- href="http://img01.glsx.com.cn/upload/salesexcel/园区店客户订单导入模板.xlsx?fname=自定义文件名称.zip" -->
<!-- href="https://img01.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/园区店客户订单导入模板.xlsx" -->
<el-link type="primary" class="import-template"
......
<template>
<div>
<baseDialog :is-show.sync="dialogShow" :config="dialogConfig.setting" :dialog-config="dialogConfig.config" @closeDialog="handleDetailClose(false)">
<div class="edit-order-dialog" v-if="dialogShow">
<div class="addressTitle">
<img src="../images/addressIcon.webp" alt="" class="icon">
<span class="title">{{ paramsObj.merchantName }}</span>
</div>
<div class="address-info">
<span class="name">收货人:<span class="label">{{ detailInfo.contactName }}</span></span>
<span class="phone">电话:<span class="label">{{ detailInfo.contactPhone }}</span></span>
<span class="address">收货地址:<span class="label">{{ detailInfo.contactAddress }}</span></span>
</div>
<div class="table-class">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" :has-page="hasPage" @refreshTable="refreshTable" :table-data="detailInfo.tableData" :table-total="detailInfo.tableTotal">
<div slot="nowPurNum" slot-scope="scope">
<div v-if="detailInfo.tableData[scope.index].purchaseNumber == detailInfo.tableData[scope.index].goodsNumber">{{ detailInfo.tableData[scope.index].shipper || '未分配'}}</div>
<div v-else-if="detailInfo.tableData[scope.index].shipper && detailInfo.tableData[scope.index].purchaseNumber != 0">{{ detailInfo.tableData[scope.index].shipper }}</div>
<div v-else-if="detailInfo.tableData[scope.index].purchaseNumber != 0 && !detailInfo.tableData[scope.index].shipper">未分配</div>
<el-select v-else v-model="nowPurNumList[scope.index]" placeholder="请选择" clearable>
<el-option v-for="item in staffList" :key="item.uuid" :label="item.staffName" :value="item.uuid">
</el-option>
</el-select>
</div>
</d2-table>
</div>
<div class="footer">
<el-button @click="handleDetailClose(false)">取消</el-button>
<el-button @click="submit" type="primary" v-preventReClick :loading="$store.state.d2admin.loading.value">确定</el-button>
</div>
</div>
</baseDialog>
<card-dialog v-if="cardVisible" :card-visible="cardVisible" :order-info="orderInfo" :selected-list="selectedCardList" @handleClose="handleCardDialog" @handleConfirm="handleCardConfirm"></card-dialog>
</div>
</template>
<script>
import { purchaseOrderDetail, getShipperList, saveshipper } from '@/api/purchaseShopping.js'
import { membraneTypeList } from '@/common/constants.js'
import CardDialog from './CardDialog'
export default {
name: 'AllocateDialog',
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: () => { }
}
},
components: {
CardDialog
},
computed: {
dialogShow: {
get() {
if (this.visible) { }
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: true,
btnList: [
]
},
config: {
title: '发货分配',
width: '1300px'
}
},
isSubmit: false,
dialogData: {},
deliveryCardList: [],
oldPurNumList: [],
nowPurNumList: [],
// 发货卡号
cardVisible: false,
orderInfo: {},
hasPage: false,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableColumns: [
{
label: '商品名称',
prop: 'upgradeGoodsName'
},
{
label: '商品编码',
prop: 'type'
},
{
label: '系列',
prop: 'goodsName'
},
{
label: '所属分类',
prop: 'goodsTypeName'
},
{
label: '采购数量',
prop: 'goodsNumber',
formatter: (cellValue) => {
return membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.goodsNumber}卷` : `${cellValue.goodsNumber}件`
}
},
{
label: '库存总量',
prop: '',
formatter: (cellValue) => {
return membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.conversionValue ? cellValue.goodsNumber * cellValue.conversionValue : '-'}米` : `${cellValue.goodsNumber}件`
}
},
{
label: '采购总价/元',
prop: 'goodsTotalPrice',
formatter: (cellValue) => {
return "¥" + cellValue.goodsTotalPrice
}
},
{
label: '已发货数量',
prop: 'purchaseNumber',
formatter: (cellValue) => {
return membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber || 0}卷` : `${cellValue.purchaseNumber || 0}件`
}
},
{
label: '发货方',
prop: '',
addHtml: 'nowPurNum'
}
]
},
staffList: [],
detailInfo: {}
}
},
mounted() {
this.getStaffList()
},
methods: {
getStaffList() {
getShipperList({}).then(res => {
this.staffList = res
this.getDetail({ currentPage: 1, pageSize: 999 })
})
},
handleDetailClose(isRefresh = false) {
this.$emit('editClose', isRefresh)
},
refreshTable(pageObj) {
this.getDetail(pageObj)
},
getDetail(pageObj) {
// if (!this.paramsObj?.orderCode) {
// return true
// }
this.nowPurNumList = []
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
this.detailInfo.tableData.forEach((item, idx) => {
if (item.shipper) {
this.nowPurNumList[idx] = {}
this.nowPurNumList[idx] = this.staffList.find(k => k.staffName == item.shipper)?.uuid || ''
}
})
})
},
submit() {
this.isSubmit = true
// 验证本次发货数量
// if (this.nowPurNumList.every(item => item == 0 || !item)) {
// this.notice.errorTips('发货方不能全为空')
// return true
// }
var params = {
purchaseOrderGoodsList: []
}
this.detailInfo.tableData.forEach((item, idx) => {
// if (this.nowPurNumList[idx]) {
params.purchaseOrderGoodsList.push({
orderCode: this.paramsObj.orderCode,
id: item.id,
shipperUuid: this.nowPurNumList[idx] || '',
shipper: this.staffList.find(k => k.uuid == this.nowPurNumList[idx])?.staffName || ''
})
// }
})
saveshipper(params).then(res => {
this.handleDetailClose(true)
this.notice.okTips()
}).catch(() => {
})
}
}
}
</script>
<style lang="scss">
.addressTitle {
display: flex;
align-items: center;
.title {
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 16px;
color: #333333;
}
.icon {
width: 28px;
height: 28px;
margin-right: 8px;
}
}
.address-info {
display: flex;
box-sizing: border-box;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
width: 100%;
// height: 36px;
// padding: 0 20px;
margin-top: 10px;
font-size: 14px;
color: #666666;
> span {
margin-right: 20px;
margin-bottom: 10px;
}
.label {
color: #333333;
}
.address {
min-width: 500px;
}
}
.form-content {
margin-top: 16px;
.dis-in-block {
width: 432px;
}
}
.footer {
display: flex;
justify-content: end;
}
.edit-order-dialog .el-input--medium.border-red .el-input__inner {
border: 1px solid #eb4e4e;
}
</style>
<!-- 发货单详情弹窗 -->
<template>
<d2-dialog title="详细信息"
:is-visible="detailVisible"
class="stockMonthDailog"
width="70%"
:no-cancel="true"
btn-ok-label="关闭"
@closeDialog="handleClose"
@confirmDialog="handleClose">
<div class="detail-info">
<div>
发货单号:
<span>{{ detailInfo.deliveryNumber }}</span>
</div>
<div>
承运公司:
<span>{{ detailInfo.deliveryCompany }}</span>
</div>
<div>
发货时间:
<span>{{ detailInfo.deliveryDate }}</span>
<div>
<d2-dialog title="详细信息" :is-visible="detailVisible" class="stockMonthDailog" width="70%" :no-cancel="true"
btn-ok-label="关闭" @closeDialog="handleClose" @confirmDialog="handleClose">
<div class="detail-info">
<div>
发货单号:
<span>{{ detailInfo.deliveryNumber }}</span>
</div>
<div>
承运公司:
<span>{{ detailInfo.deliveryCompany }}</span>
</div>
<div>
发货时间:
<span>{{ detailInfo.deliveryDate }}</span>
</div>
</div>
</div>
<template v-for="(item, index) in detailInfo.deliveryDetailList">
<div class="table-wrap"
:key="index">
<div class="detail-info">
<div>
商品名称:
<span>{{ item.goodsName }}</span>
</div>
<div>
发货数量:
<span>{{ item.purchaseNumber + (membraneTypeList.includes(item.goodsType) ? '卷' : '件')}}</span>
<template v-for="(item, index) in detailInfo.deliveryDetailList">
<div class="table-wrap" :key="index">
<div class="detail-info">
<div>
商品名称:
<span>{{ item.upgradeGoodsName }}</span>
</div>
<div>
发货数量:
<span>{{ item.purchaseNumber + (membraneTypeList.includes(item.goodsType) ? '卷' : '件') }}</span>
<el-button type="text" class="lookNumber" @click="lookNumber(item.deliveryCardList)"
v-if="item.deliveryCardList && item.deliveryCardList.length > 0">查看卡号</el-button>
</div>
<div>
可用库存数量:
<span>{{ item.stockNum + (membraneTypeList.includes(item.goodsType) ? '米' : '件') }}</span>
</div>
</div>
<div>
可用库存数量:
<span>{{ item.stockNum + (membraneTypeList.includes(item.goodsType) ? '米' : '件')}}</span>
<d2-table ref="recordTable" v-if="item.deliveryCardList === null || item.deliveryCardList.length == 0"
:table-data="item.goodsWarehousingList" :table-params="tableParams" :has-page="false">
</d2-table>
<div v-else class="message">
已自动入库至商户的权益卡管理中,可前往“库存管理-权益卡管理”中查询
</div>
</div>
<d2-table ref="recordTable"
:tableData="item.goodsWarehousingList"
:table-params="tableParams"
:hasPage="false">
</d2-table>
</div>
</template>
</d2-dialog>
</template>
</d2-dialog>
<d2-dialog title="查看发货卡号" :is-visible="innerVisible" width="500px" :no-cancel="true" btn-ok-label="关闭"
@closeDialog="innerVisible = false" @confirmDialog="innerVisible = false">
<d2-table class="deliveryCardCon" ref="recordTable" :table-data="tableDataCardList" :table-params="innerParams"
:has-page="false">
</d2-table>
</d2-dialog>
</div>
</template>
<script>
......@@ -62,7 +66,7 @@ export default {
membraneTypeList: membraneTypeList,
detailInfo: {},
searchFormSearch: {},
tableData: [],
// tableData: [],
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
......@@ -77,11 +81,11 @@ export default {
}
}, {
label: '入库仓库',
prop: 'yqMerchantName',
prop: 'yqMerchantName'
// width: '150px'
}, {
label: '入库门店',
prop: 'merchantName',
prop: 'merchantName'
// width: '200px'
}
]
......@@ -90,6 +94,18 @@ export default {
},
merchantDialogVisible: false,
tableDataCardList: [],
innerVisible: false,
innerParams: {
tableOption: false,
tableColumns: [
{
label: '卡号',
prop: 'cardNum'
// width:630
}
]
}
}
},
......@@ -101,7 +117,7 @@ export default {
recordInfo: {
type: Object,
default: () => { }
},
}
},
computed: {
......@@ -116,7 +132,12 @@ export default {
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
lookNumber(data) {
this.innerVisible = true
this.tableDataCardList = data.map(item => {
return { cardNum: item }
})
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
......@@ -131,10 +152,10 @@ export default {
if (this.detailInfo.deliveryDate) {
this.detailInfo.deliveryDate = Util.dateFormate(this.detailInfo.deliveryDate, 'YYYY-MM-DD HH:mm')
}
let _deliveryDetailList = this.detailInfo.deliveryDetailList
const _deliveryDetailList = this.detailInfo.deliveryDetailList
if (_deliveryDetailList && _deliveryDetailList.length > 0) {
_deliveryDetailList.forEach(info => {
let _goodsWarehousingList = info.goodsWarehousingList
const _goodsWarehousingList = info.goodsWarehousingList
if (_goodsWarehousingList && _goodsWarehousingList.length > 0) {
_goodsWarehousingList.forEach(item => {
item.goodsType = info.goodsType
......@@ -161,15 +182,31 @@ export default {
color: #666666ff;
font-size: 14px;
margin-bottom: 16px;
span {
color: #333333ff;
}
.add-btn {
font-size: 14px;
color: #5850ff;
cursor: pointer;
}
}
.deliveryCardCon {
max-height: 60vh;
overflow: auto;
}
.lookNumber {
// font-size: 14px;
// color: ;
// color: #5850ff!important;
cursor: pointer;
margin-left: 8px;
}
.table-wrap {
border: 1px solid #e5e5e5;
padding: 16px;
......
<!-- 发货单详情弹窗 -->
<template>
<div>
<baseDialog title="详细信息" :is-show.sync="detailVisible" :config="dialogConfig.setting"
:dialog-config="dialogConfig.config" width="1050px" :no-cancel="true" btn-ok-label="关闭" @closeDialog="handleClose"
@confirmDialog="handleClose">
<div class="stockMonthDailog">
<div class="detail-info orderCode">
<div>
订单号:
<span>{{ recordInfo.orderCode }}</span>
</div>
</div>
<div class="address-info" v-if="detailInfo[0]">
<span class="name">收货人:<span class="label">{{ detailInfo[0].contactName }}</span></span>
<span class="phone">电话:<span class="label">{{ detailInfo[0].contactPhone }}</span></span>
<span class="address">收货地址:<span class="label">{{ detailInfo[0].contactAddress }}</span></span>
</div>
<div v-for="(itemList, index) in detailInfo" :key="index">
<div class="detail-info">
<div>
发货单号:
<span>{{ itemList.deliveryNumber }}</span>
</div>
<div>
承运公司:
<span>{{ itemList.deliveryCompany }}</span>
</div>
<div>
发货时间:
<span>{{ itemList.deliveryDate }}</span>
</div>
</div>
<d2-table ref="recordTable" :table-data="itemList.deliveryDetailList" :table-params="tableParams"
:has-page="false">
<span slot="deliveryCard" slot-scope="scope">
<template v-if="scope.scope.deliveryCardList && scope.scope.deliveryCardList.length > 1">
<!-- {{ scope.scope.deliveryCardList.length || 0 }} -->
<span>+{{ scope.scope.deliveryCardList.length }} </span>
<el-button mini type="text" @click="handleDeliveryCard(scope.scope.deliveryCardList)">查看</el-button>
</template>
<template v-else-if="scope.scope.deliveryCardList && scope.scope.deliveryCardList.length == 1">
<!-- {{ scope.scope.deliveryCardList.length || 0 }} -->
<span>{{ scope.scope.deliveryCardList[0] }}</span>
<!-- <el-button mini type="text" @click="handleDeliveryCard(scope.scope.deliveryCardList)">查看</el-button> -->
</template>
<template v-else>-</template>
</span>
</d2-table>
</div>
</div>
</baseDialog>
<baseDialog title="查看发货卡号" :config="carDialogConfig.setting" :dialog-config="carDialogConfig.config"
:is-show.sync="handleDeliveryCardVisible" width="500px" :no-cancel="true" btn-ok-label="关闭"
@closeDialog="handleDeliveryCardVisible = false" @confirmDialog="handleDeliveryCardVisible = false">
<d2-table class="deliveryCardCon" ref="recordTable" :table-data="deliveryCardList" :table-params="innerParams"
:has-page="false">
</d2-table>
</baseDialog>
</div>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { factoryView } from '@/api/purchaseShopping.js'
import { membraneTypeList } from '@/common/constants.js'
export default {
name: 'FactoryDeliveryDetailDialog',
props: {
visible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => { }
}
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: [
]
},
config: {
title: '详细信息',
width: '1050px'
}
},
carDialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: [
]
},
config: {
title: '查看发货卡号',
width: '500px'
}
},
userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: membraneTypeList,
detailInfo: '',
searchFormSearch: {},
tableData: [],
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '商品名称',
prop: 'upgradeGoodsName'
},
{
label: '商品编码',
prop: 'type'
},
{
label: '发货数量',
prop: 'purchaseNumber',
formatter: cellValue => {
return membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber}卷` : `${cellValue.purchaseNumber}件`
}
},
{
label: '发货卡号',
prop: 'deliveryCardList',
addHtml: 'deliveryCard'
}
]
},
innerParams: {
tableOption: false,
tableColumns: [
{
label: '卡号',
prop: 'cardNum'
}
]
},
handleDeliveryCardVisible: false,
deliveryCardList: []
}
},
computed: {
detailVisible: {
get() {
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
},
mounted() {
this.getDetail()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
handleDeliveryCard(list) {
this.handleDeliveryCardVisible = true
this.deliveryCardList = list.map(item => {
return { cardNum: item }
})
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
getDetail() {
var params = { orderCode: deepClone(this.recordInfo.orderCode), currentPage: 1, pageSize: 1000 }
factoryView(params).then(res => {
console.log(res, 'res')
this.detailInfo = res.list
this.detailInfo.forEach(item => {
if (item.deliveryDate) {
item.deliveryDate = Util.dateFormate(item.deliveryDate, 'YYYY-MM-DD HH:mm:ss')
}
const _deliveryDetailList = item.deliveryDetailList
console.log(_deliveryDetailList, '_deliveryDetailList')
if (_deliveryDetailList && _deliveryDetailList.length > 0) {
_deliveryDetailList.forEach(info => {
const _goodsWarehousingList = info.goodsWarehousingList
if (_goodsWarehousingList && _goodsWarehousingList.length > 0) {
_goodsWarehousingList.forEach(item => {
item.goodsType = info.goodsType
})
}
})
}
// item.deliveryDetailList.forEach(info => {
// info.goodsWarehousingList.forEach(item => {
// item.goodsType = info.goodsType
// })
// })
})
})
},
handleClose() {
// this.$emit('dialogClose')
this.detailVisible = false
}
}
}
</script>
<style lang="scss" scoped>
.stockMonthDailog {
// ::v-deep.el-dialog {
max-height: 60vh;
overflow: auto;
// }
}
.deliveryCardCon {
max-height: 60vh;
overflow: auto;
}
.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;
}
}
.detail-info {
display: flex;
align-items: center;
justify-content: space-between;
color: #666666ff;
font-size: 14px;
margin-top: 16px;
span {
color: #333333ff;
}
.add-btn {
font-size: 14px;
color: #5850ff;
cursor: pointer;
}
}
.orderCode {
margin-top: 0;
}
.table-wrap {
border: 1px solid #e5e5e5;
padding: 16px;
box-sizing: border-box;
margin-top: 16px;
}
</style>
......@@ -29,7 +29,7 @@
</d2-table>
</div>
<div class="examine-record"
v-if="detailInfo.auditDetaiList">
v-if="detailInfo.auditDetaiList && !paramsObj.factoryType">
<div class="title">审核记录</div>
<div class="record-div">
<div class="record-div-d"
......@@ -45,7 +45,7 @@
<span class="span-txt-two">审核人:{{ item.reviewedBy }}</span>
<span class="span-txt-two">审核时间:{{ item.reviewedDateFormat }}</span>
<span class="span-txt-two"
v-if="[4,6,7].includes(item.status)">驳回原因:{{ item.rejectCause }}</span>
v-if="[4, 6, 7].includes(item.status)">驳回原因:{{ item.rejectCause }}</span>
</div>
<!-- <div class="record-div-d"><span class="dot"></span><span
class="span-txt-one">运营审核</span><span class="span-txt-two">通过</span><span
......@@ -83,7 +83,7 @@ export default {
dialogShow: {
get() {
if (this.visible) {
this.getDetail({ currentPage: 1, pageSize: 20 })
this.getDetail({ currentPage: 1, pageSize: 10 })
}
return this.visible
},
......@@ -94,6 +94,7 @@ export default {
},
mounted() {
this.dynamicParams()
// this.getDetail()
},
data() {
return {
......@@ -214,6 +215,9 @@ export default {
}
)
}
if (this.paramsObj.factoryType) {
this.tableParams.tableColumns = this.tableParams.tableColumns.filter(item => item.prop != 'goodsTotalPrice')
}
},
handleDetailClose() {
......
......@@ -42,7 +42,8 @@
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<div slot="auth-button"
slot-scope="scope">
slot-scope="scope"
width="300">
<!-- 查看 -->
<span style="margin-right: 10px;">
<auth-button :data="scope.scope"
......@@ -54,6 +55,13 @@
<auth-button :data="scope.scope"
:show-btn-ids="['9090402']" />
</span>
<!-- 分配 -->
<span v-show="scope.scope.deliveryStatus != 2"
style="margin-right: 10px;">
<!-- <el-button :data="scope.scope" type="text" @click="handleAllocat(scope.scope)">分配</el-button> -->
<auth-button :data="scope.scope"
:show-btn-ids="['9090404']" />
</span>
<!-- 驳回 -->
<span v-show="scope.scope.deliveryStatus == 1 && scope.scope.status == 5">
<auth-button :data="scope.scope"
......@@ -62,14 +70,14 @@
</div>
</d2-table>
</div>
<orderDeatilDialog :visible.sync="detailVisible"
v-if="detailVisible"
:params-obj="paramsObj"></orderDeatilDialog>
<EditOrderDialog v-if="editVisible"
:visible.sync="editVisible"
:params-obj="dialogData"
@editClose="editClose">
<orderDeatilDialog :visible.sync="detailVisible" v-if="detailVisible" :params-obj="paramsObj"></orderDeatilDialog>
<EditOrderDialog v-if="editVisible" :is-empty-edit="true" :visible.sync="editVisible" :params-obj="dialogData" @editClose="editClose">
</EditOrderDialog>
<AllocateDialog v-if="allocateVisible"
:visible.sync="allocateVisible"
:params-obj="allocateData"
@editClose="allocateClose">
</AllocateDialog>
<!-- :config="rejectConfig.setting" :dialog-config="rejectConfig.config" :config="rejectConfig.setting"-->
<baseDialog :is-show.sync="rejectVisible"
:dialog-config="rejectConfig.config"
......@@ -107,19 +115,22 @@
import { Util, deepClone } from '@/common/util'
import { defaultStatusOptions, defaultStatusOptionsForTable, defaultDeliveryStatusOptions, defaultPutStatusOptions, purchasingPatternOptions } from './constant'
import { mapActions, mapState } from 'vuex'
import { getPurchaseOrderShipmentList, getMerchantList, purchaseOrderReject } from '@/api/purchaseShopping.js'
import { getPurchaseOrderShipmentList, getPurchaseOrderList, getMerchantList, purchaseOrderReject } from '@/api/purchaseShopping.js'
import orderDeatilDialog from './components/orderDetailDialog'
import EditOrderDialog from './components/EditOrderDialog'
import AllocateDialog from './components/AllocateDialog'
// import { limitPrice } from '@/common/format'
export default {
name: 'PurchaseOrder',
components: {
orderDeatilDialog,
EditOrderDialog
EditOrderDialog,
AllocateDialog
},
data() {
return {
editVisible: false,
allocateVisible: false,
reg: {
priceReg: /^\d[\d\.]*$/
},
......@@ -212,6 +223,7 @@ export default {
}
],
getListApi: getPurchaseOrderShipmentList,
// getListApi: getPurchaseOrderList,
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
......@@ -271,6 +283,7 @@ export default {
label: '发货状态',
prop: 'deliveryStatus',
formatter: (cellValue) => {
// 1:未发货,2全部发货,3部分发货
return defaultDeliveryStatusOptions.find(item => item.id == cellValue.deliveryStatus)?.label || '-'
},
className: (cellValue) => {
......@@ -285,6 +298,7 @@ export default {
label: '订单状态',
prop: 'status',
formatter: (cellValue) => {
// 1.待审核,2运营已审核,3.已取消,4.运营已驳回,5.商务已审核,6.商务已驳回,7.发货已驳回
return defaultStatusOptionsForTable.find(item => item.id == cellValue.status)?.label || '-'
},
className: (cellValue) => {
......@@ -326,7 +340,8 @@ export default {
orderCode: '',
deliveryCompany: '',
deliveryNumber: ''
}
},
allocateData: {}
}
},
computed: {
......@@ -453,13 +468,25 @@ export default {
}
})
},
// 分配
handleAllocat(row) {
this.allocateVisible = true
this.allocateData.orderCode = row.orderCode
this.allocateData.merchantName = row.merchantName
this.allocateData.merchantId = row.merchantId
},
allocateClose(isRefresh) {
this.handleAllocateClose()
isRefresh && this.$refs.purchaseAndDeliveryTable.refreshTable()
},
handleAllocateClose() {
this.allocateVisible = !this.allocateVisible
},
// 确认发货
handleDelivery(row) {
this.editVisible = true
this.$nextTick(() => {
this.dialogData.orderCode = row.orderCode
this.dialogData.merchantName = row.merchantName
})
this.dialogData.orderCode = row.orderCode
this.dialogData.merchantName = row.merchantName
},
// 查看详情
handleDetail(row) {
......
<!-- 权益卡管理 -->
<template>
<div>
<d2-container>
<div class="header"
slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
labelWidth="110px"
:search-form="searchForm"
:form-data="showFormData" />
<div class="up-btns">
<el-button @click="handleSearch"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header :left-span="20">
<span slot="left">
总数量:<span class="count-txt">{{ statisticsData.count }}</span>,
待激活数量:<span class="count-txt">{{
statisticsData.waitActivationCount }}</span>,已激活数量:<span class="count-txt">{{
statisticsData.activatedCount }}</span></span>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope" />
</d2-table>
</div>
</d2-container>
</div>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { vdCardPage, vdCardCount } from '@api/stockManage'
export default {
name: 'BenefitCardManageList',
components: {
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
statisticsData: {},
searchForm: {
vdCardCodeLike: '',
businessCodeLike: '',
deliveryNumberLike: '',
merchantName: '',
activationBusinessCodeLike: '',
cardStatus: '',
activationMerchantName: '',
activationCustomerName: '',
activationCustomerPhoneLike: ''
},
searchFormSearch: {},
showFormData: [{
label: '卡号',
name: 'vdCardCodeLike',
type: 'input',
maxlength: '20',
isClear: true
},
{
label: '关联业务单号',
name: 'businessCodeLike',
type: 'input',
maxlength: '20',
isClear: true
},
{
label: '关联发货单号',
name: 'deliveryNumberLike',
type: 'input',
maxlength: '20',
isClear: true
},
{
label: '所属商户',
name: 'merchantName',
type: 'input',
maxlength: '20',
isClear: true
},
{
label: '激活业务单号',
name: 'activationBusinessCodeLike',
type: 'input',
maxlength: '20',
isClear: true
},
{
label: '状态',
name: 'cardStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'cardStatusList'
},
{
label: '激活门店',
name: 'activationMerchantName',
type: 'input',
maxlength: '20',
isClear: true
},
{
label: '激活客户',
name: 'activationCustomerName',
type: 'input',
isClear: true
},
{
label: '客户手机号',
name: 'activationCustomerPhoneLike',
type: 'input',
isClear: true
}],
getListApi: vdCardPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: false,
tableColumns: [{
label: '卡号',
prop: 'vdCardCode',
width: 150
},
{
label: '入库时间',
prop: 'warehouseTime',
formatter: cellValue => {
return cellValue.warehouseTime ? Util.dateFormate(cellValue.warehouseTime, 'YYYY-MM-DD HH:mm:ss') : ''
},
width: 180
},
{
label: '关联业务单号',
prop: 'businessCode',
width: 150
},
{
label: '关联发货单号',
prop: 'deliveryNumber',
width: 150
},
{
label: '所属商户',
prop: 'merchantName',
width: 150
},
{
label: '状态',
prop: 'cardStatus',
width: 100,
formatter: cellValue => {
return this.baseData.cardStatusList.find(item => item.confId === cellValue.cardStatus?.toString())?.confLabel
}
},
{
label: '激活业务单号',
prop: 'activationBusinessCode',
width: 150
},
{
label: '激活时间',
prop: 'activationTime',
formatter: cellValue => {
return cellValue.activationTime ? Util.dateFormate(cellValue.activationTime, 'YYYY-MM-DD HH:mm:ss') : ''
},
width: 180
},
{
label: '激活门店',
prop: 'activationMerchantName',
width: 120
},
{
label: '激活客户',
prop: 'activationCustomerName',
width: 120
},
{
label: '客户手机号',
prop: 'activationCustomerPhone',
width: 200,
formatter: cellValue => {
return cellValue.activationCustomerPhone || '-'
}
}
]
},
baseData: {
cardStatusList: [
{
confId: '1',
confLabel: '待激活'
},
{
confId: '2',
confLabel: '已激活'
}
]
},
stockDetailDialogVisible: false,
stockMonthVisible: false,
recordInfo: null
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
this.getBaseData()
this.vdCardCount()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() {
this.getOptionsList()
},
// 统计
vdCardCount() {
let _params = this.searchFormSearch
vdCardCount(_params).then(res => {
this.statisticsData = res || []
})
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
const temp = {}
temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部'
this.baseData[item.optionsName].unshift(temp)
}
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
handleSearch() {
this.$refs.recordTable.refreshTable()
this.vdCardCount()
},
handleReset() {
this.searchForm = {
vdCardCodeLike: '',
businessCodeLike: '',
deliveryNumberLike: '',
merchantName: '',
activationBusinessCodeLike: '',
cardStatus: '',
activationMerchantName: '',
activationCustomerName: '',
activationCustomerPhoneLike: ''
}
this.$refs.recordTable.refreshTable()
},
handleExport() {
var params = this.searchFormSearch
params.method = 'dj.api.smartcarlife.stock.vdCard.export.async'
const list = [
...this.dowloadList,
{
name: '权益卡管理列表',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
}
}
</script>
<style scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
}
</style>
<!-- 虚拟对公账户详情 -->
<template>
<div class="account-detail"
ref="accountDetail">
<div class="account-detail" ref="accountDetail">
<!-- v-resize="resetTableHeight"
:ref="'resize' + index" -->
<div v-for="(formItem,index) in formArray"
v-resize="resetTableHeight"
:ref="'resize' + index"
:key="index">
<p class="edit-sub-title "
:class="{'sub-border':!formItem.show}">
<div v-for="(formItem, index) in formArray" v-resize="resetTableHeight" :ref="'resize' + index" :key="index">
<p class="edit-sub-title " :class="{ 'sub-border': !formItem.show }">
<span class="label">{{ formItem.label }}</span>
<span class="collapse"
@click="formItem.show = !formItem.show">
<i :class="{'move':!formItem.show}"
class="arrow el-icon-arrow-down" />
{{ formItem.show?'收起':'展开' }} </span>
<span class="collapse" @click="formItem.show = !formItem.show">
<i :class="{ 'move': !formItem.show }" class="arrow el-icon-arrow-down" />
{{ formItem.show ? '收起' : '展开' }} </span>
</p>
<el-collapse-transition>
<div v-show="formItem.show"
class="itemContainer">
<el-form :model="merchantRow"
label-width="170px">
<div v-show="formItem.show" class="itemContainer">
<el-form :model="merchantRow" label-width="170px">
<!-- <p class="edit-sub-title ">账户信息</p>
<el-form-item label="客户名称:"
prop="name">
<span>{{merchantRow.merchantName}}</span>
</el-form-item>
<p class="edit-sub-title">申请资料</p> -->
<div v-for="(item, index) in formItem.formList"
:key="index">
<div v-for="(item, index) in formItem.formList" :key="index">
<!-- <el-form-item v-if="(item.showAttrList ? item.showAttrList.includes(detailForm.custType) : true)&&(item.showPayType?item.showPayType.includes(detailForm.settlementType):true)"
:label="typeof item.label === 'object' ? (item.label[currentPage] + ':') : (item.label + ':')"
required
......@@ -42,27 +32,22 @@
:src="detailForm.papersList?detailForm.papersList[imgToAttr[subItem]]:''">
</span> -->
<!-- .toString() -->
<el-form-item v-if="(item.showAttrList ? item.showAttrList.includes(detailForm.custType ) : true)&&(item.showPayType?item.showPayType.includes(detailForm.settlementType):true)&&(item.contractType?item.contractType.includes(detailForm.contractType || 1 ):true)"
:label="typeof item.label === 'object' ? (item.label[currentPage] + ':') : (item.label + ':')"
required
:prop="item.prop">
<el-form-item
v-if="(item.showAttrList ? item.showAttrList.includes(detailForm.custType) : true) && (item.showPayType ? item.showPayType.includes(detailForm.settlementType) : true) && (item.contractType ? item.contractType.includes(detailForm.contractType || 1) : true)"
:label="typeof item.label === 'object' ? (item.label[currentPage] + ':') : (item.label + ':')" required
:prop="item.prop">
<span v-if="item.type === 'image'">
<!-- <div></div> style="display:inline-block" -->
<span v-for="(subItem, subIdx) in item.imgList"
class="imageContainer"
:key="subIdx">
<span v-for="(subItem, subIdx) in item.imgList" class="imageContainer" :key="subIdx">
<!-- v-for="(subItem, subIdx) in item.imgList" -->
<img class="detail-img"
:src="detailForm.papersList?detailForm.papersList[imgToAttr[subItem]]:''">
<img class="detail-img" :src="detailForm.papersList ? detailForm.papersList[imgToAttr[subItem]] : ''">
<span class="img-btns"
@click.stop="handleImgLook(detailForm.papersList?detailForm.papersList[imgToAttr[subItem]]:'')">
@click.stop="handleImgLook(detailForm.papersList ? detailForm.papersList[imgToAttr[subItem]] : '')">
<span class="btn-item">
<i class="el-icon-zoom-in"
style="font-size:30px" />
<i class="el-icon-zoom-in" style="font-size:30px" />
</span>
</span>
<div v-if="item.labelList"
class="imageLabel">
<div v-if="item.labelList" class="imageLabel">
{{ item.labelList[subIdx] }}
</div>
</span>
......@@ -73,10 +58,8 @@
:key="subIdx">{{detailForm.papersList?detailForm.papersList[imgToAttr[subItem]]:''}}</span> -->
</span>
<span v-else-if="item.formatter">{{ item.formatter(item) }}</span>
<span v-else-if="item.type== 'url'"
class="link"
@click="downloads">点击链接下载</span>
<span v-else>{{ detailForm[item.prop]||'' }}</span>
<span v-else-if="item.type == 'url'" class="link" @click="downloads">点击链接下载</span>
<span v-else>{{ detailForm[item.prop] || '' }}</span>
</el-form-item>
</div>
</el-form>
......@@ -108,11 +91,8 @@
</el-form-item>
</div>
</el-form> -->
<el-dialog :visible.sync="lookImgVisible"
append-to-body>
<img width="100%"
:src="picUrl"
alt="图片">
<el-dialog :visible.sync="lookImgVisible" append-to-body>
<img width="100%" :src="picUrl" alt="图片">
</el-dialog>
</div>
</template>
......@@ -726,7 +706,7 @@ export default {
// case 'application/vnd.ms-excel;charset=UTF-8':
// file = 'xls'
// break
// case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8':
// case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel;charset=UTF-8':
// file = 'xlsx'
// break
......@@ -736,7 +716,7 @@ export default {
// // case ".ppt" : response.setContentType("application/vnd.ms-powerpoint");break;
// // case ".pptx" : response.setContentType("application/vnd.openxmlformats-officedocument.presentationml.presentation");break;
// // case ".xls" : response.setContentType("application/vnd.ms-excel");break;
// // case ".xlsx" : response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");break;
// // case ".xlsx" : response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel");break;
// }
// this.loading = false
// // let fileName = this.articleInformation.title + '.' + file
......@@ -788,12 +768,14 @@ export default {
overflow-y: scroll;
overflow-x: hidden;
}
.edit-sub-title {
padding: 17px 0;
margin: 0;
display: flex;
justify-content: space-between;
font-size: 14px;
&::before {
top: 50%;
transform: translateY(-50%);
......@@ -802,30 +784,37 @@ export default {
.label {
padding-left: 8px;
}
.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;
}
}
.account-detail .detail-img {
width: 180px;
height: 104px;
......@@ -836,6 +825,7 @@ export default {
cursor: pointer;
margin-right: 100px;
}
// .account-detail .detail-img:hover {
// margin-right: 0px;
// width: 90%;
......@@ -849,6 +839,7 @@ export default {
background: #f4f6fc;
border-radius: 2px;
}
.imageContainer {
// style="display: inline-block;"
// max-height: 50%;
......@@ -861,6 +852,7 @@ export default {
// justify-content: space-between;
}
.imageLabel {
line-height: 14px;
width: 137px;
......@@ -870,6 +862,7 @@ export default {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
}
.img-btns {
display: none;
position: absolute;
......@@ -882,6 +875,7 @@ export default {
cursor: pointer;
background: rgba(0, 0, 0, 0.5);
}
.img-btns .btn-item {
position: absolute;
top: 50%;
......@@ -898,6 +892,7 @@ export default {
.imageContainer:hover .img-btns {
display: block;
}
/* .transition-box {
margin-bottom: 10px;
width: 200px;
......@@ -915,21 +910,25 @@ export default {
cursor: pointer;
// /* 鼠标样式*/
}
.link:link {
color: #06f;
text-decoration: none;
// /* 未访问的链接 */
}
.link:visited {
color: #999;
text-decoration: line-through;
// /* 已访问的链接 */
}
.link:hover {
color: #f00;
//* 鼠标移动到链接上 */
text-decoration: underline;
}
.link:active {
// /* 选定的链接 */
color: #f0f;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!