Commit 7f6e45cd by 前端

Merge branch 'SAAS+V5.6.2' into 'develop'

上线合并

See merge request !566
2 parents 2966a0b4 b4400b78
Showing 34 changed files with 7689 additions and 1029 deletions
...@@ -4782,6 +4782,27 @@ ...@@ -4782,6 +4782,27 @@
"lodash": "^4.17.4" "lodash": "^4.17.4"
} }
}, },
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.11.1",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz",
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
"dev": true,
"requires": {
"@vue/component-compiler-utils": "^3.1.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
"vue-style-loader": "^4.1.0"
},
"dependencies": {
"hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
}
}
},
"@vue/vue2-jest": { "@vue/vue2-jest": {
"version": "27.0.0", "version": "27.0.0",
"resolved": "https://registry.npmmirror.com/@vue/vue2-jest/-/vue2-jest-27.0.0.tgz", "resolved": "https://registry.npmmirror.com/@vue/vue2-jest/-/vue2-jest-27.0.0.tgz",
......
...@@ -86,3 +86,12 @@ export function onlinestatementAccountPage(data) { ...@@ -86,3 +86,12 @@ export function onlinestatementAccountPage(data) {
data.method = "dj.api.smartcarlife.onlineStatementAccount.page" data.method = "dj.api.smartcarlife.onlineStatementAccount.page"
return request(data, "post") return request(data, "post")
} }
/**
* 查询银盛线上对账单管理统计信息
*/
export function onlineStatementAccountCountTotal(data) {
data.method = "dj.api.smartcarlife.onlineStatementAccount.countTotal"
return request(data, "post")
}
\ No newline at end of file \ No newline at end of file
...@@ -11,6 +11,12 @@ export function getyqMerchantList(data) { ...@@ -11,6 +11,12 @@ export function getyqMerchantList(data) {
return request(data) return request(data)
} }
// 调拨-获取调出仓库列表 (H5)
export function stockAllocateYqMerchantList(data) {
data.method = "dj.smartcarlife.api.stock.allocate.h5.yqMerchant.list"
return request(data, RequestMethods.POST)
}
// 根据仓库获取门店列表 // 根据仓库获取门店列表
export function getServicemerchantrefList(data) { export function getServicemerchantrefList(data) {
data.method = `${path2}servicemerchantref.list` data.method = `${path2}servicemerchantref.list`
...@@ -65,6 +71,48 @@ export function stockAllocatePage(data) { ...@@ -65,6 +71,48 @@ export function stockAllocatePage(data) {
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 运营/商务审核分页查询
export function stockAllocateOperatorReviewPage(data) {
data.method = "dj.smartcarlife.api.stockAllocate.operatorreview.page"
return request(data, RequestMethods.POST)
}
// 运营审核
export function stockAllocateOperatorAudit(data) {
data.method = "dj.smartcarlife.api.stockAllocate.operatorAudit"
return request(data, RequestMethods.POST)
}
// 商务审核
export function stockAllocateBusinessAudit(data) {
data.method = "dj.smartcarlife.api.stockAllocate.businessAudit"
return request(data, RequestMethods.POST)
}
// 运营驳回
export function stockAllocateOperatorReject(data) {
data.method = "dj.smartcarlife.api.stockAllocate.operatorReject"
return request(data, RequestMethods.POST)
}
// 商务驳回
export function stockAllocateBusinessReject(data) {
data.method = "dj.smartcarlife.api.stockAllocate.businessReject"
return request(data, RequestMethods.POST)
}
// 调拨单详情(主信息)
export function stockAllocateGetDetail(data) {
data.method = "dj.smartcarlife.api.stock.allocate.getDetail"
return request(data, RequestMethods.POST)
}
// 查询调拨信息详情(包含商品列表)
export function stockAllocateInfo(data) {
data.method = "dj.smartcarlife.api.stock.allocate.info"
return request(data, RequestMethods.POST)
}
// 分页查询调拨详细信息 // 分页查询调拨详细信息
export function stockAllocateDetailPage(data) { export function stockAllocateDetailPage(data) {
data.method = `${path3}stock.allocate.detail.page` data.method = `${path3}stock.allocate.detail.page`
...@@ -107,6 +155,12 @@ export function merchantShopGoodsStockPage(data) { ...@@ -107,6 +155,12 @@ export function merchantShopGoodsStockPage(data) {
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 获取门店库存列表 (H5)
export function merchantShopGoodsStockPageH5(data) {
data.method = "dj.smartcarlife.api.stock.allocate.h5.merchantShopGoodsStock.page"
return request(data, RequestMethods.POST)
}
// 分页查询库存管理-权益卡 // 分页查询库存管理-权益卡
export function vdCardPage(data) { export function vdCardPage(data) {
data.method = `dj.smartcarlife.stock.vdCard.page` data.method = `dj.smartcarlife.stock.vdCard.page`
...@@ -166,3 +220,57 @@ export function stockRefundUpdateStatus(data) { ...@@ -166,3 +220,57 @@ export function stockRefundUpdateStatus(data) {
data.method = "dj.smartcarlife.api.stock.refund.updateStatus" data.method = "dj.smartcarlife.api.stock.refund.updateStatus"
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 调拨发货列表数据
export function getTransferShipmentList(data) {
data.method = "dj.smartcarlife.api.stock.allocate.delivery.page"
return request(data, RequestMethods.POST)
}
// 调拨发货 批量发货
export function batchDelicery(data) {
data.method = "dj.api.smartcarlife.allocate.delivery.batch"
return request(data, RequestMethods.POST)
}
// 调拨发货驳回
export function deliveryReject(data) {
data.method = "dj.smartcarlife.api.stock.allocate.delivery.reject"
return request(data, RequestMethods.POST)
}
// 获取查看调拨详情商品信息
export function getTransferGoodsInfo(data) {
data.method = "dj.smartcarlife.api.stock.allocate.detail.page"
return request(data, RequestMethods.POST)
}
// 获取查看调拨详情审批记录信息
export function getTransferAuitInfo(data) {
data.method = "dj.smartcarlife.api.stock.allocate.info"
return request(data, RequestMethods.POST)
}
// 发货单列表数据
export function getDeliveryPage(data) {
data.method = "dj.api.smarcarlife.purchaseOrder.delivery.page"
return request(data, RequestMethods.POST)
}
// 发货签收单
export function deliveryPdf(data) {
data.method = "dj.api.smarcarlife.warehousedeliver.detail.pdf"
return request(data, RequestMethods.POST)
}
// 发货单详情
export function getDeliveryDetail(data) {
data.method = "dj.api.smarcarlife.purchaseOrder.delivery.detail"
return request(data, RequestMethods.POST)
}
// 获取出入库列表数据
export function getInventoryTransactionRecordsPage(data) {
data.method = "dj.api.smartcarlife.StockFlow.page"
return request(data, RequestMethods.POST)
}
<template> <template>
<div class="d2-layout-header-aside-group" :style="styleLayoutMainGroup" :class="{ grayMode: grayActive }"> <div
class="d2-layout-header-aside-group"
:style="styleLayoutMainGroup"
:class="{ grayMode: grayActive }"
>
<!-- 半透明遮罩 --> <!-- 半透明遮罩 -->
<div class="d2-layout-header-aside-mask" /> <div class="d2-layout-header-aside-mask" />
<!-- 主体内容 --> <!-- 主体内容 -->
<div class="d2-layout-header-aside-content" flex="dir:top"> <div class="d2-layout-header-aside-content" flex="dir:top">
<!-- 顶栏 --> <!-- 顶栏 -->
<div class="d2-theme-header" :style="{ <div
opacity: this.searchActive ? 0.5 : 1 class="d2-theme-header"
}" flex-box="0" flex> :style="{
<div class="logo-group d2-theme-header-logo" :class="asideCollapse ? 'logo-only' : 'logo-all'" flex-box="0"> opacity: this.searchActive ? 0.5 : 1
}"
flex-box="0"
flex
>
<div
class="logo-group d2-theme-header-logo"
:class="asideCollapse ? 'logo-only' : 'logo-all'"
flex-box="0"
>
<img v-if="asideCollapse" src="../../assets/icon-only.png" /> <img v-if="asideCollapse" src="../../assets/icon-only.png" />
<img v-else src="../../assets/all.png" /> <img v-else src="../../assets/all.png" />
<!-- <img style="width: 32px; height: 32px;" src="../../assets/icon-only.png"> --> <!-- <img style="width: 32px; height: 32px;" src="../../assets/icon-only.png"> -->
...@@ -35,24 +48,47 @@ ...@@ -35,24 +48,47 @@
<d2-header-user /> <d2-header-user />
</div> </div>
</div> </div>
<div class="d2-theme-header" style="height: 40px; font-size: 14px; border-top: 1px solid #f0f2f5" flex-box="0" <div
flex> class="d2-theme-header"
<div class="logo-group d2-theme-header-logo" style="height: 1px; margin-top: -1px" style="height: 40px; font-size: 14px; border-top: 1px solid #f0f2f5"
:class="asideCollapse ? 'logo-only' : 'logo-all'" flex-box="0" /> flex-box="0"
<hamburger :on-click="handleToggleAside" :is-active="asideCollapse" flex-box="0" class="toggle-aside-btn" /> flex
>
<div
class="logo-group d2-theme-header-logo"
style="height: 1px; margin-top: -1px"
:class="asideCollapse ? 'logo-only' : 'logo-all'"
flex-box="0"
/>
<hamburger
:on-click="handleToggleAside"
:is-active="asideCollapse"
flex-box="0"
class="toggle-aside-btn"
/>
<span class="header-title">{{ headerTitle }}</span> <span class="header-title">{{ headerTitle }}</span>
</div> </div>
<!-- 下面 主体 --> <!-- 下面 主体 -->
<div class="d2-theme-container" flex-box="1" flex> <div class="d2-theme-container" flex-box="1" flex>
<!-- 主体 侧边栏 --> <!-- 主体 侧边栏 -->
<div flex-box="0" ref="aside" class="d2-theme-container-aside" :style="{ <div
width: asideCollapse ? asideWidthCollapse : asideWidth, flex-box="0"
opacity: this.searchActive ? 0.5 : 1 ref="aside"
}"> class="d2-theme-container-aside"
:style="{
width: asideCollapse ? asideWidthCollapse : asideWidth,
opacity: this.searchActive ? 0.5 : 1
}"
>
<d2-menu-side /> <d2-menu-side />
</div> </div>
<!-- 主体 --> <!-- 主体 -->
<div class="d2-theme-container-main" :class="this.searchActive ? 'is-search' : ''" flex-box="1" flex> <div
class="d2-theme-container-main"
:class="this.searchActive ? 'is-search' : ''"
flex-box="1"
flex
>
<!-- 搜索 --> <!-- 搜索 -->
<transition name="fade-scale"> <transition name="fade-scale">
<div v-if="searchActive" class="d2-theme-container-main-layer" flex> <div v-if="searchActive" class="d2-theme-container-main-layer" flex>
...@@ -61,14 +97,21 @@ ...@@ -61,14 +97,21 @@
</transition> </transition>
<!-- 内容 --> <!-- 内容 -->
<transition name="fade-scale"> <transition name="fade-scale">
<div v-if="!searchActive" class="d2-theme-container-main-layer" flex="dir:top"> <div
v-if="!searchActive"
class="d2-theme-container-main-layer"
flex="dir:top"
>
<!-- tab --> <!-- tab -->
<div class="d2-theme-container-main-header" flex-box="0"> <div class="d2-theme-container-main-header" flex-box="0">
<!-- <d2-tabs/> --> <!-- <d2-tabs/> -->
</div> </div>
<!-- 页面 --> <!-- 页面 -->
<div class="d2-theme-container-main-body" flex-box="1"> <div class="d2-theme-container-main-body" flex-box="1">
<transition :name="transitionActive ? 'el-fade-in' : ''" mode="out-in"> <transition
:name="transitionActive ? 'el-fade-in' : ''"
mode="out-in"
>
<keep-alive :include="keepAlive"> <keep-alive :include="keepAlive">
<router-view /> <router-view />
</keep-alive> </keep-alive>
...@@ -163,8 +206,8 @@ export default { ...@@ -163,8 +206,8 @@ export default {
return { return {
...(this.themeActiveSetting.backgroundImage ...(this.themeActiveSetting.backgroundImage
? { ? {
backgroundImage: `url('${this.$baseUrl}${this.themeActiveSetting.backgroundImage}')` backgroundImage: `url('${this.$baseUrl}${this.themeActiveSetting.backgroundImage}')`
} }
: {}) : {})
} }
} }
...@@ -173,8 +216,12 @@ export default { ...@@ -173,8 +216,12 @@ export default {
...mapActions("d2admin/menu", ["asideCollapseToggle"]), ...mapActions("d2admin/menu", ["asideCollapseToggle"]),
...mapActions("d2admin/user", ["load"]), ...mapActions("d2admin/user", ["load"]),
findTitle(val) { findTitle(val) {
this.headerTitle = val?.title let title = val?.title
? val.title + (this.headerTitle ? " / " : "") + this.headerTitle if (val?.dynamicTitle && typeof val.dynamicTitle === "function") {
title = val.dynamicTitle(this.$route) || title
}
this.headerTitle = title
? title + (this.headerTitle ? " / " : "") + this.headerTitle
: "" : ""
if (val?.parentId && +val?.parentId !== 1) { if (val?.parentId && +val?.parentId !== 1) {
return this.findTitle( return this.findTitle(
......
...@@ -312,5 +312,276 @@ export const routerName = { ...@@ -312,5 +312,276 @@ export const routerName = {
activePath: "/returnManage" activePath: "/returnManage"
}, },
component: _import("stockManage/returnManage/reviewPage") component: _import("stockManage/returnManage/reviewPage")
},
90809: {
path: "/transferOperationsReview",
name: "transferOperationsReview",
meta: {
title: "运营审核",
authId: "90809",
parentId: "908",
cache: false
},
auth: [
{
authId: "9080901",
parentId: "90809",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9080902",
parentId: "90809",
label: "查看",
handle: "look"
},
{
authId: "9080903",
parentId: "90809",
label: "审批",
handle: "handleReview",
addRoutePath: [
{
authId: "908090301",
name: "审批",
parentId: "90809"
}
]
},
{
authId: "9080904",
parentId: "90809",
label: "驳回",
handle: "handleReject",
addRoutePath: [
{
authId: "908090401",
name: "驳回",
parentId: "90809"
}
]
}
],
component: _import("stockManage/transferOperationsReview/index")
},
90810: {
path: "/transferCommercialReview",
name: "transferCommercialReview",
meta: {
title: "商务审核",
authId: "90810",
parentId: "908",
cache: false
},
auth: [
{
authId: "9081001",
parentId: "90810",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9081002",
parentId: "90810",
label: "查看",
handle: "look"
},
{
authId: "9081003",
parentId: "90810",
label: "审批",
handle: "handleReview",
addRoutePath: [
{
authId: "908100301",
name: "审批",
parentId: "90810"
}
]
},
{
authId: "9081004",
parentId: "90810",
label: "驳回",
handle: "handleReject",
addRoutePath: [
{
authId: "908100401",
name: "驳回",
parentId: "90810"
}
]
}
],
component: _import("stockManage/transferCommercialReview/index")
},
90811: {
path: "/transferShipment",
name: "transferShipment",
meta: {
title: "调拨发货",
authId: "90811",
parentId: "908",
cache: false
},
auth: [
{
authId: "9081101",
parentId: "90811",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9081102",
parentId: "90811",
label: "批量发货",
category: "Button",
type: "primary",
handle: "batchShipment"
},
{
authId: "9081103",
parentId: "90811",
label: "查看",
handle: "handleDetail"
},
{
authId: "9081104",
parentId: "90811",
label: "发货",
handle: "handleShipment"
},
{
authId: "9081105",
parentId: "90811",
label: "驳回",
handle: "handleReject"
}
],
component: _import("stockManage/transferShipment/index")
},
90812: {
path: "/shippingDocument",
name: "shippingDocument",
meta: {
title: "发货单",
authId: "90812",
parentId: "908",
cache: false
},
auth: [
{
authId: "9081201",
parentId: "90812",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9081202",
parentId: "90812",
label: "查看",
handle: "handleDetail"
},
{
authId: "9081203",
parentId: "90812",
label: "发货签收单",
handle: "handleSign"
}
],
component: _import("stockManage/shippingDocument/index")
},
90813: {
path: "/inventoryTransactionRecords",
name: "inventoryTransactionRecords",
meta: {
title: "出入库记录",
authId: "90813",
parentId: "908",
cache: false
},
auth: [
{
authId: "9081301",
parentId: "90813",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
}
],
component: _import("stockManage/inventoryTransactionRecords/index")
},
908090301: {
path: "/transferOperationsReview/handleReview",
name: "handleReview",
meta: {
title: "审批",
authId: "908090301",
parentId: "90809",
cache: false,
dynamicTitle: (route) => {
if (route.query.reviewType === "operator") return "运营审核"
if (route.query.reviewType === "business") return "商务审核"
return "审批"
}
},
component: _import("stockManage/transferOperationsReview/handleReview")
},
908090401: {
path: "/transferOperationsReview/handleReject",
name: "handleReject",
meta: {
title: "驳回",
authId: "908090401",
parentId: "90809",
cache: false,
dynamicTitle: (route) => {
if (route.query.reviewType === "operator") return "运营驳回"
if (route.query.reviewType === "business") return "商务驳回"
return "驳回"
}
},
component: _import("stockManage/transferOperationsReview/handleReject")
},
908100301: {
path: "/transferOperationsReview/handleReview",
name: "handleReview",
meta: {
title: "审批",
authId: "908100301",
parentId: "90810",
cache: false,
dynamicTitle: (route) => {
if (route.query.reviewType === "operator") return "运营审核"
if (route.query.reviewType === "business") return "商务审核"
return "审批"
}
},
component: _import("stockManage/transferOperationsReview/handleReview")
},
908100401: {
path: "/transferOperationsReview/handleReject",
name: "handleReject",
meta: {
title: "驳回",
authId: "908100401",
parentId: "90810",
cache: false,
dynamicTitle: (route) => {
if (route.query.reviewType === "operator") return "运营驳回"
if (route.query.reviewType === "business") return "商务驳回"
return "驳回"
}
},
component: _import("stockManage/transferOperationsReview/handleReject")
} }
} }
<!-- 二手车资金预警 --> <!-- 二手车资金预警 -->
<template> <template>
<d2-container class="container"> <d2-container class="container">
<div class="header" slot="header"> <div
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :form-data="showFormData" class="header"
labelWidth="130px"> slot="header"
>
<d2-search
ref="showSearch"
class="show-search"
:search-select-obj="searchSelectObj"
:search-form="searchForm"
:form-data="showFormData"
labelWidth="130px"
>
</d2-search> </d2-search>
<div class="up-btns"> <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>
<el-button size="small" @click="handleReset"> 重置 </el-button> <el-button
size="small"
@click="handleReset"
> 重置 </el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<div class="btns flex"> <div class="btns flex">
<span data-event-code="ysprepaymentManage_Export"> <span data-event-code="ysprepaymentManage_Export">
<auth-button category="Button" :show-btn-ids="['9051701']" /> <auth-button
category="Button"
:show-btn-ids="['9051701']"
/>
</span> </span>
</div> </div>
</d2-table-header> </d2-table-header>
<d2-table ref="usedCarFundWarningManageTable" :search-form="searchFormSearch" :table-params="tableParams" <d2-table
:get-list-api="getListApi" :before-search-fn="beforeSearchFn"> ref="usedCarFundWarningManageTable"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
show-summary
:summary-method="getSummaries"
>
</d2-table> </d2-table>
</div> </div>
<ManageReceiptDialog v-if="manageReceiptDialogVisible" <ManageReceiptDialog
:manageReceiptDialogVisible.sync="manageReceiptDialogVisible" /> v-if="manageReceiptDialogVisible"
<TrafficFeeDialog v-if="trafficFeeDialogVisible" :trafficFeeDialogVisible.sync="trafficFeeDialogVisible" /> :manageReceiptDialogVisible.sync="manageReceiptDialogVisible"
<PaymentDialog v-if="paymentDialogVisible" :paymentDialogVisible.sync="paymentDialogVisible" /> />
<TrafficFeeDialog
v-if="trafficFeeDialogVisible"
:trafficFeeDialogVisible.sync="trafficFeeDialogVisible"
/>
<PaymentDialog
v-if="paymentDialogVisible"
:paymentDialogVisible.sync="paymentDialogVisible"
/>
</d2-container> </d2-container>
</template> </template>
<script> <script>
import { deepClone } from "@/common/util" import { deepClone } from "@/common/util"
import { onlinestatementAccountPage } from "@api/prepaymentManage" import { onlinestatementAccountPage, onlineStatementAccountCountTotal } from "@api/prepaymentManage"
import { mapActions, mapState } from "vuex" import { mapActions, mapState } from "vuex"
import dayjs from "dayjs" import dayjs from "dayjs"
import reportTrackPageMixin from "@/mixins/reportTrackPageMixin" import reportTrackPageMixin from "@/mixins/reportTrackPageMixin"
...@@ -52,7 +86,7 @@ export default { ...@@ -52,7 +86,7 @@ export default {
// TrafficFeeDialog, // TrafficFeeDialog,
// PaymentDialog // PaymentDialog
}, },
data() { data () {
return { return {
// rangePickerOptions: { // rangePickerOptions: {
// disabledDate(date) { // disabledDate(date) {
...@@ -64,22 +98,41 @@ export default { ...@@ -64,22 +98,41 @@ export default {
// }, // },
searchForm: { searchForm: {
merchantName: '', merchantName: '',
tradeTime: [new Date(), new Date()], // tradeTime: [new Date(), new Date()],
monthrange: '',
yqMerchantName: '' yqMerchantName: ''
}, },
// searchSelectObj: { searchSelectObj: {
// divisionOrPayDate: { divisionOrPayDate: {
// attr: 'daterange', attr: 'monthrange',
// value: [dayjs(), dayjs()] value: [dayjs().subtract(1, 'month'), dayjs().subtract(1, 'month')]
// } }
// }, },
showFormData: [ showFormData: [
{ {
label: '时间范围', type: 'selectDatePicker',
name: 'tradeTime', selectName: 'divisionOrPayDate',
type: 'datePicker',
isClear: true, isClear: true,
pickerOptions: 'rangePickerOptions' diffType: true,
itemStyle: "width: 94%;",
selectWidth: "125px",
selectOption: [{
label: '时间维度(日)',
name: 'daterange',
dateType: 'daterange'
}, {
label: '时间维度(月)',
name: 'monthrange',
dateType: 'monthrange'
}],
handleSelectChange: (value) => {
this.searchSelectObj.divisionOrPayDate.value = ''
}
// label: '时间范围',
// name: 'tradeTime',
// type: 'datePicker',
// isClear: true,
// pickerOptions: 'rangePickerOptions'
}, },
{ {
label: "园区店名称", label: "园区店名称",
...@@ -175,21 +228,22 @@ export default { ...@@ -175,21 +228,22 @@ export default {
manageReceiptDialogVisible: false, manageReceiptDialogVisible: false,
paymentDialogVisible: false, paymentDialogVisible: false,
trafficFeeDialogVisible: false, trafficFeeDialogVisible: false,
detailInfo: {} detailInfo: {},
summaries:{}
} }
}, },
computed: { computed: {
...mapState({ ...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList dowloadList: (state) => state.d2admin.user.dowloadList
}) }),
}, },
provide() { provide () {
return { return {
userInfo: this.$store.state.d2admin.user.info userInfo: this.$store.state.d2admin.user.info
} }
}, },
created() { created () {
// 设置获得当天日期 // 设置获得当天日期
// this.searchForm.daterange = [ // this.searchForm.daterange = [
// dayjs().format("YYYY-MM-DD"), // dayjs().format("YYYY-MM-DD"),
...@@ -197,7 +251,7 @@ export default { ...@@ -197,7 +251,7 @@ export default {
// ] // ]
// this.searchSelectObj.divisionOrPayDate.value = [dayjs(), dayjs()] // this.searchSelectObj.divisionOrPayDate.value = [dayjs(), dayjs()]
}, },
mounted() { mounted () {
}, },
...@@ -207,38 +261,39 @@ export default { ...@@ -207,38 +261,39 @@ export default {
close: "d2admin/page/close" close: "d2admin/page/close"
}), }),
...mapActions("d2admin/user", ["actionSetDownloadList"]), ...mapActions("d2admin/user", ["actionSetDownloadList"]),
handleManageReceipt() { handleManageReceipt () {
this.manageReceiptDialogVisible = true this.manageReceiptDialogVisible = true
}, },
handleManagePayment() { handleManagePayment () {
this.paymentDialogVisible = true this.paymentDialogVisible = true
}, },
handleTrafficFee() { handleTrafficFee () {
this.trafficFeeDialogVisible = true this.trafficFeeDialogVisible = true
}, },
handleReset() { handleReset () {
this.searchForm = this.$options.data.call(this).searchForm this.searchForm = this.$options.data.call(this).searchForm
this.searchSelectObj = this.$options.data.call(this).searchSelectObj this.searchSelectObj = this.$options.data.call(this).searchSelectObj
this.$refs.usedCarFundWarningManageTable.refreshTable(true, true) this.$refs.usedCarFundWarningManageTable.refreshTable(true, true)
}, },
beforeSearchFn() { beforeSearchFn () {
console.log(this.searchForm)
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// // 判断是否有日期,没有提示用户选择日期 // // 判断是否有日期,没有提示用户选择日期
// if (!this.searchSelectObj.divisionOrPayDate.value) { if (!this.searchSelectObj.divisionOrPayDate.value) {
// this.$message({ this.$message({
// message: '请选择日期', message: '请选择日期',
// type: 'warning' type: 'warning'
// }) })
// return reject(new Error('请选择日期')) return reject(new Error('请选择日期'))
// } else { } else {
this.searchFormSearch = this.getParams() this.searchFormSearch = this.getParams()
console.log(this.searchFormSearch) console.log(this.searchFormSearch)
resolve() this.onlineStatementAccountCountTotal()
// } resolve()
}
}) })
}, },
getSelectInputParams() {
getSelectInputParams () {
const list = Object.keys(this.searchSelectObj) const list = Object.keys(this.searchSelectObj)
var params = {} var params = {}
list.forEach(i => { list.forEach(i => {
...@@ -247,37 +302,34 @@ export default { ...@@ -247,37 +302,34 @@ export default {
}) })
return params return params
}, },
getParams() { getParams () {
let params = deepClone(this.searchForm) let params = deepClone(this.searchForm)
// const tempParams = this.getSelectInputParams() const tempParams = this.getSelectInputParams()
// console.log(tempParams) // console.log(tempParams)
params = { params = {
...params, ...params,
// ...tempParams ...tempParams
} }
console.log(params) console.log(params)
if (params.tradeTime) { if (params.daterange) {
let [srart, end] = params.tradeTime let [srart, end] = params.daterange
params.startTradeTime = dayjs(srart).format("YYYY-MM-DD") params.startTradeTime = dayjs(srart).format("YYYY-MM-DD")
params.endTradeTime = dayjs(end).format("YYYY-MM-DD") params.endTradeTime = dayjs(end).format("YYYY-MM-DD")
// params.timeType = 1
} }
delete params.tradeTime delete params.daterange
// if (params.monthrange) { if (params.monthrange) {
// let [srart, end] = params.monthrange let [srart, end] = params.monthrange
// params.startTradeTime = dayjs(srart).format("YYYY-MM-DD 00:00:00") params.startTradeTime = dayjs(srart).startOf('month').format("YYYY-MM-DD")
// // 这个月的 最后一天 // 这个月的 最后一天
// params.endTradeTime = dayjs(end).endOf('month').format("YYYY-MM-DD 23:59:59") params.endTradeTime = dayjs(end).endOf('month').format("YYYY-MM-DD")
// params.timeType = 2 }
// } delete params.monthrange
// delete params.monthrange
// console.log(JSON.parse(JSON.stringify(params)))
return params return params
}, },
handleAddUsedQuota() { handleAddUsedQuota () {
this.authPhoneDialogVisible = true this.authPhoneDialogVisible = true
}, },
handleDetail(row) { handleDetail (row) {
// this.detailVisible = true // this.detailVisible = true
this.detailInfo = row this.detailInfo = row
this.$router.push({ this.$router.push({
...@@ -289,7 +341,7 @@ export default { ...@@ -289,7 +341,7 @@ export default {
} }
}) })
}, },
handleExport() { handleExport () {
const params = { const params = {
// 导出预付款管理记录列表(异步) // 导出预付款管理记录列表(异步)
method: "dj.api.smartcarlife.onlineStatementAccount.page.export.async", method: "dj.api.smartcarlife.onlineStatementAccount.page.export.async",
...@@ -311,21 +363,48 @@ export default { ...@@ -311,21 +363,48 @@ export default {
] ]
this.actionSetDownloadList({ list, type: "dowloadList" }) this.actionSetDownloadList({ list, type: "dowloadList" })
}, },
getTableList() { getTableList () {
// this.$refs.usedCarFundWarningManageTable.refreshTable(true, true) // this.$refs.usedCarFundWarningManageTable.refreshTable(true, true)
}, },
loginSuccess() { loginSuccess () {
this.authPhoneDialogVisible = false this.authPhoneDialogVisible = false
this.usageLimitDialogVisible = true this.usageLimitDialogVisible = true
}, },
addUsageLimitSuccess() { addUsageLimitSuccess () {
this.usageLimitDialogVisible = false this.usageLimitDialogVisible = false
this.$refs.usedCarFundWarningManageTable.refreshTable(true, true) this.$refs.usedCarFundWarningManageTable.refreshTable(true, true)
}, },
addZero(num) { addZero (num) {
let numStr = parseFloat(num).toFixed(2) let numStr = parseFloat(num).toFixed(2)
return numStr return numStr
}, },
async onlineStatementAccountCountTotal () {
const data = await onlineStatementAccountCountTotal(this.searchFormSearch)
this.summaries = data || {}
},
getSummaries (param) {
const { columns } = param,
{ summaries } = this,
sums = [],
keyList = ['dayStartBalance', 'receiveAmount',
'shopDivisionMoney', 'fwsDivisionMoney',
'glDivisionMoney', 'serviceCharge',
'dayEndBalance', 'waitInputMoney'
]
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const key = column.property
if (keyList.includes(key)) {
let value = summaries[key]
sums[index] = value != null || value != undefined ? formatThousand(value) : 0
}
else sums[index] = ''
})
return sums;
}
} }
} }
</script> </script>
......
This diff could not be displayed because it is too large.
...@@ -11,14 +11,34 @@ ...@@ -11,14 +11,34 @@
label-width="150px" label-width="150px"
:inline="true"> :inline="true">
<el-form-item label="订单编号:" class="form-item-half"> <el-form-item label="订单编号:" class="form-item-half">
{{ detailInfo.orderCode ? detailInfo.orderCode : "--" }} <ellipsisText :content="detailInfo.orderCode"></ellipsisText>
</el-form-item> </el-form-item>
<el-form-item v-if="detailInfo.oldOrderCode" label="原错误订单编号:" class="form-item-half"> <el-form-item v-if="detailInfo.oldOrderCode" label="原错误订单编号:" class="form-item-half">
{{ detailInfo.oldOrderCode ? detailInfo.oldOrderCode : "--" }} <ellipsisText :content="detailInfo.oldOrderCode"></ellipsisText>
</el-form-item>
<el-form-item label="订单类型:" class="form-item-half">
<ellipsisText :content="djOrderTypeMap[detailInfo.djOrderType]"></ellipsisText>
</el-form-item> </el-form-item>
<el-form-item label="订单类型:" class="form-item-half">{{ djOrderTypeMap[detailInfo.djOrderType] }}</el-form-item>
<el-form-item label="总价:" class="form-item-half">{{ detailInfo.finalPrice }}</el-form-item> <el-form-item label="总价:" class="form-item-half">{{ detailInfo.finalPrice }}</el-form-item>
<el-form-item label="提单人:" class="form-item-half">{{ detailInfo.sellerName }}<span class="split">|</span>{{ detailInfo.merchantName }}</el-form-item> <el-form-item label="提单人:" class="form-item-half">
<ellipsisText :popover-content="billerFullText">
<span>{{ detailInfo.sellerName }}</span>
<span class="split" v-if="detailInfo.sellerName && detailInfo.merchantName"> | </span>
<span>{{ detailInfo.merchantName }}</span>
</ellipsisText>
</el-form-item>
<el-form-item label="备注:" class="form-item-half">
<ellipsisText :content="detailInfo.orderRemark"></ellipsisText>
</el-form-item>
<el-form-item label="交易流水号:" :class="detailInfo.oldOrderCode ? '' : 'form-item-half'">
<ellipsisText :content="detailInfo.outTradeNo"></ellipsisText>
</el-form-item>
<el-form-item label="凭证:">
<div class="image-box" v-if="detailInfo.payVoucherList && detailInfo.payVoucherList.length">
<img class="image-item" v-for="(item, index) in detailInfo.payVoucherList" :key="index" @click="handleImg(detailInfo.payVoucherList, 'payVoucher', index)" :src="item.payVoucher" alt="" />
</div>
<div v-else>-</div>
</el-form-item>
</el-form> </el-form>
</div> </div>
<template v-if="detailInfo.oldOrderCode"> <template v-if="detailInfo.oldOrderCode">
...@@ -131,13 +151,20 @@ ...@@ -131,13 +151,20 @@
</el-form> </el-form>
</div> </div>
</div> </div>
<el-image-viewer v-if="imgVisible" :on-close="closeImgViewer" :url-list="imgList" :initial-index="initialIndex" />
</baseDialog> </baseDialog>
</template> </template>
<script> <script>
import { djOrderTypeMap, discountTypeMap } from "@/common/constants" import { djOrderTypeMap, discountTypeMap } from "@/common/constants"
import { getAuditOrderDetail, auditGoodsOrderApplyRecord } from "@api/order" import { getAuditOrderDetail, auditGoodsOrderApplyRecord } from "@api/order"
import ellipsisText from './ellipsisText'
export default { export default {
name: "ApprovalDialog", name: "ApprovalDialog",
components: {
ellipsisText,
"el-image-viewer": () =>
import("element-ui/packages/image/src/image-viewer")
},
props: { props: {
approvalVisible: { approvalVisible: {
type: Boolean, type: Boolean,
...@@ -156,6 +183,13 @@ export default { ...@@ -156,6 +183,13 @@ export default {
set(newVal) { set(newVal) {
this.$emit('dialogClose', { flag: newVal }) this.$emit('dialogClose', { flag: newVal })
} }
},
billerFullText() {
const { sellerName, merchantName } = this.detailInfo
if (sellerName && merchantName) return `${sellerName} | ${merchantName}`
if (sellerName) return sellerName
if (merchantName) return merchantName
return '--'
} }
}, },
data() { data() {
...@@ -171,7 +205,8 @@ export default { ...@@ -171,7 +205,8 @@ export default {
}, },
formObj: { formObj: {
remark: '' remark: ''
} },
imgVisible: false
} }
}, },
created() { created() {
...@@ -195,6 +230,15 @@ export default { ...@@ -195,6 +230,15 @@ export default {
this.detailInfo = res this.detailInfo = res
}) })
}, },
handleImg(url, name, index) {
this.imgVisible = !this.imgVisible
this.initialIndex = index
this.imgList = url.map((item) => item[name])
this.imgUrlName = name
},
closeImgViewer() {
this.imgVisible = false
},
// 处理商品数据 // 处理商品数据
flattenGoodsOrder(data) { flattenGoodsOrder(data) {
const result = [] const result = []
...@@ -255,6 +299,13 @@ export default { ...@@ -255,6 +299,13 @@ export default {
.form-item-half { .form-item-half {
width: calc(50% - 10px) !important; width: calc(50% - 10px) !important;
display: inline-block; display: inline-block;
::v-deep .el-form-item__content {
width: calc(100% - 162px);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
}
} }
.textarea-input { .textarea-input {
width: 585px; width: 585px;
...@@ -263,4 +314,16 @@ export default { ...@@ -263,4 +314,16 @@ export default {
.split { .split {
margin: 0 5px; margin: 0 5px;
} }
.image-box {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
.image-item {
width: 48px;
height: 48px;
border-radius: 4px;
overflow: hidden;
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
<template>
<el-popover
placement="top"
trigger="hover"
:content="finalPopoverContent"
:disabled="!isOverflow"
width="400"
>
<span
ref="text"
slot="reference"
class="ellipsis"
@mouseenter="checkOverflow"
>
<slot>
{{ content || '--' }}
</slot>
</span>
</el-popover>
</template>
<script>
export default {
name: 'EllipsisText',
props: {
content: [String, Number],
popoverContent: {
type: String,
default: ''
}
},
data() {
return {
isOverflow: false
};
},
computed: {
finalPopoverContent() {
if (this.popoverContent) return this.popoverContent;
if (this.$slots.default) {
return this.$slots.default[0].text || this.content || '--';
}
return this.content || '--';
}
},
methods: {
checkOverflow() {
const el = this.$refs.text;
if (el) {
this.isOverflow = el.scrollWidth > el.clientWidth;
}
}
},
mounted() {
this.checkOverflow();
},
watch: {
content() {
this.$nextTick(this.checkOverflow);
},
'$slots.default': {
handler() {
this.$nextTick(this.checkOverflow);
},
deep: true
}
}
};
</script>
<style scoped>
.dark-popover {
background-color: #333 !important; /* 深色背景 */
color: #fff !important; /* 白色文字 */
border-color: #333 !important; /* 边框与背景同色 */
max-width: 300px !important; /* 设置最大宽度,可按需调整 */
word-wrap: break-word; /* 长单词换行 */
font-size: 14px; /* 调整字体大小(可选) */
line-height: 1.5; /* 调整行高(可选) */
}
.dark-popover .popper__arrow,
.dark-popover .popper__arrow::after {
border-top-color: #333 !important; /* 箭头颜色(根据 placement 调整方向) */
}
.ellipsis {
display: inline-block;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
vertical-align: middle;
}
</style>
\ No newline at end of file \ No newline at end of file
This diff could not be displayed because it is too large.
<!-- 审核 --> <!-- 审核 -->
<template> <template>
<baseDialog :dialog-config="dialogConfig" :is-show.sync="visible" class="accountDailog" @handleClick="handleAddConfirm"> <baseDialog
:dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
@handleClick="handleAddConfirm"
>
<div class="reject-dialog"> <div class="reject-dialog">
<div class="edit-page edit-tmpl"> <div class="edit-page edit-tmpl">
<div class="title">商品信息</div> <div class="title">商品信息</div>
<div class="content-box"> <div class="content-box">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" @refreshTable="refreshTable" :table-data="detailInfo.tableData" :layout="layout" :table-total="detailInfo.tableTotal"> <d2-table
ref="purchaseOrderDetailTable"
:table-params="tableParams"
@refreshTable="refreshTable"
:table-data="detailInfo.tableData"
:layout="layout"
:table-total="detailInfo.tableTotal"
>
<template slot="upgradeGoodsName" slot-scope="scope"> <template slot="upgradeGoodsName" slot-scope="scope">
<div> <div>
<img v-if="scope.scope.refundStatus == 'Y'" class="return" src="@/assets/retrun.png" alt=""> <img
v-if="scope.scope.refundStatus == 'Y'"
class="return"
src="@/assets/retrun.png"
alt=""
/>
<span>{{ scope.scope.upgradeGoodsName }}</span> <span>{{ scope.scope.upgradeGoodsName }}</span>
</div> </div>
</template> </template>
<template slot="filmRollNo" slot-scope="scope"> <template slot="filmRollNo" slot-scope="scope">
<div v-if="scope.scope.filmRollList && scope.scope.filmRollList.length == 1"> <div
v-if="
scope.scope.filmRollList &&
scope.scope.filmRollList.length == 1
"
>
{{ scope.scope.filmRollList[0] }} {{ scope.scope.filmRollList[0] }}
</div> </div>
<div v-else-if="scope.scope.filmRollList && scope.scope.filmRollList.length > 1"> <div
v-else-if="
scope.scope.filmRollList &&
scope.scope.filmRollList.length > 1
"
>
<el-popover placement="top" width="200" trigger="hover"> <el-popover placement="top" width="200" trigger="hover">
<div class="film-roll-box"> <div class="film-roll-box">
<div class="title">膜卷号</div> <div class="title">膜卷号</div>
<div class="merchant-item" v-for="(subItem, subIndex) in scope.scope.filmRollList" :key="subIndex"> <div
class="merchant-item"
v-for="(subItem, subIndex) in scope.scope.filmRollList"
:key="subIndex"
>
{{ subItem }} {{ subItem }}
</div> </div>
</div> </div>
<div slot="reference"> <div slot="reference">
<!-- <img style="width: 14px;height: 13px;" src="./images/merchant_icon.png"> --> <!-- <img style="width: 14px;height: 13px;" src="./images/merchant_icon.png"> -->
<span style="color: #2A58AD;">(…{{ scope.scope.filmRollList.length }})</span> <span style="color: #2a58ad"
>(…{{ scope.scope.filmRollList.length }})</span
>
</div> </div>
</el-popover> </el-popover>
</div> </div>
<div v-else> <div v-else>
<span style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{ '-' }}</span> <span
style="
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
"
>{{ "-" }}</span
>
</div> </div>
</template> </template>
<template slot="carName" slot-scope="scope"> <template slot="carName" slot-scope="scope">
<el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top"> <el-tooltip
v-if="
scope.scope.suitCarTypeList &&
scope.scope.suitCarTypeList.length
"
placement="top"
>
<div slot="content" class="car-type-list"> <div slot="content" class="car-type-list">
<div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">{{ <div
`${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}` }}</div> v-for="(item, index) in scope.scope.suitCarTypeList"
:key="index"
>
{{
`${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`
}}
</div>
</div> </div>
<div>{{ scope.scope.suitCarTypeList | formatCar }}</div> <div>{{ scope.scope.suitCarTypeList | formatCar }}</div>
</el-tooltip> </el-tooltip>
<div v-else>-</div> <div v-else>-</div>
</template> </template>
<template slot="actionSlot" slot-scope="scope">
<el-button type="text" @click="handleInventoryDetail(scope.scope)"
>库存明细</el-button
>
</template>
</d2-table> </d2-table>
</div> </div>
</div> </div>
<glsx-combi-form class="edit-form-container" ref="editFormRef" label-width="150px" default-width="350px" :form-ref="editChildRef" :form-obj="infoForm" :form-data="editFormData" :form-rules="formRules"></glsx-combi-form> <glsx-combi-form
class="edit-form-container"
ref="editFormRef"
label-width="150px"
default-width="350px"
:form-ref="editChildRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules"
></glsx-combi-form>
<span :style="{ 'margin-left': '150px' }">{{ txtObj[fromPage] }}</span> <span :style="{ 'margin-left': '150px' }">{{ txtObj[fromPage] }}</span>
<div class="examine-record"> <div class="examine-record">
<div class="title">审核记录</div> <div class="title">审核记录</div>
<div class="up-down" v-if="auditDetaiList && auditDetaiList.length" @click="handleUpDown"> <div
<el-button size="mini" type="text" :icon="isVisible ? 'el-icon-arrow-up' : 'el-icon-arrow-down'" /> class="up-down"
v-if="auditDetaiList && auditDetaiList.length"
@click="handleUpDown"
>
<el-button
size="mini"
type="text"
:icon="isVisible ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
/>
{{ isVisible ? "收起" : "展开" }} {{ isVisible ? "收起" : "展开" }}
</div> </div>
<div> <div>
<div class="record-div" v-if="auditDetaiList && auditDetaiList.length"> <div
<div class="record-div-d" v-for="(item, index) in auditDetaiList" :key="index"> class="record-div"
v-if="auditDetaiList && auditDetaiList.length"
>
<div
class="record-div-d"
v-for="(item, index) in auditDetaiList"
:key="index"
>
<span class="dot"></span> <span class="dot"></span>
<span class="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</span> <span class="span-txt-one">{{
<span class="span-txt-two" style="display: inline-block; width: 116px;"> item.status ? $$(statusForShow, [item.status], "text") : ""
<span :class="item.status ? examineStatusClass[item.status] : ''"> }}</span>
{{ item.status ? $$(statusForShow, [item.status], 'status') : '' }}</span> <span
class="span-txt-two"
style="display: inline-block; width: 116px"
>
<span
:class="item.status ? examineStatusClass[item.status] : ''"
>
{{
item.status
? $$(statusForShow, [item.status], "status")
: ""
}}</span
>
<span v-if="item.rejectedStatus"> <span v-if="item.rejectedStatus">
<span style="display: inline-block; margin: 0 8px;">至</span> <span style="display: inline-block; margin: 0 8px">至</span>
<span>{{ item.rejectedStatus ? $$(rejectedForShow, [item.rejectedStatus], 'rejectedStatus') : '' }}</span> <span>{{
item.rejectedStatus
? $$(
rejectedForShow,
[item.rejectedStatus],
"rejectedStatus"
)
: ""
}}</span>
</span> </span>
</span> </span>
<span class="span-txt-two reviewer ellipsis">审核人: <span class="span-txt-two reviewer ellipsis"
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.reviewedBy" placement="bottom"> >审核人:
<el-tooltip
class="item"
popper-class="remark-popper-class"
effect="dark"
:content="item.reviewedBy"
placement="bottom"
>
<el-button type="text"> <el-button type="text">
{{ item.reviewedBy }} {{ item.reviewedBy }}
</el-button> </el-button>
</el-tooltip> </el-tooltip>
</span> </span>
<span class="span-txt-two">审核时间:{{ item.reviewedDateFormat }}</span> <span class="span-txt-two"
<span v-if="item.remark" class="span-txt-two">备注: >审核时间:{{ item.reviewedDateFormat }}</span
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.remark" placement="bottom"> >
<span v-if="item.remark" class="span-txt-two"
>备注:
<el-tooltip
class="item"
popper-class="remark-popper-class"
effect="dark"
:content="item.remark"
placement="bottom"
>
<el-button type="text"> <el-button type="text">
{{ item.remark ? (item.remark.length > 5 ? (item.remark.slice(0, 5) + '...') : item.remark) : '' }} {{
item.remark
? item.remark.length > 5
? item.remark.slice(0, 5) + "..."
: item.remark
: ""
}}
</el-button> </el-button>
</el-tooltip> </el-tooltip>
</span> </span>
<span class="span-txt-two" v-if="[4, 6, 7, 9].includes(item.status)">驳回原因: <span
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.rejectCause" placement="bottom"> class="span-txt-two"
v-if="[4, 6, 7, 9].includes(item.status)"
>驳回原因:
<el-tooltip
class="item"
popper-class="remark-popper-class"
effect="dark"
:content="item.rejectCause"
placement="bottom"
>
<el-button type="text"> <el-button type="text">
{{ item.rejectCause ? (item.rejectCause.length > 5 ? (item.rejectCause.slice(0, 5) + '...') : item.rejectCause) : '' }} {{
item.rejectCause
? item.rejectCause.length > 5
? item.rejectCause.slice(0, 5) + "..."
: item.rejectCause
: ""
}}
</el-button> </el-button>
</el-tooltip> </el-tooltip>
</span> </span>
</div> </div>
</div> </div>
<div class="emptyCom" v-else> <div class="emptyCom" v-else>
<img :src="emptyImgUrl" class="emptyImg" alt=""> <img :src="emptyImgUrl" class="emptyImg" alt="" />
<span class="tips">暂无数据</span> <span class="tips">暂无数据</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<stockDetailDialog
:visible.sync="stockDetailDialogVisible"
v-if="stockDetailDialogVisible"
:record-info="stockDetailInfo"
/>
</baseDialog> </baseDialog>
</template> </template>
...@@ -111,11 +254,18 @@ import { ...@@ -111,11 +254,18 @@ import {
} from "@/api/purchaseShopping.js" } from "@/api/purchaseShopping.js"
import { getShippingEntityInfoAll } from "@api/serviceManage" import { getShippingEntityInfoAll } from "@api/serviceManage"
import { deepClone, Util } from "@/common/util" import { deepClone, Util } from "@/common/util"
import { baseConfig } from '@/main' import { baseConfig } from "@/main"
import stockDetailDialog from "@/views/stockManage/components/stockDetailDialog.vue"
export default { export default {
name: "CheckDialog", name: "CheckDialog",
components: {
stockDetailDialog
},
data() { data() {
return { return {
stockDetailDialogVisible: false,
stockDetailInfo: {},
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
txtObj: { txtObj: {
procurementReview: "说明:订单审核后自动流转至下一节点进行复审", procurementReview: "说明:订单审核后自动流转至下一节点进行复审",
...@@ -162,85 +312,103 @@ export default { ...@@ -162,85 +312,103 @@ export default {
}, },
isVisible: false, isVisible: false,
examineStatusClass: { examineStatusClass: {
2: 'greenSp', 2: "greenSp",
4: 'redSp', 4: "redSp",
5: 'greenSp', 5: "greenSp",
6: 'redSp', 6: "redSp",
7: 'redSp', 7: "redSp",
8: 'greenSp', 8: "greenSp",
9: 'redSp' 9: "redSp"
}, },
examineStatus: 1, examineStatus: 1,
statusForShow: { statusForShow: {
2: { text: '运营审核', status: '通过' }, 2: { text: "运营审核", status: "通过" },
4: { text: '运营审核', status: '驳回' }, 4: { text: "运营审核", status: "驳回" },
5: { text: '商务审核', status: '通过' }, 5: { text: "商务审核", status: "通过" },
6: { text: '商务审核', status: '驳回' }, 6: { text: "商务审核", status: "驳回" },
7: { text: '采购驳回', status: '驳回' }, 7: { text: "采购驳回", status: "驳回" },
8: { text: '总监审核', status: '通过' }, 8: { text: "总监审核", status: "通过" },
9: { text: '总监审核', status: '驳回' } 9: { text: "总监审核", status: "驳回" }
}, },
rejectedForShow: { rejectedForShow: {
1: { rejectedStatus: '采购商户' }, 1: { rejectedStatus: "采购商户" },
2: { rejectedStatus: '运营审核' }, 2: { rejectedStatus: "运营审核" },
3: { rejectedStatus: '商务审核' } 3: { rejectedStatus: "商务审核" }
}, },
baseConfig, baseConfig,
detailInfo: { detailInfo: {
purchaseOrderRemark: '' purchaseOrderRemark: ""
}, },
layout: 'total,sizes,prev,pager,next,jumper', layout: "total,sizes,prev,pager,next,jumper",
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: "list",
tableColumns: [ tableColumns: [
{ {
label: '商品名称', label: "商品名称",
addHtml: 'upgradeGoodsName', addHtml: "upgradeGoodsName",
prop: 'upgradeGoodsName' prop: "upgradeGoodsName"
}, },
{ {
label: '商品编码', label: "商品编码",
prop: 'type' prop: "type"
}, },
{ {
label: '规格', label: "规格",
prop: 'specificationData' prop: "specificationData"
}, },
{ {
label: '采购数量', label: "采购数量",
prop: 'goodsNumber', prop: "goodsNumber",
formatter: (cellValue) => { formatter: (cellValue) => {
const condition = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.goodsNumber}卷` : `${cellValue.goodsNumber}件` const condition = baseConfig.membraneTypeList.includes(
return this.paramsObj.purchaseType == 1 ? condition : `${cellValue.goodsNumber}件` cellValue.goodsType
)
? `${cellValue.goodsNumber}卷`
: `${cellValue.goodsNumber}件`
return this.paramsObj.purchaseType == 1
? condition
: `${cellValue.goodsNumber}件`
} }
}, },
{ {
label: '库存总量', label: "库存总量",
prop: 'goodsTypeName', prop: "goodsTypeName",
formatter: cellValue => { formatter: (cellValue) => {
const condition = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.conversionValue ? cellValue.goodsNumber * cellValue.conversionValue : '-'}米` : `${cellValue.goodsNumber}件` const condition = baseConfig.membraneTypeList.includes(
return this.paramsObj.purchaseType == 1 ? condition : `${cellValue.goodsNumber}件` cellValue.goodsType
)
? `${
cellValue.conversionValue
? cellValue.goodsNumber * cellValue.conversionValue
: "-"
}米`
: `${cellValue.goodsNumber}件`
return this.paramsObj.purchaseType == 1
? condition
: `${cellValue.goodsNumber}件`
} }
}, },
{ {
label: '已发货数量', label: "已发货数量",
prop: 'purchaseNumber', prop: "purchaseNumber",
width: 110, width: 110,
formatter: cellValue => { formatter: (cellValue) => {
return baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber}卷` : `${cellValue.purchaseNumber}件` return baseConfig.membraneTypeList.includes(cellValue.goodsType)
? `${cellValue.purchaseNumber}卷`
: `${cellValue.purchaseNumber}件`
} }
}, },
{ {
label: '单价', label: "单价",
prop: 'upgradePurchasePrice', prop: "upgradePurchasePrice",
formatter: (row) => { formatter: (row) => {
return '¥' + row.upgradePurchasePrice return "¥" + row.upgradePurchasePrice
} }
}, },
{ {
label: '总价', label: "总价",
prop: 'goodsTotalPrice', prop: "goodsTotalPrice",
formatter: (cellValue) => { formatter: (cellValue) => {
return "¥" + cellValue.goodsTotalPrice return "¥" + cellValue.goodsTotalPrice
} }
...@@ -265,7 +433,7 @@ export default { ...@@ -265,7 +433,7 @@ export default {
}, },
paramsObj: { paramsObj: {
type: Object, type: Object,
default: {} default: () => ({})
} }
}, },
computed: { computed: {
...@@ -293,8 +461,19 @@ export default { ...@@ -293,8 +461,19 @@ export default {
}) })
} }
if (this.fromPage == "procurementBusiness") {
this.tableParams.tableColumns.push({
label: "操作",
prop: "action",
width: "100px",
addHtml: "actionSlot"
})
}
if (this.paramsObj?.sendOutMerchantId) { if (this.paramsObj?.sendOutMerchantId) {
this.infoForm.sendOutMerchantId = deepClone(this.paramsObj?.sendOutMerchantId) this.infoForm.sendOutMerchantId = deepClone(
this.paramsObj?.sendOutMerchantId
)
} }
this.getDetail({ currentPage: 1, pageSize: 10 }) this.getDetail({ currentPage: 1, pageSize: 10 })
}, },
...@@ -317,7 +496,7 @@ export default { ...@@ -317,7 +496,7 @@ export default {
hasAll && hasAll &&
this.baseData[item.optionsName].length && this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][ this.baseData[item.optionsName][0][
this[formName][index].optionLabel this[formName][index].optionLabel
] !== "全部" ] !== "全部"
) { ) {
const temp = {} const temp = {}
...@@ -340,7 +519,7 @@ export default { ...@@ -340,7 +519,7 @@ export default {
hasAll && hasAll &&
this.baseData[item.optionsName].length && this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][ this.baseData[item.optionsName][0][
this[formName][index].optionLabel this[formName][index].optionLabel
] !== "全部" ] !== "全部"
) { ) {
const temp = {} const temp = {}
...@@ -353,25 +532,36 @@ export default { ...@@ -353,25 +532,36 @@ export default {
} }
}, },
handleUpDown() { handleUpDown() {
this.auditDetaiList = this.isVisible ? deepClone(this.originalAuditDetaiList.slice(0, 2)) : deepClone(this.originalAuditDetaiList) this.auditDetaiList = this.isVisible
? deepClone(this.originalAuditDetaiList.slice(0, 2))
: deepClone(this.originalAuditDetaiList)
this.isVisible = !this.isVisible this.isVisible = !this.isVisible
}, },
refreshTable(pageObj) { refreshTable(pageObj) {
this.getDetail(pageObj) this.getDetail(pageObj)
}, },
getDetail(pageObj) { getDetail(pageObj) {
operatorreviewView({ orderCode: this.paramsObj.orderCode, pageSize: pageObj.pageSize, currentPage: pageObj.currentPage }).then(res => { operatorreviewView({
orderCode: this.paramsObj.orderCode,
pageSize: pageObj.pageSize,
currentPage: pageObj.currentPage
}).then((res) => {
this.detailInfo = res this.detailInfo = res
this.detailInfo.tableData = res.pagination.list this.detailInfo.tableData = res.pagination.list
this.detailInfo.tableTotal = res.pagination.total this.detailInfo.tableTotal = res.pagination.total
this.originalAuditDetaiList = res.auditDetaiList || [] this.originalAuditDetaiList = res.auditDetaiList || []
if (this.originalAuditDetaiList && this.originalAuditDetaiList.length > 0) { if (
this.originalAuditDetaiList = this.originalAuditDetaiList.map(item => { this.originalAuditDetaiList &&
item.reviewedDateFormat = item.reviewedDate this.originalAuditDetaiList.length > 0
? Util.dateFormate(item.reviewedDate, 'YYYY-MM-DD HH:mm:ss') ) {
: "" this.originalAuditDetaiList = this.originalAuditDetaiList.map(
return item (item) => {
}) item.reviewedDateFormat = item.reviewedDate
? Util.dateFormate(item.reviewedDate, "YYYY-MM-DD HH:mm:ss")
: ""
return item
}
)
} }
this.auditDetaiList = deepClone(this.originalAuditDetaiList.slice(0, 2)) this.auditDetaiList = deepClone(this.originalAuditDetaiList.slice(0, 2))
}) })
...@@ -399,6 +589,13 @@ export default { ...@@ -399,6 +589,13 @@ export default {
}) })
} }
}) })
},
handleInventoryDetail(row) {
this.stockDetailInfo = {
upgradeGoodsId: row?.upgradeGoodsId
// yqMerchantId: this.detailInfo.callOutYqMerchantId
}
this.stockDetailDialogVisible = true
} }
} }
} }
......
<!-- 驳回 --> <!-- 驳回 -->
<template> <template>
<baseDialog :dialog-config="dialogConfig" :is-show.sync="visible" class="accountDailog" @handleClick="handleAddConfirm"> <baseDialog
:dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
@handleClick="handleAddConfirm"
>
<div class="reject-dialog"> <div class="reject-dialog">
<div class="edit-page edit-tmpl"> <div class="edit-page edit-tmpl">
<div class="title">商品信息</div> <div class="title">商品信息</div>
<div class="content-box"> <div class="content-box">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" @refreshTable="refreshTable" :table-data="detailInfo.tableData" :layout="layout" :table-total="detailInfo.tableTotal"> <d2-table
ref="purchaseOrderDetailTable"
:table-params="tableParams"
@refreshTable="refreshTable"
:table-data="detailInfo.tableData"
:layout="layout"
:table-total="detailInfo.tableTotal"
>
<template slot="upgradeGoodsName" slot-scope="scope"> <template slot="upgradeGoodsName" slot-scope="scope">
<div> <div>
<img v-if="scope.scope.refundStatus == 'Y'" class="return" src="@/assets/retrun.png" alt=""> <img
v-if="scope.scope.refundStatus == 'Y'"
class="return"
src="@/assets/retrun.png"
alt=""
/>
<span>{{ scope.scope.upgradeGoodsName }}</span> <span>{{ scope.scope.upgradeGoodsName }}</span>
</div> </div>
</template> </template>
<template slot="filmRollNo" slot-scope="scope"> <template slot="filmRollNo" slot-scope="scope">
<div v-if="scope.scope.filmRollList && scope.scope.filmRollList.length == 1"> <div
v-if="
scope.scope.filmRollList &&
scope.scope.filmRollList.length == 1
"
>
{{ scope.scope.filmRollList[0] }} {{ scope.scope.filmRollList[0] }}
</div> </div>
<div v-else-if="scope.scope.filmRollList && scope.scope.filmRollList.length > 1"> <div
v-else-if="
scope.scope.filmRollList &&
scope.scope.filmRollList.length > 1
"
>
<el-popover placement="top" width="200" trigger="hover"> <el-popover placement="top" width="200" trigger="hover">
<div class="film-roll-box"> <div class="film-roll-box">
<div class="title">膜卷号</div> <div class="title">膜卷号</div>
<div class="merchant-item" v-for="(subItem, subIndex) in scope.scope.filmRollList" :key="subIndex"> <div
class="merchant-item"
v-for="(subItem, subIndex) in scope.scope.filmRollList"
:key="subIndex"
>
{{ subItem }} {{ subItem }}
</div> </div>
</div> </div>
<div slot="reference"> <div slot="reference">
<span style="color: #2A58AD;">(…{{ scope.scope.filmRollList.length }})</span> <span style="color: #2a58ad"
>(…{{ scope.scope.filmRollList.length }})</span
>
</div> </div>
</el-popover> </el-popover>
</div> </div>
<div v-else> <div v-else>
<span style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{ '-' }}</span> <span
style="
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
"
>{{ "-" }}</span
>
</div> </div>
</template> </template>
<template slot="carName" slot-scope="scope"> <template slot="carName" slot-scope="scope">
<el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top"> <el-tooltip
v-if="
scope.scope.suitCarTypeList &&
scope.scope.suitCarTypeList.length
"
placement="top"
>
<div slot="content" class="car-type-list"> <div slot="content" class="car-type-list">
<div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">{{ <div
`${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}` }}</div> v-for="(item, index) in scope.scope.suitCarTypeList"
:key="index"
>
{{
`${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`
}}
</div>
</div> </div>
<div>{{ scope.scope.suitCarTypeList | formatCar }}</div> <div>{{ scope.scope.suitCarTypeList | formatCar }}</div>
</el-tooltip> </el-tooltip>
<div v-else>-</div> <div v-else>-</div>
</template> </template>
<template slot="actionSlot" slot-scope="scope">
<el-button type="text" @click="handleInventoryDetail(scope.scope)"
>库存明细</el-button
>
</template>
</d2-table> </d2-table>
</div> </div>
</div> </div>
<el-form ref="refundForm" label-width="150px" :model="infoForm" :rules="formRules"> <el-form
ref="refundForm"
label-width="150px"
:model="infoForm"
:rules="formRules"
>
<el-form-item label="驳回节点:" prop="rejectNode"> <el-form-item label="驳回节点:" prop="rejectNode">
<el-select v-model="infoForm.rejectNode" placeholder="请选择驳回节点" style="width: 450px"> <el-select
<el-option v-for="item in baseData.rejectNodeOptions" :key="item.id" :label="item.label" :value="item.id" /> v-model="infoForm.rejectNode"
placeholder="请选择驳回节点"
style="width: 450px"
>
<el-option
v-for="item in baseData.rejectNodeOptions"
:key="item.id"
:label="item.label"
:value="item.id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="驳回原因:" prop="rejectCause"> <el-form-item label="驳回原因:" prop="rejectCause">
<el-input type="textarea" :row="4" show-word-limit placeholder="请输入驳回原因" maxlength="200" show-word-limit v-model="infoForm.rejectCause" class=" reject-input" /> <el-input
type="textarea"
:row="4"
show-word-limit
placeholder="请输入驳回原因"
maxlength="200"
show-word-limit
v-model="infoForm.rejectCause"
class="reject-input"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="examine-record"> <div class="examine-record">
<div class="title">审核记录</div> <div class="title">审核记录</div>
<div class="up-down" v-if="auditDetaiList && auditDetaiList.length" @click="handleUpDown"> <div
<el-button size="mini" type="text" :icon="isVisible ? 'el-icon-arrow-up' : 'el-icon-arrow-down'" /> class="up-down"
v-if="auditDetaiList && auditDetaiList.length"
@click="handleUpDown"
>
<el-button
size="mini"
type="text"
:icon="isVisible ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
/>
{{ isVisible ? "收起" : "展开" }} {{ isVisible ? "收起" : "展开" }}
</div> </div>
<div> <div>
<div class="record-div" v-if="auditDetaiList && auditDetaiList.length"> <div
<div class="record-div-d" v-for="(item, index) in auditDetaiList" :key="index"> class="record-div"
v-if="auditDetaiList && auditDetaiList.length"
>
<div
class="record-div-d"
v-for="(item, index) in auditDetaiList"
:key="index"
>
<span class="dot"></span> <span class="dot"></span>
<span class="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</span> <span class="span-txt-one">{{
<span class="span-txt-two" style="display: inline-block; width: 116px;"> item.status ? $$(statusForShow, [item.status], "text") : ""
<span :class="item.status ? examineStatusClass[item.status] : ''"> }}</span>
{{ item.status ? $$(statusForShow, [item.status], 'status') : '' }}</span> <span
class="span-txt-two"
style="display: inline-block; width: 116px"
>
<span
:class="item.status ? examineStatusClass[item.status] : ''"
>
{{
item.status
? $$(statusForShow, [item.status], "status")
: ""
}}</span
>
<span v-if="item.rejectedStatus"> <span v-if="item.rejectedStatus">
<span style="display: inline-block; margin: 0 8px;">至</span> <span style="display: inline-block; margin: 0 8px">至</span>
<span>{{ item.rejectedStatus ? $$(rejectedForShow, [item.rejectedStatus], 'rejectedStatus') : '' }}</span> <span>{{
item.rejectedStatus
? $$(
rejectedForShow,
[item.rejectedStatus],
"rejectedStatus"
)
: ""
}}</span>
</span> </span>
</span> </span>
<span class="span-txt-two reviewer ellipsis">审核人: <span class="span-txt-two reviewer ellipsis"
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.reviewedBy" placement="bottom"> >审核人:
<el-tooltip
class="item"
popper-class="remark-popper-class"
effect="dark"
:content="item.reviewedBy"
placement="bottom"
>
<el-button type="text"> <el-button type="text">
{{ item.reviewedBy }} {{ item.reviewedBy }}
</el-button> </el-button>
</el-tooltip> </el-tooltip>
</span> </span>
<span class="span-txt-two">审核时间:{{ item.reviewedDateFormat }}</span> <span class="span-txt-two"
<span v-if="item.remark" class="span-txt-two">备注: >审核时间:{{ item.reviewedDateFormat }}</span
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.remark" placement="bottom"> >
<span v-if="item.remark" class="span-txt-two"
>备注:
<el-tooltip
class="item"
popper-class="remark-popper-class"
effect="dark"
:content="item.remark"
placement="bottom"
>
<el-button type="text"> <el-button type="text">
{{ item.remark ? (item.remark.length > 5 ? (item.remark.slice(0, 5) + '...') : item.remark) : '' }} {{
item.remark
? item.remark.length > 5
? item.remark.slice(0, 5) + "..."
: item.remark
: ""
}}
</el-button> </el-button>
</el-tooltip> </el-tooltip>
</span> </span>
<span class="span-txt-two" v-if="[4, 6, 7, 9].includes(item.status)">驳回原因: <span
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.rejectCause" placement="bottom"> class="span-txt-two"
v-if="[4, 6, 7, 9].includes(item.status)"
>驳回原因:
<el-tooltip
class="item"
popper-class="remark-popper-class"
effect="dark"
:content="item.rejectCause"
placement="bottom"
>
<el-button type="text"> <el-button type="text">
{{ item.rejectCause ? (item.rejectCause.length > 5 ? (item.rejectCause.slice(0, 5) + '...') : item.rejectCause) : '' }} {{
item.rejectCause
? item.rejectCause.length > 5
? item.rejectCause.slice(0, 5) + "..."
: item.rejectCause
: ""
}}
</el-button> </el-button>
</el-tooltip> </el-tooltip>
</span> </span>
</div> </div>
</div> </div>
<div class="emptyCom" v-else> <div class="emptyCom" v-else>
<img :src="emptyImgUrl" class="emptyImg" alt=""> <img :src="emptyImgUrl" class="emptyImg" alt="" />
<span class="tips">暂无数据</span> <span class="tips">暂无数据</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<stockDetailDialog
:visible.sync="stockDetailDialogVisible"
v-if="stockDetailDialogVisible"
:record-info="stockDetailInfo"
/>
</baseDialog> </baseDialog>
</template> </template>
<script> <script>
import { purchaseOrderReject, operatorreviewOperatorReject, businessreviewBusinessReject, operatorreviewView } from '@/api/purchaseShopping.js' import {
import { deepClone, Util } from '@/common/util' purchaseOrderReject,
operatorreviewOperatorReject,
businessreviewBusinessReject,
operatorreviewView
} from "@/api/purchaseShopping.js"
import stockDetailDialog from "@/views/stockManage/components/stockDetailDialog.vue"
import { deepClone, Util } from "@/common/util"
import { rejectNodeOptions } from "../constant" import { rejectNodeOptions } from "../constant"
import { baseConfig } from '@/main' import { baseConfig } from "@/main"
export default { export default {
name: 'RejectDialog', name: "RejectDialog",
components: {
stockDetailDialog
},
data() { data() {
return { return {
stockDetailDialogVisible: false,
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
infoForm: { infoForm: {
rejectNode: '', rejectNode: "",
rejectCause: '' rejectCause: ""
}, },
dialogConfig: { dialogConfig: {
title: '驳回', title: "驳回",
width: '900px' width: "900px"
}, },
formRules: { formRules: {
rejectNode: [{ required: true, message: "请选择驳回节点", trigger: "change" }], rejectNode: [
rejectCause: [{ required: true, message: '请输入驳回原因', trigger: 'change' }] { required: true, message: "请选择驳回节点", trigger: "change" }
],
rejectCause: [
{ required: true, message: "请输入驳回原因", trigger: "change" }
]
}, },
emptyImgUrl: require("@/assets/empty-5.png"), emptyImgUrl: require("@/assets/empty-5.png"),
auditDetaiList: [], auditDetaiList: [],
originalAuditDetaiList: [], originalAuditDetaiList: [],
baseData: { baseData: {
rejectNodeOptions: deepClone(rejectNodeOptions.filter(item => this.filterRejectList.includes(item.id))) rejectNodeOptions: deepClone(
rejectNodeOptions.filter((item) =>
this.filterRejectList.includes(item.id)
)
)
}, },
isVisible: false, isVisible: false,
examineStatusClass: { examineStatusClass: {
2: 'greenSp', 2: "greenSp",
4: 'redSp', 4: "redSp",
5: 'greenSp', 5: "greenSp",
6: 'redSp', 6: "redSp",
7: 'redSp', 7: "redSp",
8: 'greenSp', 8: "greenSp",
9: 'redSp' 9: "redSp"
}, },
examineStatus: 1, examineStatus: 1,
statusForShow: { statusForShow: {
2: { text: '运营审核', status: '通过' }, 2: { text: "运营审核", status: "通过" },
4: { text: '运营审核', status: '驳回' }, 4: { text: "运营审核", status: "驳回" },
5: { text: '商务审核', status: '通过' }, 5: { text: "商务审核", status: "通过" },
6: { text: '商务审核', status: '驳回' }, 6: { text: "商务审核", status: "驳回" },
7: { text: '采购驳回', status: '驳回' }, 7: { text: "采购驳回", status: "驳回" },
8: { text: '总监审核', status: '通过' }, 8: { text: "总监审核", status: "通过" },
9: { text: '总监审核', status: '驳回' } 9: { text: "总监审核", status: "驳回" }
}, },
rejectedForShow: { rejectedForShow: {
1: { rejectedStatus: '采购商户' }, 1: { rejectedStatus: "采购商户" },
2: { rejectedStatus: '运营审核' }, 2: { rejectedStatus: "运营审核" },
3: { rejectedStatus: '商务审核' } 3: { rejectedStatus: "商务审核" }
}, },
baseConfig, baseConfig,
detailInfo: { detailInfo: {
purchaseOrderRemark: '' purchaseOrderRemark: ""
}, },
layout: 'total,sizes,prev,pager,next,jumper', layout: "total,sizes,prev,pager,next,jumper",
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: "list",
tableColumns: [ tableColumns: [
{ {
label: '商品名称', label: "商品名称",
addHtml: 'upgradeGoodsName', addHtml: "upgradeGoodsName",
prop: 'upgradeGoodsName' prop: "upgradeGoodsName"
}, },
{ {
label: '商品编码', label: "商品编码",
prop: 'type' prop: "type"
}, },
{ {
label: '规格', label: "规格",
prop: 'specificationData' prop: "specificationData"
}, },
{ {
label: '采购数量', label: "采购数量",
prop: 'goodsNumber', prop: "goodsNumber",
formatter: (cellValue) => { formatter: (cellValue) => {
const condition = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.goodsNumber}卷` : `${cellValue.goodsNumber}件` const condition = baseConfig.membraneTypeList.includes(
return this.paramsObj.purchaseType == 1 ? condition : `${cellValue.goodsNumber}件` cellValue.goodsType
)
? `${cellValue.goodsNumber}卷`
: `${cellValue.goodsNumber}件`
return this.paramsObj.purchaseType == 1
? condition
: `${cellValue.goodsNumber}件`
} }
}, },
{ {
label: '库存总量', label: "库存总量",
prop: 'goodsTypeName', prop: "goodsTypeName",
formatter: cellValue => { formatter: (cellValue) => {
const condition = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.conversionValue ? cellValue.goodsNumber * cellValue.conversionValue : '-'}米` : `${cellValue.goodsNumber}件` const condition = baseConfig.membraneTypeList.includes(
return this.paramsObj.purchaseType == 1 ? condition : `${cellValue.goodsNumber}件` cellValue.goodsType
)
? `${
cellValue.conversionValue
? cellValue.goodsNumber * cellValue.conversionValue
: "-"
}米`
: `${cellValue.goodsNumber}件`
return this.paramsObj.purchaseType == 1
? condition
: `${cellValue.goodsNumber}件`
} }
}, },
{ {
label: '已发货数量', label: "已发货数量",
prop: 'purchaseNumber', prop: "purchaseNumber",
width: 110, width: 110,
formatter: cellValue => { formatter: (cellValue) => {
return baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber}卷` : `${cellValue.purchaseNumber}件` return baseConfig.membraneTypeList.includes(cellValue.goodsType)
? `${cellValue.purchaseNumber}卷`
: `${cellValue.purchaseNumber}件`
} }
}, },
{ {
label: '单价', label: "单价",
prop: 'upgradePurchasePrice', prop: "upgradePurchasePrice",
formatter: (row) => { formatter: (row) => {
return '¥' + row.upgradePurchasePrice return "¥" + row.upgradePurchasePrice
} }
}, },
{ {
label: '总价', label: "总价",
prop: 'goodsTotalPrice', prop: "goodsTotalPrice",
formatter: (cellValue) => { formatter: (cellValue) => {
return "¥" + cellValue.goodsTotalPrice return "¥" + cellValue.goodsTotalPrice
} }
...@@ -232,6 +425,10 @@ export default { ...@@ -232,6 +425,10 @@ export default {
}, },
props: { props: {
fromPage: {
type: String,
default: "procurementReview"
},
rejectVisible: { rejectVisible: {
type: Boolean, type: Boolean,
default: false default: false
...@@ -255,44 +452,68 @@ export default { ...@@ -255,44 +452,68 @@ export default {
return this.rejectVisible return this.rejectVisible
}, },
set(newVal) { set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'rejectVisible' }) this.$emit("dialogClose", { flag: newVal, attrName: "rejectVisible" })
// this.$emit('update:visible', newVal) // this.$emit('update:visible', newVal)
} }
} }
}, },
watch: { watch: {},
},
created() { created() {
if (this.fromPage == "procurementBusiness") {
this.tableParams.tableColumns.push({
label: "操作",
prop: "action",
width: "100px",
addHtml: "actionSlot"
})
}
}, },
components: {},
mounted() { mounted() {
this.getDetail({ currentPage: 1, pageSize: 10 }) this.getDetail({ currentPage: 1, pageSize: 10 })
}, },
methods: { methods: {
handleInventoryDetail(row) {
this.stockDetailInfo = {
upgradeGoodsId: row?.upgradeGoodsId
// yqMerchantId: this.detailInfo.callOutYqMerchantId
}
this.stockDetailDialogVisible = true
},
handleUpDown() { handleUpDown() {
this.auditDetaiList = this.isVisible ? deepClone(this.originalAuditDetaiList.slice(0, 2)) : deepClone(this.originalAuditDetaiList) this.auditDetaiList = this.isVisible
? deepClone(this.originalAuditDetaiList.slice(0, 2))
: deepClone(this.originalAuditDetaiList)
this.isVisible = !this.isVisible this.isVisible = !this.isVisible
}, },
refreshTable(pageObj) { refreshTable(pageObj) {
this.getDetail(pageObj) this.getDetail(pageObj)
}, },
getDetail(pageObj) { getDetail(pageObj) {
operatorreviewView({ orderCode: this.paramsObj.orderCode, pageSize: pageObj.pageSize, currentPage: pageObj.currentPage }).then(res => { operatorreviewView({
orderCode: this.paramsObj.orderCode,
pageSize: pageObj.pageSize,
currentPage: pageObj.currentPage
}).then((res) => {
this.detailInfo = res this.detailInfo = res
this.detailInfo.tableData = res.pagination.list this.detailInfo.tableData = res.pagination.list
this.detailInfo.tableTotal = res.pagination.total this.detailInfo.tableTotal = res.pagination.total
this.originalAuditDetaiList = res.auditDetaiList || [] this.originalAuditDetaiList = res.auditDetaiList || []
if (this.originalAuditDetaiList && this.originalAuditDetaiList.length > 0) { if (
this.originalAuditDetaiList = this.originalAuditDetaiList.map(item => { this.originalAuditDetaiList &&
item.reviewedDateFormat = item.reviewedDate this.originalAuditDetaiList.length > 0
? Util.dateFormate(item.reviewedDate, 'YYYY-MM-DD HH:mm:ss') ) {
: "" this.originalAuditDetaiList = this.originalAuditDetaiList.map(
return item (item) => {
}) item.reviewedDateFormat = item.reviewedDate
? Util.dateFormate(item.reviewedDate, "YYYY-MM-DD HH:mm:ss")
: ""
return item
}
)
} }
this.auditDetaiList = deepClone(this.originalAuditDetaiList.slice(0, 2)) this.auditDetaiList = deepClone(this.originalAuditDetaiList.slice(0, 2))
}) })
...@@ -300,7 +521,7 @@ export default { ...@@ -300,7 +521,7 @@ export default {
handleAddConfirm() { handleAddConfirm() {
// return // return
this.$refs.refundForm.validate(valid => { this.$refs.refundForm.validate((valid) => {
if (valid) { if (valid) {
// console.log(valid) // console.log(valid)
// return // return
...@@ -309,11 +530,14 @@ export default { ...@@ -309,11 +530,14 @@ export default {
params.rejectNode = infoForm.rejectNode params.rejectNode = infoForm.rejectNode
params.rejectCause = infoForm.rejectCause params.rejectCause = infoForm.rejectCause
params.orderCode = this.paramsObj.orderCode params.orderCode = this.paramsObj.orderCode
const _api = this.paramsObj.type == 'operator' ? operatorreviewOperatorReject : businessreviewBusinessReject const _api =
this.paramsObj.type == "operator"
? operatorreviewOperatorReject
: businessreviewBusinessReject
// purchaseOrderReject(params).then(res => { // purchaseOrderReject(params).then(res => {
_api(params).then(res => { _api(params).then((res) => {
this.notice.okTips('驳回成功') this.notice.okTips("驳回成功")
// this.handleClose(true) // this.handleClose(true)
this.visible = true this.visible = true
}) })
...@@ -322,7 +546,7 @@ export default { ...@@ -322,7 +546,7 @@ export default {
}, },
handleClose(flag) { handleClose(flag) {
this.$emit('dialogClose', flag) this.$emit("dialogClose", flag)
} }
} }
} }
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<orderDeatilDialog :visible.sync="detailVisible" v-if="detailVisible" :params-obj="paramsObj"></orderDeatilDialog> <orderDeatilDialog :visible.sync="detailVisible" v-if="detailVisible" :params-obj="paramsObj"></orderDeatilDialog>
<CheckDialog :check-visible="checkVisible" v-if="checkVisible" :params-obj="paramsObj" from-page="procurementBusiness" @dialogClose="dialogClose"> <CheckDialog :check-visible="checkVisible" v-if="checkVisible" :params-obj="paramsObj" from-page="procurementBusiness" @dialogClose="dialogClose">
</CheckDialog> </CheckDialog>
<rejectDialog :reject-visible="rejectVisible" v-if="rejectVisible" :params-obj="paramsObj" :filter-reject-list="[1,2]" @dialogClose="dialogClose"> <rejectDialog :reject-visible="rejectVisible" v-if="rejectVisible" :params-obj="paramsObj" from-page="procurementBusiness" :filter-reject-list="[1,2]" @dialogClose="dialogClose">
</rejectDialog> </rejectDialog>
</d2-container> </d2-container>
</template> </template>
......
...@@ -46,6 +46,48 @@ ...@@ -46,6 +46,48 @@
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn" :before-search-fn="beforeSearchFn"
> >
<template slot="remark" slot-scope="scope">
<div v-if="scope.scope.remark">
<el-popover v-if="scope.scope.remark.length > 12" placement="top" effect="dark" width="300" trigger="hover">
<div class="merchant-name-box">
{{ spanFilter(scope.scope.remark) }}
</div>
<div slot="reference">
{{ spanFilter(scope.scope.remark, 12) }}
</div>
</el-popover>
<div v-else>{{ scope.scope.remark }}</div>
</div>
<span v-else>-</span>
</template>
<template slot="receiver" slot-scope="scope">
<div v-if="scope.scope.receiver">
<el-popover v-if="scope.scope.receiver.length > 12" placement="top" effect="dark" width="300" trigger="hover">
<div class="merchant-name-box">
{{ spanFilter(scope.scope.receiver) }}
</div>
<div slot="reference">
{{ spanFilter(scope.scope.receiver, 12) }}
</div>
</el-popover>
<div v-else>{{ scope.scope.receiver }}</div>
</div>
<span v-else>-</span>
</template>
<template slot="address" slot-scope="scope">
<div v-if="scope.scope.address">
<el-popover v-if="scope.scope.address.length > 12" placement="top" effect="dark" width="300" trigger="hover">
<div class="merchant-name-box">
{{ spanFilter(scope.scope.address) }}
</div>
<div slot="reference">
{{ spanFilter(scope.scope.address, 12) }}
</div>
</el-popover>
<div v-else>{{ scope.scope.address }}</div>
</div>
<span v-else>-</span>
</template>
<auth-button <auth-button
slot="auth-button" slot="auth-button"
slot-scope="scope" slot-scope="scope"
...@@ -55,12 +97,15 @@ ...@@ -55,12 +97,15 @@
</div> </div>
</d2-container> </d2-container>
<!-- 查看 --> <!-- 查看 -->
<allocation-detail-dialog <!-- <allocation-detail-dialog
:allocation-detail-visible="allocationDetailVisible" :allocation-detail-visible="allocationDetailVisible"
:record-info="recordInfo" :record-info="recordInfo"
v-if="allocationDetailVisible" v-if="allocationDetailVisible"
@dialogClose="dialogClose" @dialogClose="dialogClose"
/> /> -->
<transferDetailDialog :visible.sync="transferDetailVisible"
v-if="transferDetailVisible"
:params-obj="transferObj"></transferDetailDialog>
</div> </div>
</template> </template>
...@@ -75,10 +120,12 @@ import { ...@@ -75,10 +120,12 @@ import {
getServicemerchantrefList getServicemerchantrefList
} from "@api/stockManage" } from "@api/stockManage"
import allocationDetailDialog from "./allocationDetailDialog" import allocationDetailDialog from "./allocationDetailDialog"
import transferDetailDialog from '../components/transferDetailDialog.vue'
export default { export default {
name: "AllocationList", name: "AllocationList",
components: { components: {
allocationDetailDialog allocationDetailDialog,
transferDetailDialog
}, },
data () { data () {
return { return {
...@@ -89,7 +136,9 @@ export default { ...@@ -89,7 +136,9 @@ export default {
callOutYqMerchantId: "", callOutYqMerchantId: "",
callInYqMerchantId: "", callInYqMerchantId: "",
callOutMerchantId: "", callOutMerchantId: "",
callInMerchantId: "" callInMerchantId: "",
billStatusList: "",
deliveryStatus: ""
}, },
searchFormSearch: {}, searchFormSearch: {},
searchSelectObj: { searchSelectObj: {
...@@ -164,6 +213,24 @@ export default { ...@@ -164,6 +213,24 @@ export default {
optionId: "merchantId", optionId: "merchantId",
optionLabel: "merchantName", optionLabel: "merchantName",
optionsName: "inMerchantList" optionsName: "inMerchantList"
},
{
label: "单据状态",
name: "billStatusList",
type: "select",
optionList: [],
optionId: 'confId',
optionLabel: "confLabel",
optionsName: "billStatusListOptions"
},
{
label: "发货状态",
name: "deliveryStatus",
type: "select",
optionList: [],
optionId: 'confId',
optionLabel: "confLabel",
optionsName: "deliveryStatusList"
} }
], ],
getListApi: stockAllocatePage, getListApi: stockAllocatePage,
...@@ -178,6 +245,44 @@ export default { ...@@ -178,6 +245,44 @@ export default {
width: "200px" width: "200px"
}, },
{ {
label: "单据时间",
prop: "",
width: "150px",
formatter: (cellValue) => {
return cellValue.submitTime
? Util.dateFormate(
cellValue.submitTime,
"YYYY-MM-DD HH:mm:ss"
)
: "-"
}
},
{
label: "单据状态",
prop: "billStatus",
width: "120px",
formatter: (cellValue) => {
const status = String(cellValue.billStatus);
const isReject = ['4', '6', '7'].includes(status);
return isReject
? '审核驳回'
: this.baseData.billStatusListOptions?.find(val => val.confId === status)?.confLabel || '-'
},
className: (cellValue) => {
const status = String(cellValue.billStatus)
return {
'0': 'yellowSpot',
'1': 'yellowSpot',
'2': 'yellowSpot',
'5': 'greenSpot',
'4': 'redSpot',
'6': 'redSpot',
'7': 'redSpot',
'-1': 'ashSpot'
}[status]
}
},
{
label: "调拨时间", label: "调拨时间",
prop: "allocateTime", prop: "allocateTime",
width: "150px", width: "150px",
...@@ -220,8 +325,41 @@ export default { ...@@ -220,8 +325,41 @@ export default {
prop: "deliveryCompany" prop: "deliveryCompany"
}, },
{ {
label: "发货状态",
prop: "deliveryStatus",
width: "120px",
formatter: (cellValue) => {
return this.baseData.deliveryStatusList?.find(val => val.confId == cellValue.deliveryStatus)?.confLabel || '-'
},
className: (cellValue) => {
const status = String(cellValue.deliveryStatus)
return {
'1': 'ashSpot',
'3': 'yellowSpot',
'2': 'greenSpot'
}[status]
}
},
{
label: "备注", label: "备注",
prop: "remark" prop: "remark",
width: 120,
addHtml: "remark"
},
{
label: "收货人",
prop: "receiver",
addHtml: 'receiver'
},
{
label: "收货人电话",
width: "120px",
prop: "phone"
},
{
label: "收货地址",
prop: "address",
addHtml: 'address'
} }
] ]
}, },
...@@ -229,10 +367,39 @@ export default { ...@@ -229,10 +367,39 @@ export default {
productTypeList: [], productTypeList: [],
yqRelatedMerchantList: [], yqRelatedMerchantList: [],
outMerchantList: [], // 调出门店 outMerchantList: [], // 调出门店
inMerchantList: [] // 调入门店 inMerchantList: [], // 调入门店
billStatusListOptions: [{
confId: '0',
confLabel: '待提交'
}, {
confId: '1',
confLabel: '运营审核'
}, {
confId: '2',
confLabel: '商务审核'
}, {
confId: '4',
confLabel: '审核驳回'
}, {
confId: '5',
confLabel: '审核通过'
}, {
confId: '-1',
confLabel: '作废'
}],
deliveryStatusList: [{
confId: '1',
confLabel: '未发货'
}, {
confId: '3',
confLabel: '部分发货'
}, {
confId: '2',
confLabel: '全部发货'
}]
}, },
allocationDetailVisible: false, transferDetailVisible: false,
recordInfo: null recordInfo: null
} }
}, },
...@@ -272,7 +439,18 @@ export default { ...@@ -272,7 +439,18 @@ export default {
// async getBaseData() { // async getBaseData() {
// this.getOptionsList() // this.getOptionsList()
// }, // },
spanFilter(ele, lenght) {
if (ele) {
const text = `${ele}`
return lenght
? text?.length > lenght
? text.substring(0, lenght) + "\u2026"
: text.substring(0, lenght)
: text
} else {
return "-"
}
},
beforeSearchFn () { beforeSearchFn () {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
...@@ -288,6 +466,10 @@ export default { ...@@ -288,6 +466,10 @@ export default {
) + " 23:59:59" ) + " 23:59:59"
} }
delete this.searchFormSearch.allocateTime delete this.searchFormSearch.allocateTime
if (this.searchFormSearch.billStatusList) {
// 审批驳回包含 4 6 7三个枚举值
this.searchFormSearch.billStatusList = this.searchFormSearch.billStatusList == 4 ? [4, 6, 7] : [this.searchFormSearch.billStatusList]
}
resolve() resolve()
}) })
}, },
...@@ -356,17 +538,26 @@ export default { ...@@ -356,17 +538,26 @@ export default {
callOutYqMerchantId: "", callOutYqMerchantId: "",
callInYqMerchantId: "", callInYqMerchantId: "",
callOutMerchantId: "", callOutMerchantId: "",
callInMerchantId: "" callInMerchantId: "",
billStatusList: "",
deliveryStatus: ""
} }
this.baseData.outMerchantList = [] // 调出门店 this.baseData.outMerchantList = [] // 调出门店
this.baseData.inMerchantList = [] // 调入门店 this.baseData.inMerchantList = [] // 调入门店
this.getOptionsList() this.getOptionsList()
this.$refs.recordTable.refreshTable() this.$refs.recordTable.refreshTable(true)
}, },
async handleExport () { async handleExport () {
await this.beforeSearchFn() await this.beforeSearchFn()
var params = this.searchFormSearch var params = this.searchFormSearch
if (params.billStatusList.length) {
params.billStatusList.forEach((item, index) => {
const name = `billStatusList[${index}]`
params[name] = item
})
delete params.billStatusList
}
params.method = "dj.smartcarlife.api.stock.allocate.export.async" params.method = "dj.smartcarlife.api.stock.allocate.export.async"
const list = [ const list = [
...this.dowloadList, ...this.dowloadList,
...@@ -382,17 +573,17 @@ export default { ...@@ -382,17 +573,17 @@ export default {
// 查看 // 查看
look (row) { look (row) {
this.recordInfo = row this.transferObj = row
this.allocationDetailVisible = true this.transferDetailVisible = true
}, },
gotoAdd () { gotoAdd () {
this.$router.push({ name: "addAllocation" }) this.$router.push({ name: "addAllocation" })
}, },
dialogClose (flag) { // dialogClose (flag) {
this.allocationDetailVisible = !this.allocationDetailVisible // this.allocationDetailVisible = !this.allocationDetailVisible
} // }
} }
} }
</script> </script>
......
<template>
<el-tooltip :content="content || ''" :disabled="isDisabled" :placement="placement" effect="dark">
<div class="ellipsis-tooltip-content" @mouseenter="checkOverflow">
<slot>{{ content || '-' }}</slot>
</div>
</el-tooltip>
</template>
<script>
export default {
name: 'EllipsisTooltip',
props: {
content: {
type: [String, Number],
default: ''
},
placement: {
type: String,
default: 'top'
}
},
data() {
return {
isDisabled: true
}
},
methods: {
checkOverflow(e) {
const target = e.target
if (target.scrollWidth > target.clientWidth) {
this.isDisabled = false
} else {
this.isDisabled = true
}
}
}
}
</script>
<style scoped>
.ellipsis-tooltip-content {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
}
</style>
<!-- 库存明细弹窗 -->
<template>
<d2-dialog
title="库存明细"
:is-visible="dialogVisible"
class="stockMonthDailog"
width="50%"
:no-cancel="false"
btn-ok-label="确定"
btn-cancel-label="取消"
@closeDialog="handleClose"
@confirmDialog="handleClose"
:appendToBody="true"
>
<div class="d2-container-content">
<div class="search-box">
<el-input
v-model="searchForm.merchantName"
size="small"
placeholder="请输入商户名称"
prefix-icon="el-icon-search"
style="width: 200px; margin-right: 10px"
></el-input>
<el-button :id="tableParams.btnId" size="small" type="primary">
查询
</el-button>
</div>
<d2-table
ref="recordTable"
:get-list-api="getListApi"
:search-form="searchForm"
:table-params="tableParams"
>
</d2-table>
</div>
</d2-dialog>
</template>
<script>
import { mapActions, mapState } from "vuex"
import { merchantShopGoodsStockPageH5 } from "@api/stockManage"
import { baseConfig } from "@/main"
export default {
name: "StockDetailDialog",
props: {
visible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => {}
}
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: baseConfig.membraneTypeList,
searchForm: {
upgradeGoodsId: "",
merchantName: ""
// yqMerchantId: ""
},
getListApi: merchantShopGoodsStockPageH5,
tableData: [],
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
// tableOption: false,
tableColumns: [
{
label: "门店",
prop: "merchantName"
},
{
label: "当前库存",
prop: "stock",
// width: ''
formatter: (cellValue) => {
return cellValue.stock || cellValue.stock == 0
? parseFloat(cellValue.stock).toFixed(2) +
(this.membraneTypeList.includes(cellValue.goodsType)
? "米"
: "件")
: "-"
}
},
{
label: "膜卷号",
prop: "filmRollNo",
formatter: (cellValue) => {
return cellValue?.filmRollNo || "-"
}
}
]
}
}
},
computed: {
dialogVisible: {
get() {
return this.visible
},
set(val) {
this.$emit("update:visible", val)
}
}
},
mounted() {
if (this.recordInfo) {
// this.searchForm.yqMerchantId = this.recordInfo.yqMerchantId
this.searchForm.upgradeGoodsId = this.recordInfo.upgradeGoodsId
}
},
methods: {
...mapActions({
get: "d2admin/base/get",
close: "d2admin/page/close"
}),
// beforeSearchFn() {
// return new Promise(resolve => {
// this.searchFormSearch = deepClone(this.searchForm)
// resolve()
// })
// },
// chooseYear() {
// this.getList()
// },
// handleSearch() {
// this.$refs.recordTable.handleSearch()
// },
handleReset() {
// this.handleSearch()
this.searchForm.merchantName = ""
// this.$refs.showSearch.handleReset(true, true)
},
handleClose() {
// this.$emit('dialogClose')
this.dialogVisible = false
}
}
}
</script>
<style scoped lang="scss">
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.stockMonthDailog ::v-deep.el-dialog__body {
padding: 0px 20px;
.d2-container-content {
padding: 0px 0px !important;
}
}
.stockMonthDailog .el-dialog {
margin-top: 20vh !important;
min-width: 700px;
}
.stockMonthDailog .btn-tips img {
width: 18px;
height: 15px;
margin-right: 9px;
vertical-align: bottom;
}
.stockMonthDailog .btn-tips {
display: inline-block;
font-size: 12px;
height: 14px;
line-height: 14px;
background-color: #fff2e5;
color: #999999;
margin-right: 24px;
padding: 6.5px 10px;
}
.search-box {
display: flex;
margin-bottom: 15px;
}
</style>
<template>
<baseDialog :is-show.sync="dialogShow" :config="dialogConfig.setting" :dialog-config="dialogConfig.config" @closeDialog="handleDetailClose">
<div class="detail-content" v-if="dialogShow">
<div class="address-info">
<div class="info-item" v-for="(item, index) in infoList" :key="index" :class="{ 'remark-item': item.isRemark }">
<span class="label-name">{{ item.label }}:</span>
<ellipsis-tooltip class="label-value" :content="detailInfo[item.prop]" />
</div>
</div>
<div class="table-class">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" @refreshTable="refreshTable" :table-data="goodsList" :table-total="tableTotal">
<template slot="filmRollNo" slot-scope="scope">
<div v-if="scope.scope.filmRollList && scope.scope.filmRollList.length == 1">
{{ scope.scope.filmRollList[0] }}
</div>
<div v-else-if="scope.scope.filmRollList && scope.scope.filmRollList.length > 1">
<el-popover placement="top" width="200" trigger="hover">
<div class="film-roll-box">
<div class="title">膜卷号</div>
<div class="merchant-item" v-for="(subItem, subIndex) in scope.scope.filmRollList" :key="subIndex">
{{ subItem }}
</div>
</div>
<div slot="reference">
<!-- <img style="width: 14px;height: 13px;" src="./images/merchant_icon.png"> -->
<span style="color: #2A58AD;">(…{{ scope.scope.filmRollList.length }})</span>
</div>
</el-popover>
</div>
<div v-else>
<span style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{ '-' }}</span>
</div>
</template>
<template slot="carName" slot-scope="scope">
<el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top">
<div slot="content" class="car-type-list">
<div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">{{
`${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}` }}</div>
</div>
<div>{{ scope.scope.suitCarTypeList | formatCar }}</div>
</el-tooltip>
<div v-else>-</div>
</template>
</d2-table>
</div>
<div class="examine-record">
<div class="title">审核记录</div>
<div class="log-box">
<div class="record-div" v-if="detailInfo.auditDetaiList && detailInfo.auditDetaiList.length">
<div class="record-div-d" v-for="(item, index) in detailInfo.auditDetaiList" :key="index">
<!-- <span class="dot"></span> -->
<div class="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</div>
<div class="span-txt-two" style="font-weight: 500;">
<!-- :class="item.status ? examineStatusClass[item.status] : ''" -->
<span>
{{ item.status ? $$(statusForShow, [item.status], 'status') : '' }}</span>
<!-- <span v-if="item.rejectedStatus">
<span style="display: inline-block; margin: 0 8px;">至</span>
<span>{{ item.rejectedStatus ? $$(rejectedForShow, [item.rejectedStatus], 'rejectedStatus') : '' }}</span>
</span> -->
</div>
<div class="span-txt-two reviewer ellipsis">审核人:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.reviewedBy" placement="right">
<span>{{ item.reviewedBy }}</span>
</el-tooltip>
</div>
<div class="span-txt-two">审核时间:{{ item.reviewedDateFormat }}</div>
<div v-if="item.remark" class="span-txt-two">备注:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.remark" placement="right">
<span>{{ item.remark ? (item.remark.length > 12 ? (item.remark.slice(0, 12) + '...') : item.remark) : '-' }}</span>
</el-tooltip>
</div>
<div class="span-txt-two" v-if="[4, 6, 7, 9].includes(item.status)">驳回原因:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.rejectCause" placement="right">
<span>{{ item.rejectCause ? (item.rejectCause.length > 12 ? (item.rejectCause.slice(0, 12) + '...') : item.rejectCause) : '' }}</span>
</el-tooltip>
</div>
</div>
</div>
<div class="emptyCom" v-else>
<img :src="emptyImgUrl" class="emptyImg" alt="">
<span class="tips">暂无数据</span>
</div>
</div>
</div>
</div>
<div class="footer">
<el-button class="cancel-btn" @click="handleDetailClose(false)">关闭</el-button>
</div>
</baseDialog>
</template>
<script>
import { getTransferGoodsInfo, getTransferAuitInfo } from '@/api/stockManage'
import { baseConfig } from '@/main'
import { Util, deepClone } from '@/common/util'
import EllipsisTooltip from './EllipsisTooltip.vue'
export default {
name: 'OrderDetailDialog',
components: {
EllipsisTooltip
},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
},
hideContact: {
type: Boolean,
default: false
}
},
computed: {
infoList() {
const list = []
if (!this.hideContact) {
list.push(
{ label: '收货人', prop: 'receiver' },
{ label: '收货人电话', prop: 'phone' },
{ label: '收货地址', prop: 'address' }
)
}
list.push(
{ label: '调出仓库', prop: 'callOutYqMerchantName' },
{ label: '调出门店', prop: 'callOutMerchantName' },
{ label: '调入仓库', prop: 'callInYqMerchantName' },
{ label: '调入门店', prop: 'callInMerchantName' },
{ label: '备注', prop: 'remark', isRemark: true }
)
return list
},
dialogShow: {
get() {
if (this.visible) {
this.getGoodsDetail({ currentPage: 1, pageSize: 10 })
this.getInfoDetail()
}
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
},
filters: {
formatCar(list) {
console.log(list, 'list')
let str = list.map(item => {
return `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`
}).join(',')
return str.length > 15 ? str.substring(0, 15) + '...' : str
}
},
mounted() {
},
data() {
return {
emptyImgUrl: require("@/assets/empty-5.png"),
baseConfig,
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: [
]
},
config: {
title: '详细信息',
width: '1080px'
}
},
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableColumns: [
{
label: '商品名称',
prop: 'goodsName'
},
{
label: '商品编码',
prop: 'productCode'
},
{
label: '规格',
prop: 'specificationData'
},
{
label: '系列',
prop: 'sourceMaterialName'
},
{
label: '所属分类',
prop: 'goodsTypeName'
},
{
label: '调拨数量',
prop: 'allocateNumber',
formatter: (cellValue) => {
const condition = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.allocateNumber}米` : `${cellValue.allocateNumber}件`
return condition
}
},
{
label: '发货数量',
prop: 'deliveryNumber',
formatter: cellValue => {
const qty = cellValue.deliveryNumber ?? '-'
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '调入门店库存',
prop: 'inStockQty',
width: 120,
formatter: cellValue => {
const qty = cellValue.inStockQty ?? '-'
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '调出门店库存',
prop: 'outStockQty',
width: 120,
formatter: cellValue => {
const qty = cellValue.outStockQty ?? '-'
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '膜卷号',
prop: 'filmRollNo'
}
]
},
detailInfo: {},
examineStatusClass: {
2: 'greenSp',
4: 'redSp',
5: 'greenSp',
6: 'redSp',
7: 'redSp',
8: 'greenSp',
9: 'redSp'
},
statusForShow: {
2: { text: '运营审核', status: '通过' },
4: { text: '运营审核', status: '驳回' },
5: { text: '商务审核', status: '通过' },
6: { text: '商务审核', status: '驳回' },
7: { text: '调拨驳回', status: '驳回' },
8: { text: '总监审核', status: '通过' },
9: { text: '总监驳回', status: '驳回' }
},
rejectedForShow: {
1: { rejectedStatus: '调拨商户' },
2: { rejectedStatus: '运营审核' },
3: { rejectedStatus: '商务审核' }
},
goodsList: [],
tableTotal: 0
}
},
methods: {
handleDetailClose() {
this.dialogShow = false
},
refreshTable(pageObj) {
this.getGoodsDetail(pageObj)
},
getGoodsDetail(pageObj) {
getTransferGoodsInfo({ allocateCode: this.paramsObj.allocateCode, pageSize: pageObj.pageSize, currentPage: pageObj.currentPage }).then(res => {
this.goodsList = res.list || []
this.tableTotal = res.total
})
},
getInfoDetail() {
getTransferAuitInfo({ allocateCode: this.paramsObj.allocateCode }).then(res => {
res?.auditDetaiList?.forEach(item => {
item.reviewedDateFormat = item.reviewedDate
? Util.dateFormate(item.reviewedDate, 'YYYY-MM-DD HH:mm:ss')
: ""
})
this.detailInfo = res
})
}
}
}
</script>
<style lang="scss" scoped>
.car-type-list {
max-height: 300px;
overflow-y: scroll;
}
.return {
width: 15px;
height: 14px;
margin-right: 2px;
vertical-align: middle;
}
.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;
}
}
.footer {
margin-top: 20px;
display: flex;
align-items: center;
justify-content: flex-end;
.cancel-btn {
}
}
.address-info {
display: flex;
box-sizing: border-box;
flex-wrap: wrap;
width: 100%;
padding: 0 20px;
margin-top: 10px;
font-size: 14px;
color: #666666;
.info-item {
width: 33.33%;
display: flex;
align-items: center;
margin-bottom: 10px;
padding-right: 15px;
box-sizing: border-box;
.label-name {
white-space: nowrap;
min-width: fit-content;
}
.label-value {
flex: 1;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
}
&.remark-item {
flex-grow: 1;
width: 33.33%;
}
}
}
.film-roll-box {
font-size: 12px;
color: #666666;
.title {
font-weight: 500;
color: #3a3a3a;
margin-bottom: 8px;
}
}
.examine-record {
min-height: 157px;
margin-top: 23px;
.log-box {
margin-top: 20px;
border-radius: 4px;
background: #FAFAFA;
padding: 16px;
}
.title {
margin: 16px 0;
height: 22px;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 16px;
color: #333333;
padding-bottom: 10px;
border-bottom: 1px solid #e5e5e5;
}
.dot {
width: 6px;
height: 6px;
background: #185efe;
border-radius: 6px;
display: inline-block;
}
.record-div {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #666666;
letter-spacing: 0;
.record-div-d {
display: flex;
align-items: center;
margin-bottom: 10px;
&:last-child{
margin-bottom: 0;
}
}
.span-txt-one {
height: 21px;
font-weight: 500;
color: #333333;
}
.reviewer {
width: 140px;
&.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.span-txt-two {
margin-left: 40px;
}
.greenSp {
color: #4aca74;
}
.redSp {
color: #eb4e4e;
}
}
.emptyCom {
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: center;
align-items: center;
.emptyImg {
width: 64px;
}
.tips {
font-size: 14px;
color: #999999;
margin: 20px 0;
}
}
}
</style>
<!-- 出入库记录 -->
<template>
<d2-container class="container">
<div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" labelWidth="120px" :search-form="searchForm" :form-data="showFormData">
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary" handle>
查询
</el-button>
<el-button size="small" @click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<span>
<auth-button category="Button" :show-btn-ids="['9081301']" />
</span>
</d2-table-header>
<d2-table ref="purchasementReviewTable" :search-form="tableSearchForm" :table-params="tableParams" :table-data="tableData" :selectable-fn="selectableFn" :get-list-api="getListApi" :before-search-fn="beforeSearchFn">
</d2-table>
</div>
</d2-container>
</template>
<script>
import { getInventoryTransactionRecordsPage } from '@api/stockManage'
import { Util, deepClone } from '@/common/util'
import { mapState, mapActions } from 'vuex'
import { baseConfig } from '@/main'
import { upgradeFlags } from '@/common/constants.js'
export default {
name: 'TransferShipment',
data() {
return {
membraneTypeList: baseConfig.membraneTypeList,
searchForm: {
transactionTimeStr: '',
upgradeGoodsName: '',
productCode: '',
businessCode: '',
queryFlowTypes: []
},
tableSearchForm: {},
tableData: [],
showFormData: [
{
label: '出入库时间',
name: 'transactionTimeStr',
type: 'datePicker',
isClear: true,
pickerOptions: 'rangePickerOptions'
},
{
label: '出入库类型',
name: 'queryFlowTypes',
multiple: true,
collapseTags: true,
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'queryFlowTypesOptions'
},
{
label: '出入库单号',
name: 'businessCode',
type: 'input',
isClear: true,
maxlength: 50
},
{
label: '商品名称',
name: 'upgradeGoodsName',
type: 'input',
isClear: true,
maxlength: 50
},
{
label: '商品编码',
name: 'productCode',
type: 'input',
isClear: true,
maxlength: 50
}
],
getListApi: getInventoryTransactionRecordsPage,
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableColumns: [
{
label: '出入库时间',
prop: 'flowTime',
width: 150
},
{
label: '商品名称',
prop: 'upgradeGoodsName'
},
{
label: '商品编码',
prop: 'productCode'
},
{
label: '规格',
prop: 'specificationData'
},
{
label: '系列',
prop: 'goodsSeries'
},
{
label: '所属分类',
prop: 'goodsTypeName'
},
{
label: '领料技师',
prop: 'technicianName'
},
{
label: '出入库数量',
prop: 'stockNum',
width: 120,
formatter: (cellValue) => {
return (cellValue.stockNum || cellValue.stockNum == 0) ? parseFloat(cellValue.stockNum).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
}
},
{
label: '出入库类型',
prop: 'flowType',
width: 120,
formatter: (cellValue) => {
return this.baseData.queryFlowTypesOptions?.find(val => val.confId == cellValue.flowType)?.confLabel || '-'
}
},
{
label: '出入库金额',
prop: 'stockMoney',
width: 120,
formatter: (cellValue) => {
return cellValue.stockMoney || cellValue.stockMoney === 0
? "¥" + cellValue.stockMoney
: "-"
}
},
{
label: '关联业务单号',
prop: 'businessCode',
width: 120,
},
{
label: '关联发货单号',
prop: 'deliveryNumber',
width: 120,
},
{
label: '膜卷号',
prop: 'filmRollNo'
},
{
label: '订单类型',
prop: 'upgradeFlag',
width: 130,
formatter: (cellValue) => {
return this.baseData.upgradeFlags.find(item => item.confId == cellValue.upgradeFlag)?.confValue || '-'
}
},
{
label: '出入库仓库',
prop: 'yqMerchantName',
width: 120,
},
{
label: '出入库门店',
prop: 'merchantName',
width: 120,
},
{
label: '操作人',
prop: 'operator'
}
]
},
// 基本数据
baseData: {
queryFlowTypesOptions: [{
confId: '101',
confLabel: '领料出库'
}, {
confId: '102',
confLabel: '盘点出库'
}, {
confId: '103',
confLabel: '调拨出库'
}, {
confId: '104',
confLabel: '退货出库'
}, {
confId: '201',
confLabel: '商城采购入库'
}, {
confId: '202',
confLabel: '盘点入库'
}, {
confId: '203',
confLabel: '调拨入库'
}, {
confId: '204',
confLabel: '退料入库'
}, {
confId: '205',
confLabel: '自采入库'
}],
upgradeFlags: upgradeFlags
},
paramsObj: {}
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
this.getBaseData()
},
methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']),
getBaseData() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName]) {
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
selectableFn(row, index) {
return row.status == 1 && row.sendOutMerchantId != null
},
beforeSearchFn() {
return new Promise(resolve => {
this.filterSearchTime()
resolve()
})
},
filterSearchTime() {
this.tableSearchForm = deepClone(this.searchForm)
if (this.tableSearchForm.transactionTimeStr) {
this.tableSearchForm.startDate = new Date(this.tableSearchForm.transactionTimeStr[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
this.tableSearchForm.endDate = new Date(this.tableSearchForm.transactionTimeStr[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
delete this.tableSearchForm.transactionTimeStr
},
handleReset() {
this.searchForm = {
transactionTimeStr: '',
upgradeGoodsName: '',
productCode: '',
businessCode: '',
queryFlowTypes: []
}
this.$refs.purchasementReviewTable.refreshTable(true)
},
handleExport() {
this.filterSearchTime()
var params = this.tableSearchForm
if (params.queryFlowTypes.length > 0) {
params.queryFlowTypes.forEach((item, index) => {
const name = `queryFlowTypes[${index}]`
params[name] = item
})
}
delete params.queryFlowTypes
console.log(params)
params.method = 'dj.api.smartcarlife.StockFlow.export.async'
const list = [
...this.dowloadList,
{
name: '出入库记录',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
}
}
</script>
<style lang="scss" scoped></style>
\ No newline at end of file \ No newline at end of file
<!-- 发货单详情弹窗 -->
<template>
<div>
<d2-dialog title="详细信息" :is-visible="detailVisible" class="stockMonthDailog" width="1400px" :no-cancel="true" :isShowFooter="false" @closeDialog="handleClose" @confirmDialog="handleClose">
<div class="address-info">
<div class="info-item" v-for="(item, index) in infoList" :key="index" :class="{ 'remark-item': item.isRemark }">
<span class="label-name">{{ item.label }}:</span>
<ellipsis-tooltip class="label-value" :content="detailInfo[item.prop]" />
</div>
</div>
<template v-for="(item, index) in detailInfo.deliveryDetailList">
<div class="table-wrap" :key="index">
<div class="detail-info border-b">
<div class="item wid-40">
商品名称:
<span>{{ item.upgradeGoodsName }}&nbsp;&nbsp;&nbsp;&nbsp; {{item.specificationData}}</span>
</div>
<div class="item wid-30">
发货数量:
<span>{{ item.purchaseNumber + (baseConfig.membraneTypeList.includes(item.goodsType) ? '米' : '件') }}</span>
</div>
<div class="item wid-30">
可用库存数量:
<span>{{ item.stockNum + (baseConfig.membraneTypeList.includes(item.goodsType) ? '米' : '件') }}</span>
</div>
</div>
<d2-table ref="recordTable" v-if="item.deliveryCardList === null || item.deliveryCardList.length == 0" :table-data="item.goodsWarehousingList" :table-params="tableParams" :has-page="false">
<template slot="filmRollNo" slot-scope="scope">
<div v-if="scope.scope.filmRollList && scope.scope.filmRollList.length == 1">
{{ scope.scope.filmRollList[0] }}
</div>
<div v-else-if="scope.scope.filmRollList && scope.scope.filmRollList.length > 1">
<el-popover placement="top" width="200" trigger="hover">
<div class="film-roll-box">
<div class="title">膜卷号</div>
<div class="merchant-item" v-for="(subItem, subIndex) in scope.scope.filmRollList" :key="subIndex">
{{ subItem }}
</div>
</div>
<div slot="reference">
<span style="color: #2A58AD;">(…{{ scope.scope.filmRollList.length }})</span>
</div>
</el-popover>
</div>
<div v-else>
<span style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{ '-' }}</span>
</div>
</template>
</d2-table>
<div v-else class="message">
已自动入库至商户的权益卡管理中,可前往“库存管理-权益卡管理”中查询
</div>
</div>
</template>
</d2-dialog>
</div>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { getDeliveryDetail } from '@/api/stockManage.js'
import { baseConfig } from '@/main'
import EllipsisTooltip from '../../components/EllipsisTooltip.vue'
export default {
name: 'DeliveryDetailDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
detailInfo: {},
searchFormSearch: {},
// tableData: [],
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
// singleSelectUniqueKey: 'id',
tableOption: false,
tableColumns: [{
label: '入库数量',
prop: 'increaseStockNum',
// width: '200px'
formatter: (cellValue) => {
return (cellValue.increaseStockNum || cellValue.increaseStockNum == 0) ? (baseConfig.membraneTypeList.includes(cellValue.goodsType) ? parseFloat(cellValue.increaseStockNum / cellValue.alternateUnits).toFixed(2) : parseFloat(cellValue.increaseStockNum).toFixed(2)) + (baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
}
}, {
label: '膜卷号',
name: '',
type: 'slot',
addHtml: 'filmRollNo'
}, {
label: '入库仓库',
prop: 'yqMerchantName'
// width: '150px'
}, {
label: '入库门店',
prop: 'merchantName'
// width: '200px'
}]
},
baseData: {},
infoList: [
{ label: '收货人', prop: 'contactName' },
{ label: '收货人电话', prop: 'contactPhone' },
{ label: '收货地址', prop: 'contactAddress' },
{ label: '发货单号', prop: 'deliveryNumber' },
{ label: '发货仓库', prop: 'shippingWarehouseName' },
{ label: '承运公司', prop: 'deliveryCompany' },
{ label: '发货时间', prop: 'deliveryDate' }
]
}
},
components: {
EllipsisTooltip
},
props: {
detailVisible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => { }
}
},
computed: {
},
mounted() {
this.getDetail()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
getDetail() {
var params = { id: deepClone(this.recordInfo.id) }
getDeliveryDetail(params).then(res => {
this.detailInfo = res
if (this.detailInfo.deliveryDate) {
this.detailInfo.deliveryDate = Util.dateFormate(this.detailInfo.deliveryDate, 'YYYY-MM-DD HH:mm:ss')
}
const _deliveryDetailList = this.detailInfo.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.alternateUnits = info?.stockNum / info?.purchaseNumber
})
}
})
}
})
},
handleClose() {
this.$emit('dialogClose')
}
}
}
</script>
<style lang="scss" scoped>
.detail-info {
display: flex;
color: #666666ff;
font-size: 14px;
margin-bottom: 16px;
flex-wrap: wrap;
.item {
width: 33%;
margin-bottom: 8px;
display: flex;
}
.wid-40 {
width: 40%;
}
.wid-30 {
width: 30%;
}
span {
color: #333333ff;
width: calc(100% - 100px);
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
}
.address-info {
display: flex;
box-sizing: border-box;
flex-wrap: wrap;
width: 100%;
padding: 0 20px;
margin-top: 10px;
font-size: 14px;
color: #666666;
.info-item {
width: 33.33%;
display: flex;
align-items: center;
margin-bottom: 10px;
padding-right: 15px;
box-sizing: border-box;
.label-name {
white-space: nowrap;
min-width: fit-content;
}
.label-value {
flex: 1;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
}
&.remark-item {
flex-grow: 1;
width: 33.33%;
}
}
}
.border-b {
border-bottom: 1px solid #e5e5e5;
margin-bottom: 12px;
}
.film-roll-box {
font-size: 12px;
color: #666666;
.title {
font-weight: 500;
color: #3a3a3a;
margin-bottom: 8px;
}
}
.deliveryCardCon {
max-height: 60vh;
overflow: auto;
}
.lookNumber {
// font-size: 14px;
// color: ;
// color: #5850ff!important;
cursor: pointer;
margin-left: 8px;
}
.table-wrap {
box-sizing: border-box;
margin-top: 16px;
}
</style>
<!-- 发货单 -->
<template>
<d2-container class="container">
<div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :form-data="showFormData">
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary" handle>
查询
</el-button>
<el-button size="small" @click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<span>
<auth-button category="Button" :show-btn-ids="['9081201']" />
</span>
</d2-table-header>
<d2-table ref="purchasementReviewTable" :search-form="tableSearchForm" :table-params="tableParams" :table-data="tableData" :selectable-fn="selectableFn" :get-list-api="getListApi" :before-search-fn="beforeSearchFn">
<template slot="contactName" slot-scope="scope">
<div v-if="scope.scope.contactName">
<el-popover v-if="scope.scope.contactName.length > 12" placement="top" effect="dark" width="300" trigger="hover">
<div class="merchant-name-box">
{{ spanFilter(scope.scope.contactName) }}
</div>
<div slot="reference">
{{ spanFilter(scope.scope.contactName, 12) }}
</div>
</el-popover>
<div v-else>{{ scope.scope.contactName }}</div>
</div>
<span v-else>-</span>
</template>
<template slot="contactAddress" slot-scope="scope">
<div v-if="scope.scope.contactAddress">
<el-popover v-if="scope.scope.contactAddress.length > 12" placement="top" effect="dark" width="300" trigger="hover">
<div class="merchant-name-box">
{{ spanFilter(scope.scope.contactAddress) }}
</div>
<div slot="reference">
{{ spanFilter(scope.scope.contactAddress, 12) }}
</div>
</el-popover>
<div v-else>{{ scope.scope.contactAddress }}</div>
</div>
<span v-else>-</span>
</template>
<div slot="auth-button" slot-scope="scope">
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9081202']" />
</span>
<auth-button :data="scope.scope" :show-btn-ids="['9081203']" />
</div>
</d2-table>
</div>
<!-- 查看 -->
<delivery-detail-dialog
:detail-visible="detailVisible"
:record-info="recordInfo"
v-if="detailVisible"
@dialogClose="dialogClose"
/>
</d2-container>
</template>
<script>
import deliveryDetailDialog from "./components/deliveryDetailDialog"
import { getDeliveryPage, deliveryPdf } from '@api/stockManage'
import { Util, deepClone } from '@/common/util'
import { mapState, mapActions } from 'vuex'
export default {
name: 'TransferShipment',
components: {
deliveryDetailDialog
},
data() {
return {
searchForm: {
orderType: 1,
orderCode: '',
callInMerchantName: '',
putStatus: '',
deliveryNumber: '',
deliveryCompany: ''
},
tableSearchForm: {},
tableData: [],
showFormData: [
{
label: '调拨单号',
name: 'orderCode',
type: 'input',
isClear: true
},
{
label: '调拨商户',
name: 'callInMerchantName',
type: 'input',
isClear: true
},
{
label: '状态',
name: 'putStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'putStatusOptions'
},
{
label: '承运单号',
name: 'deliveryNumber',
type: 'input',
isClear: true
},
{
label: '承运公司',
name: 'deliveryCompany',
type: 'input',
isClear: true
},
],
getListApi: getDeliveryPage,
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '调拨单号',
prop: 'orderCode',
width: 150
},
{
label: '承运单号',
prop: 'deliveryNumber'
},
{
label: '承运公司',
prop: 'deliveryCompany'
},
{
label: '调拨人',
prop: 'allocateCreatedBy'
},
{
label: '调入门店',
prop: 'callInMerchantName'
},
{
label: '调入仓库',
prop: 'callInYqMerchantName'
},
{
label: '调出门店',
prop: 'callOutMerchantName'
},
{
label: '调出仓库',
prop: 'callOutYqMerchantName'
},
{
label: '入库状态',
prop: 'putStatus',
formatter: (cellValue) => {
return this.baseData.putStatusOptions.find(item => item.confId === `${cellValue.putStatus}`)?.confLabel || '-'
},
className: (cellValue) => {
return {
0: 'yellowSpot',
1: 'redSpot',
2: 'ashSpot',
3: 'greenSpot'
}[cellValue.putStatus]
}
},
{
label: '收货人',
prop: 'contactName',
width: 120,
addHtml: 'contactName'
},
{
label: '收货人电话',
prop: 'contactPhone'
},
{
label: '收货地址',
prop: 'contactAddress',
width: 120,
addHtml: 'contactAddress'
}
]
},
// 查看门店
detailVisible: false,
// 基本数据
baseData: {
putStatusOptions: [{
confId: '0',
confLabel: '待签收'
}, {
confId: '1',
confLabel: '未入库'
}, {
confId: '2',
confLabel: '已入库'
}, {
confId: '3',
confLabel: '部分入库'
}]
}
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
this.getBaseData()
},
methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']),
getBaseData() {
const allOpt = {
confId: '',
confLabel: '全部'
}
this.showFormData.forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName]) {
this.baseData[item.optionsName].unshift(allOpt)
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
spanFilter(ele, lenght) {
if (ele) {
const text = `${ele}`
return lenght
? text?.length > lenght
? text.substring(0, lenght) + "\u2026"
: text.substring(0, lenght)
: text
} else {
return "-"
}
},
selectableFn(row, index) {
return row.status == 1 && row.sendOutMerchantId != null
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
resolve()
})
},
getParams() {
var params = deepClone(this.searchForm)
return params
},
handleReset() {
this.searchForm = {
orderType: 1,
orderCode: '',
callInMerchantName: '',
putStatus: '',
deliveryNumber: '',
deliveryCompany: ''
}
this.$refs.purchasementReviewTable.refreshTable(true)
},
handleExport() {
var params = this.tableSearchForm
params.method = 'dj.api.smarcarlife.purchaseOrder.delivery.export.async'
const list = [
...this.dowloadList,
{
// name: '采购审核',
name: '发货单',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
// 查看详情
handleDetail(row) {
this.recordInfo = {
id: row.id
}
this.detailVisible = true
},
dialogClose(flag) {
this.detailVisible = !this.detailVisible
},
// 签收发货单
handleSign(row) {
const params = {
id: row.id
}
deliveryPdf(params).then((res) => {
this.$open(res)
})
}
}
}
</script>
<style lang="scss" scoped></style>
\ No newline at end of file \ No newline at end of file
<!-- 商务审核 -->
<template>
<div>
<d2-container>
<template #header>
<div class="header" style="padding: 10px 20px">
<d2-search ref="showSearch"
class="show-search"
:form-data="showFormData"
:search-form="searchForm" />
<div class="up-btns">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset">
重置
</el-button>
</div>
</div>
</template>
<div class="d2-container-content">
<d2-table-header>
<!-- <span slot="left"
v-if="!userInfo.beSuper && userInfo.beYQMerchant">
<auth-button category="Button"
:show-btn-ids="['9080501']" />
</span> -->
<auth-button category="Button" :show-btn-ids="['9081001']" />
</d2-table-header>
<d2-table ref="recordTable"
:before-search-fn="beforeSearchFn"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams">
<template #auth-button="scope">
<div>
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9081002']" />
</span>
<span v-if="scope.scope.billStatus == 2" style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9081003']" />
</span>
<span v-if="scope.scope.billStatus == 2" style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9081004']" />
</span>
</div>
</template>
</d2-table>
</div>
</d2-container>
<!-- 查看 -->
<TransferDetailDialog v-if="transferDetailVisible"
:hide-contact="true"
:params-obj="transferObj"
:visible.sync="transferDetailVisible" />
</div>
</template>
<script>
import { getProductTypeBySceneId } from "@api/product";
import {
getServicemerchantrefList,
getyqMerchantList,
stockAllocateOperatorReviewPage,
yqRelatedList,
} from "@api/stockManage";
import { mapActions, mapState } from "vuex";
import { deepClone, Util } from "@/common/util";
// import allocationDetailDialog from "../transferOperationsReviewDetailDialog"
export default {
name: "TransferOperationsReviewList",
components: {
// allocationDetailDialog
TransferDetailDialog: () => import("../components/transferDetailDialog.vue"),
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
searchForm: {
allocateCode: "",
callInName: "",
billStatus: "",
deliveryStatus: "",
queryType: 2,
},
searchFormSearch: {},
searchSelectObj: {
orderOrTrade: {
attr: "inputtedOrderCode",
value: "",
},
},
showFormData: [
{
label: "调拨单号",
name: "allocateCode",
type: "input",
maxlength: "20",
isClear: true,
},
{
label: "调入仓库",
name: "callInName",
type: "input",
maxlength: "20",
isClear: true,
},
{
label: "订单状态",
name: "billStatus",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confLabel",
optionsName: "billStatusList",
},
{
label: "发货状态",
name: "deliveryStatus",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confLabel",
optionsName: "deliveryStatusList",
},
],
getListApi: stockAllocateOperatorReviewPage,
tableParams: {
btnId: new Date().getTime() + Number.parseInt(Math.random() * 1000),
listName: "list",
tableOption: true,
tableColumns: [
// {
// label: "序号",
// width: "60px",
// prop: "",
// formatter: (row, column, cellValue, index) => {
// return index + 1
// }
// },
{
label: "调拨单号",
prop: "allocateCode",
width: "200px",
},
{
label: "单据时间",
prop: "submitTime",
width: "150px",
formatter: (cellValue) => {
return cellValue.submitTime
? Util.dateFormate(cellValue.submitTime, "YYYY-MM-DD HH:mm:ss")
: "";
},
},
{
label: "调拨人",
prop: "createdBy",
width: "150px",
},
{
label: "调入门店",
prop: "callInMerchantName",
},
{
label: "调入仓库",
prop: "callInYqMerchantName",
},
{
label: "调出门店",
prop: "callOutMerchantName",
},
{
label: "调出仓库",
prop: "callOutYqMerchantName",
},
{
label: "订单状态",
prop: "billStatusName",
width: "150px",
formatter: (cellValue) => {
const status = cellValue.billStatus;
if ([2].includes(status)) {
return "待审核";
} else if ([5].includes(status)) {
return "已审核";
} else if ([6, 7].includes(status)) {
return "已驳回";
} else if ([0].includes(status)) {
return "待提交";
} else if ([-1].includes(status)) {
return "作废";
}
return cellValue.billStatusName || "-";
},
className: (cellValue) => {
// 0 待提交 1 运营审核 2 商务审核 4,6,7 审批驳回 5 审批通过 -1 作废
const status = cellValue.billStatus;
if ([2].includes(status)) {
return "yellowSpot";
} else if ([5].includes(status)) {
return "greenSpot";
} else if ([6, 7].includes(status)) {
return "redSpot";
} else if ([0].includes(status)) {
return "graySpot";
} else if ([-1].includes(status)) {
return "redSpot";
}
return "";
},
},
{
label: "发货状态",
prop: "deliveryStatusName",
width: "150px",
formatter: (cellValue) => {
const status = cellValue.deliveryStatus;
return (
{
1: "未发货",
2: "全部发货",
3: "部分发货",
4: "结束发货",
}[status]
|| cellValue.deliveryStatusName
|| "-"
);
},
className: (cellValue) => {
const status = cellValue.deliveryStatus;
return (
{
1: "ashSpot",
2: "greenSpot",
3: "yellowSpot",
4: "redSpot",
}[status] || ""
);
},
},
],
},
baseData: {
productTypeList: [],
yqRelatedMerchantList: [],
outMerchantList: [], // 调出门店
inMerchantList: [], // 调入门店
billStatusList: [
{
confId: [2],
confLabel: "待审核",
},
{
confId: [5],
confLabel: "已审核",
},
{
confId: [6, 7],
confLabel: "已驳回",
},
],
deliveryStatusList: [
{
confId: 1,
confLabel: "未发货",
},
{
confId: 2,
confLabel: "全部发货",
},
{
confId: 3,
confLabel: "部分发货",
},
// {
// confId: 4,
// confLabel: "结束发货"
// }
],
},
transferDetailVisible: false,
transferObj: {},
};
},
computed: {
...mapState({
dowloadList: state => state.d2admin.user.dowloadList,
}),
},
mounted() {
// this.getBaseData()
// 获取全部类目
getProductTypeBySceneId({ sceneType: "" }).then((res) => {
this.baseData.productTypeList = res;
this.getOptionsList();
});
},
methods: {
...mapActions({
get: "d2admin/base/get",
close: "d2admin/page/close",
}),
...mapActions("d2admin/user", ["actionSetDownloadList"]),
// async getBaseData() {
// this.getOptionsList()
// },
// 查看
look(row) {
this.transferObj = {
allocateCode: row.allocateCode,
};
this.transferDetailVisible = true;
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm);
if (
this.searchFormSearch.billStatus
&& this.searchFormSearch.billStatus.length
) {
this.searchFormSearch.billStatusList
= this.searchFormSearch.billStatus;
}
delete this.searchFormSearch.billStatus;
resolve();
});
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === "select") {
if (
this.baseData[item.optionsName].length
&& this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
) {
const temp = {};
temp[this.showFormData[index].optionId] = "";
temp[this.showFormData[index].optionLabel] = "全部";
this.baseData[item.optionsName].unshift(temp);
}
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName],
);
}
});
},
// handleSearch() {
// this.$refs.recordTable.refreshTable()
// },
handleReset() {
this.searchForm = {
allocateCode: "",
callInName: "",
billStatus: "",
deliveryStatus: "",
queryType: 2,
};
this.getOptionsList();
this.$refs.recordTable.refreshTable(true, true);
},
async handleExport() {
await this.beforeSearchFn();
let params = this.searchFormSearch;
// 数组参数处理
Object.keys(params).forEach((key) => {
if (Array.isArray(params[key])) {
if (params[key].length > 0) {
params[key].forEach((item, index) => {
params[`${key}[${index}]`] = item;
});
}
delete params[key];
}
});
// 去除为null的值
for (const key in params) {
if (
params[key] === null
|| params[key] === ""
|| params[key].length === 0
) {
delete params[key];
}
}
params.method = "dj.smartcarlife.api.stockAllocate.exportExcel.async";
const list = [
...this.dowloadList,
{
name: "商务审核列表",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime(),
},
];
this.actionSetDownloadList({ list, type: "dowloadList" });
},
// // 查看
// look(row) {
// this.recordInfo = row
// this.allocationDetailVisible = true
// },
// // 审批
// handleReview(row) {
// this.$router.push({
// name: "handleReview",
// query: {
// id: row.id
// }
// })
// },
// // 驳回
// handleReject(row) {
// this.$router.push({
// name: "handleReject",
// query: {
// id: row.id
// }
// })
// },
// 审批
handleReview(row) {
this.$router.push({
name: "handleReview",
query: {
id: row.id,
allocateCode: row.allocateCode,
reviewType: "business",
},
});
},
// 驳回
handleReject(row) {
this.$router.push({
name: "handleReject",
query: {
id: row.id,
allocateCode: row.allocateCode,
reviewType: "business",
},
});
},
gotoAdd() {
this.$router.push({ name: "addAllocation" });
},
dialogClose(flag) {
this.allocationDetailVisible = !this.allocationDetailVisible;
},
},
};
</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>
<d2-container>
<div class="header-info">
<div class="title">
详细信息
</div>
<div class="info-content">
<el-row :gutter="20">
<el-col :span="8">
调出仓库:{{ detailInfo.callOutYqMerchantName || "-" }}
</el-col>
<el-col :span="8">
调出门店:{{ detailInfo.callOutMerchantName || "-" }}
</el-col>
<el-col :span="8">
调入仓库:{{ detailInfo.callInYqMerchantName || "-" }}
</el-col>
</el-row>
<el-row :gutter="20" style="margin-top: 15px">
<el-col :span="8">
调入门店:{{ detailInfo.callInMerchantName || "-" }}
</el-col>
<el-col :span="16">
备注:{{ detailInfo.remark || "-" }}
</el-col>
</el-row>
</div>
</div>
<div class="table-content">
<d2-table ref="recordTable"
:table-data="tableData"
:table-params="tableParams"
:table-total="tableTotal"
@refreshTable="refreshTable">
<template #actionSlot="scope">
<el-button type="text"
@click="handleInventoryDetail(scope.scope)">
库存明细
</el-button>
</template>
<template #filmRollNo="scope">
<div v-if="
scope.scope.filmRollList && scope.scope.filmRollList.length == 1
">
{{ scope.scope.filmRollList[0] }}
</div>
<div v-else-if="
scope.scope.filmRollList && scope.scope.filmRollList.length > 1
">
<el-popover placement="top"
trigger="hover"
width="200">
<div class="film-roll-box">
<div class="title">
膜卷号
</div>
<div v-for="(subItem, subIndex) in scope.scope.filmRollList"
:key="subIndex"
class="merchant-item">
{{ subItem }}
</div>
</div>
<template #reference>
<div>
<span style="color: #2a58ad">
(…{{ scope.scope.filmRollList.length }})
</span>
</div>
</template>
</el-popover>
</div>
<div v-else>
<span style="
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
">
{{ "-" }}
</span>
</div>
</template>
<template #carName="scope">
<el-tooltip v-if="
scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length
"
placement="top">
<template #content>
<div class="car-type-list">
<div v-for="(item, index) in scope.scope.suitCarTypeList"
:key="index">
{{
`${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`
}}
</div>
</div>
</template>
<div>{{ scope.scope.suitCarTypeList | formatCar }}</div>
</el-tooltip>
<div v-else>
-
</div>
</template>
</d2-table>
</div>
<div class="audit-section">
<el-form ref="rejectForm"
class="audit-form"
label-width="100px"
:model="rejectForm"
:rules="rules">
<el-form-item label="驳回节点:" prop="rejectNode">
<el-select v-model="rejectForm.rejectNode"
placeholder="请选择驳回节点"
style="width: 100%">
<el-option v-for="item in rejectNodeOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="驳回原因:" prop="rejectCause">
<el-input v-model="rejectForm.rejectCause"
maxlength="200"
placeholder="请输入驳回原因"
:rows="4"
show-word-limit
type="textarea">
</el-input>
</el-form-item>
</el-form>
<div class="audit-history examine-record">
<div class="title">
审核记录
</div>
<div v-if="auditDetaiList && auditDetaiList.length"
class="up-down"
@click="handleUpDown">
<el-button :icon="isVisible ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
size="mini"
type="text" />
{{ isVisible ? "收起" : "展开" }}
</div>
<div>
<div v-if="auditDetaiList && auditDetaiList.length"
class="record-div">
<div v-for="(item, index) in auditDetaiList"
:key="index"
class="record-div-d">
<span class="dot"></span>
<span class="span-txt-one">
{{
item.status ? $$(statusForShow, [item.status], "text") : ""
}}
</span>
<span class="span-txt-two">
<span :class="item.status ? examineStatusClass[item.status] : ''">
{{
item.status
? $$(statusForShow, [item.status], "status")
: ""
}}
</span>
<span v-if="item.rejectedStatus">
<span style="display: inline-block; margin: 0 8px">至</span>
<span>
{{
item.rejectedStatus
? $$(
rejectedForShow,
[item.rejectedStatus],
"rejectedStatus",
)
: ""
}}
</span>
</span>
</span>
<span class="span-txt-two reviewer ellipsis">
审核人:
<el-tooltip class="item"
:content="item.reviewedBy"
effect="dark"
placement="bottom"
popper-class="remark-popper-class">
<el-button type="text">
{{ item.reviewedBy }}
</el-button>
</el-tooltip>
</span>
<span class="span-txt-two">
审核时间:{{ item.reviewedDateFormat }}
</span>
<span v-if="item.remark"
class="span-txt-two">
备注:
<el-tooltip class="item audit-remark-input"
:content="item.remark"
effect="dark"
placement="bottom"
popper-class="remark-popper-class">
<el-button type="text">
{{
item.remark
? item.remark.length > 5
? `${item.remark.slice(0, 5)}...`
: item.remark
: ""
}}
</el-button>
</el-tooltip>
</span>
<span v-if="[4, 6, 7, 9].includes(item.status)"
class="span-txt-two">
驳回原因:
<el-tooltip class="item"
:content="item.rejectCause"
effect="dark"
placement="bottom"
popper-class="remark-popper-class">
<el-button type="text">
{{
item.rejectCause
? item.rejectCause.length > 5
? `${item.rejectCause.slice(0, 5)}...`
: item.rejectCause
: ""
}}
</el-button>
</el-tooltip>
</span>
</div>
</div>
<div v-else class="emptyCom">
<img alt=""
class="emptyImg"
:src="emptyImgUrl" />
<span class="tips">暂无数据</span>
</div>
</div>
</div>
</div>
<template #footer>
<div class="footer-btns">
<el-button :loading="loading"
type="primary"
@click="handleSubmit">
确定
</el-button>
<el-button @click="handleCancel">
取消
</el-button>
</div>
</template>
<!-- 库存明细 -->
<StockDetailDialog v-if="stockDetailDialogVisible"
:record-info="stockDetailInfo"
:visible.sync="stockDetailDialogVisible" />
</d2-container>
</template>
<script>
import {
getTransferGoodsInfo,
stockAllocateBusinessReject,
stockAllocateDetailPage,
stockAllocateInfo,
stockAllocateOperatorReject,
} from "@api/stockManage";
import { deepClone, Util } from "@/common/util";
import { baseConfig } from "@/main";
import stockDetailDialog from "@/views/stockManage/components/stockDetailDialog.vue";
export default {
name: "TransferReviewReject",
components: {
StockDetailDialog: stockDetailDialog,
},
filters: {
formatCar(list) {
if (!Array.isArray(list))
return "-";
const str = list
.map(
item =>
`${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`,
)
.join(",");
return str.length > 15 ? str.substring(0, 15) + "..." : str;
},
},
data() {
return {
emptyImgUrl: require("@/assets/empty-5.png"),
userInfo: this.$store.state.d2admin.user.info,
stockDetailDialogVisible: false,
stockDetailInfo: {},
detailInfo: {},
auditDetaiList: [],
originalAuditDetaiList: [],
isVisible: true,
rejectForm: {
rejectNode: "",
rejectCause: "",
},
rules: {
rejectNode: [
{ required: true, message: "请选择驳回节点", trigger: "change" },
],
rejectCause: [
{ required: true, message: "请输入驳回原因", trigger: "blur" },
],
},
activeNames: ["1"],
loading: false,
tableData: [],
tableTotal: 0,
tableParams: {
btnId: new Date().getTime() + Number.parseInt(Math.random() * 1000),
listName: "list",
tableColumns: [
{
label: "商品名称",
prop: "goodsName",
},
{
label: "商品编码",
prop: "productCode",
},
{
label: "规格",
prop: "specificationData",
},
{
label: "系列",
prop: "sourceMaterialName",
},
{
label: "所属分类",
prop: "goodsTypeName",
},
{
label: "调拨数量",
prop: "allocateNumber",
formatter: (cellValue) => {
const condition = baseConfig.membraneTypeList.includes(
cellValue.goodsType,
)
? `${cellValue.allocateNumber}米`
: `${cellValue.allocateNumber}件`;
return condition;
},
},
{
label: "发货数量",
prop: "deliveryNumber",
formatter: (cellValue) => {
const qty = cellValue.deliveryNumber ?? "-";
const unit = baseConfig.membraneTypeList.includes(
cellValue.goodsType,
)
? "米"
: "件";
return qty === "-" ? "-" : `${qty}${unit}`;
},
},
{
label: "调入门店库存",
prop: "inStockQty",
width: 150,
formatter: (cellValue) => {
const qty = cellValue.inStockQty ?? "-";
const unit = baseConfig.membraneTypeList.includes(
cellValue.goodsType,
)
? "米"
: "件";
return qty === "-" ? "-" : `${qty}${unit}`;
},
},
{
label: "调出门店库存",
prop: "outStockQty",
width: 150,
formatter: (cellValue) => {
const qty = cellValue.outStockQty ?? "-";
const unit = baseConfig.membraneTypeList.includes(
cellValue.goodsType,
)
? "米"
: "件";
return qty === "-" ? "-" : `${qty}${unit}`;
},
},
{
label: "膜卷号",
prop: "filmRollNo",
},
],
},
examineStatusClass: {
2: "greenSp",
4: "redSp",
5: "greenSp",
6: "redSp",
7: "redSp",
8: "greenSp",
9: "redSp",
},
statusForShow: {
2: { text: "运营审核", status: "通过" },
4: { text: "运营审核", status: "驳回" },
5: { text: "商务审核", status: "通过" },
6: { text: "商务审核", status: "驳回" },
7: { text: "调拨驳回", status: "驳回" },
8: { text: "总监审核", status: "通过" },
9: { text: "总监审核", status: "驳回" },
},
rejectedForShow: {
1: { rejectedStatus: "调拨商户" },
2: { rejectedStatus: "运营审核" },
3: { rejectedStatus: "商务审核" },
},
};
},
computed: {
// 判断是运营审核还是商务审核
// 运营审核 parentId: 90809
// 商务审核 parentId: 90810
isOperatorReview() {
// 运营审核 reviewType: operator
// 商务审核 reviewType: business
return this.$route.query.reviewType == "operator";
},
rejectNodeOptions() {
const baseOptions = [
{ label: "调拨商户", value: 1 },
{ label: "运营审核", value: 2 },
{ label: "商务审核", value: 3 },
];
// 1-调拨商户 2-运营审核 3-商务审核
if (this.isOperatorReview) {
// 运营审核 - 只返回调拨商户
return [baseOptions[0]];
} else {
// 商务审核 - 返回调拨商户、运营审核
return baseOptions.slice(0, 2);
}
},
},
created() {
this.getDetail();
// 如果是商务审核,添加操作列
if (!this.isOperatorReview) {
this.tableParams.tableColumns.push({
label: "操作",
prop: "action",
width: "100px",
addHtml: "actionSlot",
});
}
},
methods: {
getDetail() {
const allocateCode = this.$route.query.allocateCode;
if (!allocateCode)
return;
this.getGoodsDetail({ currentPage: 1, pageSize: 10 });
stockAllocateInfo({ allocateCode }).then((res) => {
this.detailInfo = res || {};
this.originalAuditDetaiList = res.auditDetaiList || [];
if (
this.originalAuditDetaiList
&& this.originalAuditDetaiList.length > 0
) {
this.originalAuditDetaiList = this.originalAuditDetaiList.map(
(item) => {
item.reviewedDateFormat = item.reviewedDate
? Util.dateFormate(item.reviewedDate, "YYYY-MM-DD HH:mm:ss")
: "";
return item;
},
);
}
this.auditDetaiList = deepClone(this.originalAuditDetaiList);
});
},
refreshTable(pageObj) {
this.getGoodsDetail(pageObj);
},
getGoodsDetail(pageObj) {
const allocateCode
= this.detailInfo.allocateCode || this.$route.query.allocateCode;
if (!allocateCode)
return;
getTransferGoodsInfo({
allocateCode,
pageSize: pageObj.pageSize,
currentPage: pageObj.currentPage,
}).then((res) => {
this.tableData = res.list || [];
this.tableTotal = res.total;
});
},
handleInventoryDetail(row) {
this.stockDetailInfo = {
upgradeGoodsId: row?.goodsId || row?.id,
yqMerchantId: this.detailInfo.callOutYqMerchantId,
};
this.stockDetailDialogVisible = true;
},
handleUpDown() {
this.auditDetaiList = this.isVisible
? deepClone(this.originalAuditDetaiList.slice(0, 2))
: deepClone(this.originalAuditDetaiList);
this.isVisible = !this.isVisible;
},
beforeSearchFn() {
return Promise.resolve({
id: this.$route.query.id,
});
},
handleSubmit() {
this.$refs.rejectForm.validate((valid) => {
if (valid) {
const params = {
allocateCode: this.detailInfo.allocateCode,
rejectCause: this.rejectForm.rejectCause,
rejectNode: this.rejectForm.rejectNode,
updatedBy: this.userInfo.detail ? this.userInfo.detail.userName : "",
};
this.loading = true;
const api = this.isOperatorReview
? stockAllocateOperatorReject
: stockAllocateBusinessReject;
api(params)
.then(() => {
this.$message.success("驳回成功");
this.handleCancel();
})
.finally(() => {
this.loading = false;
});
}
});
},
handleCancel() {
this.$store.dispatch("d2admin/page/close", {
tagName: this.$route.fullPath,
});
this.$router.go(-1);
},
},
};
</script>
<style lang="scss" scoped>
.header-info {
background: #fff;
padding: 20px;
margin-bottom: 10px;
.title {
font-size: 16px;
font-weight: bold;
margin-bottom: 20px;
padding-left: 10px;
border-left: 4px solid #409eff;
}
.info-content {
font-size: 14px;
color: #606266;
line-height: 1.5;
}
}
.table-content {
background: #fff;
padding: 10px;
margin-bottom: 10px;
}
.audit-section {
background: #fff;
padding: 20px;
.audit-form {
margin-bottom: 30px;
}
}
.examine-record {
position: relative;
width: 100%;
min-height: 60px;
border-radius: 4px;
border: 1px solid #fafafa;
background: #fafafa;
margin-top: 23px;
.title {
margin: 16px 20px;
width: 64px;
height: 19px;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 16px;
color: #333333;
text-align: center;
}
.up-down {
position: absolute;
right: 20px;
top: 20px;
width: 42px;
height: 20px;
font-family: PingFangSC-Regular;
color: #2a58ad;
font-size: 12px;
cursor: pointer;
}
.dot {
width: 6px;
height: 6px;
background: #185efe;
border-radius: 6px;
display: inline-block;
}
.record-div {
margin: 16px 20px;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #666666;
letter-spacing: 0;
.record-div-d {
margin-top: 10px;
display: flex;
align-items: center;
}
.span-txt-one {
margin-left: 14px;
margin-right: 30px;
}
.reviewer {
display: inline-block;
margin-right: 30px;
}
.span-txt-two {
margin-right: 30px;
}
.greenSp {
color: #4aca74;
}
.redSp {
color: #eb4e4e;
}
}
.emptyCom {
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: center;
align-items: center;
.emptyImg {
width: 64px;
}
.tips {
font-size: 14px;
color: #999999;
margin: 20px 0;
}
}
}
.footer-btns {
text-align: center;
padding: 10px 0;
}
::v-deep.audit-remark-input {
.el-input__count {
right: 15px;
bottom: 5px;
}
}
</style>
<template>
<d2-container>
<div class="header-info">
<div class="title">
详细信息
</div>
<div class="info-content">
<!-- 运营审核:纯文本展示 -->
<template v-if="isOperatorReview">
<el-row :gutter="20">
<el-col :span="8">
调出仓库:{{ detailInfo.callOutYqMerchantName || "-" }}
</el-col>
<el-col :span="8">
调出门店:{{ detailInfo.callOutMerchantName || "-" }}
</el-col>
<el-col :span="8">
调入仓库:{{ detailInfo.callInYqMerchantName || "-" }}
</el-col>
</el-row>
</template>
<!-- 商务审核:调出仓库和门店可编辑 -->
<template v-else>
<el-row align="middle"
:gutter="20"
type="flex">
<el-col :span="8" style="display: flex; align-items: center">
<span style="white-space: nowrap">调出仓库:</span>
<el-select v-model="detailInfo.callOutYqMerchantId"
filterable
placeholder="请选择"
size="small"
style="width: 200px"
@change="changeCallOutYqMerchant">
<el-option v-for="item in yqMerchantList"
:key="item.merchantNo"
:label="item.merchantName"
:value="item.merchantNo">
</el-option>
</el-select>
</el-col>
<el-col :span="8" style="display: flex; align-items: center">
<span style="white-space: nowrap">调出门店:</span>
<el-select v-model="detailInfo.callOutMerchantId"
filterable
placeholder="请选择"
size="small"
style="width: 200px"
@change="changeCallOutMerchant">
<el-option v-for="item in merchantList"
:key="item.merchantId"
:label="item.merchantName"
:value="item.merchantId">
</el-option>
</el-select>
</el-col>
<el-col :span="8">
调入仓库:{{ detailInfo.callInYqMerchantName || "-" }}
</el-col>
</el-row>
</template>
<el-row :gutter="20" style="margin-top: 15px">
<el-col :span="8">
调入门店:{{ detailInfo.callInMerchantName || "-" }}
</el-col>
<el-col :span="16">
备注:{{ detailInfo.remark || "-" }}
</el-col>
</el-row>
</div>
</div>
<div class="table-content">
<d2-table ref="recordTable"
:table-data="tableData"
:table-params="tableParams"
:table-total="tableTotal"
@refreshTable="refreshTable">
<template #actionSlot="scope">
<el-button type="text"
@click="handleInventoryDetail(scope.scope)">
库存明细
</el-button>
</template>
<template #filmRollNo="scope">
<div v-if="
scope.scope.filmRollList && scope.scope.filmRollList.length == 1
">
{{ scope.scope.filmRollList[0] }}
</div>
<div v-else-if="
scope.scope.filmRollList && scope.scope.filmRollList.length > 1
">
<el-popover placement="top"
trigger="hover"
width="200">
<div class="film-roll-box">
<div class="title">
膜卷号
</div>
<div v-for="(subItem, subIndex) in scope.scope.filmRollList"
:key="subIndex"
class="merchant-item">
{{ subItem }}
</div>
</div>
<template #reference>
<div>
<span style="color: #2a58ad">
(…{{ scope.scope.filmRollList.length }})
</span>
</div>
</template>
</el-popover>
</div>
<div v-else>
<span style="
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
">
{{ "-" }}
</span>
</div>
</template>
<template #carName="scope">
<el-tooltip v-if="
scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length
"
placement="top">
<template #content>
<div class="car-type-list">
<div v-for="(item, index) in scope.scope.suitCarTypeList"
:key="index">
{{
`${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`
}}
</div>
</div>
</template>
<div>{{ scope.scope.suitCarTypeList | formatCar }}</div>
</el-tooltip>
<div v-else>
-
</div>
</template>
</d2-table>
</div>
<div class="audit-section">
<div class="audit-form">
<div style="display: flex; margin-bottom: 10px">
<span style="width: 60px; font-weight: bold">备注:</span>
<el-input v-model="auditRemark"
class="audit-remark-input"
maxlength="200"
placeholder="请输入备注"
:rows="4"
show-word-limit
style="flex: 1"
type="textarea">
</el-input>
</div>
<div style="margin-left: 60px; color: #999; font-size: 12px">
说明:订单审核后自动流转至下一节点进行复审
</div>
</div>
<div class="audit-history examine-record">
<div class="title">
审核记录
</div>
<div v-if="auditDetaiList && auditDetaiList.length"
class="up-down"
@click="handleUpDown">
<el-button :icon="isVisible ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
size="mini"
type="text" />
{{ isVisible ? "收起" : "展开" }}
</div>
<div>
<div v-if="auditDetaiList && auditDetaiList.length"
class="record-div">
<div v-for="(item, index) in auditDetaiList"
:key="index"
class="record-div-d">
<span class="dot"></span>
<span class="span-txt-one">
{{
item.status ? $$(statusForShow, [item.status], "text") : ""
}}
</span>
<span class="span-txt-two">
<span :class="item.status ? examineStatusClass[item.status] : ''">
{{
item.status
? $$(statusForShow, [item.status], "status")
: ""
}}
</span>
<span v-if="item.rejectedStatus">
<span style="display: inline-block; margin: 0 8px">至</span>
<span>
{{
item.rejectedStatus
? $$(
rejectedForShow,
[item.rejectedStatus],
"rejectedStatus",
)
: ""
}}
</span>
</span>
</span>
<span class="span-txt-two reviewer ellipsis">
审核人:
<el-tooltip class="item"
:content="item.reviewedBy"
effect="dark"
placement="bottom"
popper-class="remark-popper-class">
<el-button type="text">
{{ item.reviewedBy }}
</el-button>
</el-tooltip>
</span>
<span class="span-txt-two">
审核时间:{{ item.reviewedDateFormat }}
</span>
<span v-if="item.remark"
class="span-txt-two">
备注:
<el-tooltip class="item"
:content="item.remark"
effect="dark"
placement="bottom"
popper-class="remark-popper-class">
<el-button type="text">
{{
item.remark
? item.remark.length > 5
? `${item.remark.slice(0, 5)}...`
: item.remark
: ""
}}
</el-button>
</el-tooltip>
</span>
<span v-if="[4, 6, 7, 9].includes(item.status)"
class="span-txt-two">
驳回原因:
<el-tooltip class="item"
:content="item.rejectCause"
effect="dark"
placement="bottom"
popper-class="remark-popper-class">
<el-button type="text">
{{
item.rejectCause
? item.rejectCause.length > 5
? `${item.rejectCause.slice(0, 5)}...`
: item.rejectCause
: ""
}}
</el-button>
</el-tooltip>
</span>
</div>
</div>
<div v-else class="emptyCom">
<img alt=""
class="emptyImg"
:src="emptyImgUrl" />
<span class="tips">暂无数据</span>
</div>
</div>
</div>
</div>
<template #footer>
<div class="footer-btns">
<el-button :loading="loading"
type="primary"
@click="handleSubmit">
确定
</el-button>
<el-button @click="handleCancel">
取消
</el-button>
</div>
</template>
<StockDetailDialog v-if="stockDetailDialogVisible"
:record-info="stockDetailInfo"
:visible.sync="stockDetailDialogVisible" />
</d2-container>
</template>
<script>
import {
getServicemerchantrefList,
getTransferGoodsInfo,
stockAllocateBusinessAudit,
stockAllocateInfo,
stockAllocateOperatorAudit,
stockAllocateYqMerchantList,
} from "@api/stockManage";
import { deepClone, Util } from "@/common/util";
import { baseConfig } from "@/main";
import stockDetailDialog from "@/views/stockManage/components/stockDetailDialog.vue";
export default {
name: "TransferReviewHandle",
components: {
StockDetailDialog: stockDetailDialog,
},
filters: {
formatCar(list) {
if (!Array.isArray(list))
return "-";
const str = list
.map(
item =>
`${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`,
)
.join(",");
return str.length > 15 ? str.substring(0, 15) + "..." : str;
},
},
data() {
return {
stockDetailDialogVisible: false,
stockDetailInfo: {},
detailInfo: {},
tableData: [],
tableTotal: 0,
auditRemark: "",
activeNames: ["1"],
loading: false,
tableParams: {
btnId: new Date().getTime() + Number.parseInt(Math.random() * 1000),
listName: "list",
tableColumns: [
{
label: "商品名称",
prop: "goodsName",
},
{
label: "商品编码",
prop: "productCode",
},
{
label: "规格",
prop: "specificationData",
},
{
label: "系列",
prop: "sourceMaterialName",
},
{
label: "所属分类",
prop: "goodsTypeName",
},
{
label: "调拨数量",
prop: "allocateNumber",
formatter: (cellValue) => {
// const condition = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.allocateNumber}米` : `${cellValue.allocateNumber}件`
// return condition
const condition = baseConfig.membraneTypeList.includes(
cellValue.goodsType,
)
? `${cellValue.allocateNumber}米`
: `${cellValue.allocateNumber}件`;
return condition;
},
},
{
label: "发货数量",
prop: "deliveryNumber",
formatter: (cellValue) => {
const qty = cellValue.deliveryNumber ?? "-";
const unit = baseConfig.membraneTypeList.includes(
cellValue.goodsType,
)
? "米"
: "件";
return qty === "-" ? "-" : `${qty}${unit}`;
},
},
{
label: "调入门店库存",
prop: "inStockQty",
width: 150,
formatter: (cellValue) => {
const qty = cellValue.inStockQty ?? "-";
const unit = baseConfig.membraneTypeList.includes(
cellValue.goodsType,
)
? "米"
: "件";
return qty === "-" ? "-" : `${qty}${unit}`;
},
},
{
label: "调出门店库存",
prop: "outStockQty",
width: 150,
formatter: (cellValue) => {
const qty = cellValue.outStockQty ?? "-";
const unit = baseConfig.membraneTypeList.includes(
cellValue.goodsType,
)
? "米"
: "件";
return qty === "-" ? "-" : `${qty}${unit}`;
},
},
{
label: "膜卷号",
prop: "filmRollNo",
},
],
},
yqMerchantList: [],
merchantList: [],
emptyImgUrl: require("@/assets/empty-5.png"),
auditDetaiList: [],
originalAuditDetaiList: [],
isVisible: true,
examineStatusClass: {
2: "greenSp",
4: "redSp",
5: "greenSp",
6: "redSp",
7: "redSp",
8: "greenSp",
9: "redSp",
},
statusForShow: {
2: { text: "运营审核", status: "通过" },
4: { text: "运营审核", status: "驳回" },
5: { text: "商务审核", status: "通过" },
6: { text: "商务审核", status: "驳回" },
7: { text: "调拨驳回", status: "驳回" },
8: { text: "总监审核", status: "通过" },
9: { text: "总监审核", status: "驳回" },
},
rejectedForShow: {
1: { rejectedStatus: "调拨商户" },
2: { rejectedStatus: "运营审核" },
3: { rejectedStatus: "商务审核" },
},
userInfo: this.$store.state.d2admin.user.info,
};
},
computed: {
// 判断是运营审核还是商务审核
// 运营审核 parentId: 90809
// 商务审核 parentId: 90810
isOperatorReview() {
// 运营审核 reviewType: operator
// 商务审核 reviewType: business
return this.$route.query.reviewType == "operator";
},
},
created() {
this.getDetail();
// 如果是商务审核,添加操作列
if (!this.isOperatorReview) {
this.tableParams.tableColumns.push({
label: "操作",
prop: "action",
width: "100px",
addHtml: "actionSlot",
});
}
},
methods: {
getDetail() {
const allocateCode = this.$route.query.allocateCode;
if (!allocateCode)
return;
this.getGoodsDetail({ currentPage: 1, pageSize: 10 });
stockAllocateInfo({ allocateCode }).then((res) => {
this.detailInfo = res || {};
// this.tableData = res.stockAllocateDetailList || []
this.originalAuditDetaiList = res.auditDetaiList || [];
if (
this.originalAuditDetaiList
&& this.originalAuditDetaiList.length > 0
) {
this.originalAuditDetaiList = this.originalAuditDetaiList.map(
(item) => {
item.reviewedDateFormat = item.reviewedDate
? Util.dateFormate(item.reviewedDate, "YYYY-MM-DD HH:mm:ss")
: "";
return item;
},
);
}
this.auditDetaiList = deepClone(this.originalAuditDetaiList);
// 如果是商务审核,获取调出门店列表
if (!this.isOperatorReview) {
this.getMerchantList();
this.getYqMerchantList();
}
});
},
// 获取调出仓库(园区店)列表
getYqMerchantList() {
const params = { returnAll: true };
stockAllocateYqMerchantList({
params,
}).then((res) => {
console.log(res, "调出仓库(园区店)列表");
// if
this.yqMerchantList = (res || []).map((item) => {
return {
...item,
merchantNo: Number(item.merchantNo),
};
});
});
},
// 获取调出门店列表
getMerchantList() {
const params = { returnAll: true };
params.yqMerchantId = this.detailInfo.callOutYqMerchantId;
getServicemerchantrefList(params).then((res) => {
this.merchantList = res || [];
if (
this.detailInfo.callOutYqMerchantId
&& this.detailInfo.callOutYqMerchantName
) {
const exists = this.merchantList.some(
item => item.merchantId == this.detailInfo.callOutYqMerchantId,
);
if (!exists) {
this.merchantList.push({
merchantId: this.detailInfo.callOutYqMerchantId,
merchantName: this.detailInfo.callOutYqMerchantName,
});
}
}
});
},
changeCallOutYqMerchant(val) {
console.log(val, this.yqMerchantList, "val");
const selected = this.yqMerchantList.find(
item => item.merchantNo === val,
);
console.log(selected, "selected");
if (selected) {
this.detailInfo.callOutYqMerchantName = selected.merchantName;
this.getMerchantList();
}
this.detailInfo.callOutMerchantId = "";
this.detailInfo.callOutMerchantName = "";
},
changeCallOutMerchant(val) {
const selected = this.merchantList.find(item => item.merchantId === val);
if (selected) {
this.detailInfo.callOutMerchantName = selected.merchantName;
// 选中门店后,自动关联仓库ID并刷新仓库列表
// if (selected.yqMerchantId) {
// this.detailInfo.callOutYqMerchantId = selected.yqMerchantId;
// this.detailInfo.callOutYqMerchantName = selected.yqMerchantName;
// // this.getMerchantList()
// }
}
},
handleInventoryDetail(row) {
console.log(row, "row");
this.stockDetailInfo = {
upgradeGoodsId: row?.goodsId || row?.id,
// yqMerchantId: this.detailInfo.callOutYqMerchantId
};
this.stockDetailDialogVisible = true;
},
handleUpDown() {
this.auditDetaiList = this.isVisible
? deepClone(this.originalAuditDetaiList.slice(0, 2))
: deepClone(this.originalAuditDetaiList);
this.isVisible = !this.isVisible;
},
beforeSearchFn() {
return Promise.resolve({
id: this.$route.query.id,
});
},
handleSubmit() {
let params = {};
if (this.isOperatorReview) {
params = {
allocateCode: this.detailInfo.allocateCode,
remark: this.auditRemark,
updatedBy: this.userInfo.detail ? this.userInfo.detail.userName : "",
};
} else {
if (!this.detailInfo.callOutMerchantId) {
this.$message.warning("请选择调出门店");
return;
}
if (!this.detailInfo.callOutYqMerchantId) {
this.$message.warning("请选择调出仓库");
return;
}
params = {
allocateCode: this.detailInfo.allocateCode,
callOutYqMerchantId: String(this.detailInfo.callOutYqMerchantId),
callOutYqMerchantName: this.detailInfo.callOutYqMerchantName,
callOutMerchantId: String(this.detailInfo.callOutMerchantId),
callOutMerchantName: this.detailInfo.callOutMerchantName,
remark: this.auditRemark,
id: this.detailInfo.id,
updatedBy: this.userInfo.detail ? this.userInfo.detail.userName : "",
};
}
this.loading = true;
const api = this.isOperatorReview
? stockAllocateOperatorAudit
: stockAllocateBusinessAudit;
api(params)
.then(() => {
this.$message.success("审核成功");
this.handleCancel();
})
.finally(() => {
this.loading = false;
});
},
handleCancel() {
this.$store.dispatch("d2admin/page/close", {
tagName: this.$route.fullPath,
});
this.$router.go(-1);
},
refreshTable(pageObj) {
this.getGoodsDetail(pageObj);
},
getGoodsDetail(pageObj) {
const allocateCode = this.$route.query.allocateCode;
getTransferGoodsInfo({
allocateCode,
pageSize: pageObj.pageSize,
currentPage: pageObj.currentPage,
}).then((res) => {
this.tableData = res.list || [];
this.tableTotal = res.total;
});
},
},
};
</script>
<style lang="scss" scoped>
.header-info {
background: #fff;
padding: 20px;
margin-bottom: 10px;
.title {
font-size: 16px;
font-weight: bold;
margin-bottom: 20px;
padding-left: 10px;
border-left: 4px solid #409eff;
}
.info-content {
font-size: 14px;
color: #606266;
line-height: 1.5;
}
}
.table-content {
background: #fff;
padding: 10px;
margin-bottom: 10px;
}
.audit-section {
background: #fff;
padding: 20px;
.audit-form {
margin-bottom: 30px;
}
}
.examine-record {
position: relative;
width: 100%;
min-height: 60px;
border-radius: 4px;
border: 1px solid #fafafa;
background: #fafafa;
margin-top: 23px;
.title {
margin: 16px 20px;
width: 64px;
height: 19px;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 16px;
color: #333333;
text-align: center;
}
.up-down {
position: absolute;
right: 20px;
top: 20px;
width: 42px;
height: 20px;
font-family: PingFangSC-Regular;
color: #2a58ad;
font-size: 12px;
cursor: pointer;
}
.dot {
width: 6px;
height: 6px;
background: #185efe;
border-radius: 6px;
display: inline-block;
}
.record-div {
margin: 16px 20px;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #666666;
letter-spacing: 0;
.record-div-d {
margin-top: 10px;
display: flex;
align-items: center;
}
.span-txt-one {
margin-left: 14px;
margin-right: 30px;
}
.reviewer {
display: inline-block;
margin-right: 30px;
}
.span-txt-two {
margin-right: 30px;
}
.greenSp {
color: #4aca74;
}
.redSp {
color: #eb4e4e;
}
}
.emptyCom {
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: center;
align-items: center;
.emptyImg {
width: 64px;
}
.tips {
font-size: 14px;
color: #999999;
margin: 20px 0;
}
}
}
.footer-btns {
text-align: center;
padding: 10px 0;
}
::v-deep.audit-remark-input {
.el-input__count {
right: 15px;
bottom: 5px;
}
}
</style>
<!-- 运营审核 -->
<template>
<div>
<d2-container>
<template #header>
<div class="header" style="padding: 10px 20px">
<d2-search ref="showSearch"
class="show-search"
:form-data="showFormData"
:search-form="searchForm" />
<div class="up-btns">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset">
重置
</el-button>
</div>
</div>
</template>
<div class="d2-container-content">
<d2-table-header>
<!-- <span slot="left"
v-if="!userInfo.beSuper && userInfo.beYQMerchant">
<auth-button category="Button"
:show-btn-ids="['9080501']" />
</span> -->
<auth-button category="Button" :show-btn-ids="['9080901']" />
</d2-table-header>
<d2-table ref="recordTable"
:before-search-fn="beforeSearchFn"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams">
<template #auth-button="scope">
<div>
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9080902']" />
</span>
<span v-if="scope.scope.billStatus == 1" style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9080903']" />
</span>
<span v-if="scope.scope.billStatus == 1" style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9080904']" />
</span>
</div>
</template>
</d2-table>
</div>
</d2-container>
<!-- 查看 -->
<TransferDetailDialog v-if="transferDetailVisible"
:hide-contact="true"
:params-obj="transferObj"
:visible.sync="transferDetailVisible" />
</div>
</template>
<script>
import { getProductTypeBySceneId } from "@api/product";
import {
getServicemerchantrefList,
getyqMerchantList,
stockAllocateOperatorReviewPage,
yqRelatedList,
} from "@api/stockManage";
import { mapActions, mapState } from "vuex";
import { deepClone, Util } from "@/common/util";
// import allocationDetailDialog from "../transferOperationsReviewDetailDialog"
export default {
name: "TransferOperationsReviewList",
components: {
// allocationDetailDialog
TransferDetailDialog: () => import("../components/transferDetailDialog.vue"),
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
searchForm: {
allocateCode: "",
callInName: "",
billStatus: "",
deliveryStatus: "",
queryType: 1,
},
searchFormSearch: {},
searchSelectObj: {
orderOrTrade: {
attr: "inputtedOrderCode",
value: "",
},
},
showFormData: [
{
label: "调拨单号",
name: "allocateCode",
type: "input",
maxlength: "20",
isClear: true,
},
{
label: "调入仓库",
name: "callInName",
type: "input",
maxlength: "20",
isClear: true,
},
{
label: "订单状态",
name: "billStatus",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confLabel",
optionsName: "billStatusList",
},
{
label: "发货状态",
name: "deliveryStatus",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confLabel",
optionsName: "deliveryStatusList",
},
],
getListApi: stockAllocateOperatorReviewPage,
tableParams: {
btnId: new Date().getTime() + Number.parseInt(Math.random() * 1000),
listName: "list",
tableOption: true,
tableColumns: [
// {
// label: "序号",
// width: "60px",
// prop: "",
// formatter: (row, column, cellValue, index) => {
// return index + 1
// }
// },
{
label: "调拨单号",
prop: "allocateCode",
width: "200px",
},
{
label: "单据时间",
prop: "submitTime",
width: "150px",
formatter: (cellValue) => {
return cellValue.submitTime
? Util.dateFormate(cellValue.submitTime, "YYYY-MM-DD HH:mm:ss")
: "";
},
},
{
label: "调拨人",
prop: "createdBy",
width: "150px",
},
{
label: "调入门店",
prop: "callInMerchantName",
},
{
label: "调入仓库",
prop: "callInYqMerchantName",
},
{
label: "调出门店",
prop: "callOutMerchantName",
},
{
label: "调出仓库",
prop: "callOutYqMerchantName",
},
{
label: "订单状态",
prop: "billStatusName",
width: "150px",
formatter: (cellValue) => {
const status = cellValue.billStatus;
if ([1].includes(status)) {
return "待审核";
} else if ([2, 5].includes(status)) {
return "已审核";
} else if ([4, 6, 7].includes(status)) {
return "已驳回";
} else if ([0].includes(status)) {
return "待提交";
} else if ([-1].includes(status)) {
return "作废";
}
return cellValue.billStatusName || "-";
},
className: (cellValue) => {
// 0 待提交 1 运营审核 2 商务审核 4,6,7 审批驳回 5 审批通过 -1 作废
const status = cellValue.billStatus;
if ([1].includes(status)) {
return "yellowSpot";
} else if ([2, 5].includes(status)) {
return "greenSpot";
} else if ([4, 6, 7].includes(status)) {
return "redSpot";
} else if ([0].includes(status)) {
return "ashSpot";
} else if ([-1].includes(status)) {
return "redSpot";
}
return "";
},
},
{
label: "发货状态",
prop: "deliveryStatusName",
width: "150px",
formatter: (cellValue) => {
const status = cellValue.deliveryStatus;
return (
{
1: "未发货",
2: "全部发货",
3: "部分发货",
4: "结束发货",
}[status]
|| cellValue.deliveryStatusName
|| "-"
);
},
className: (cellValue) => {
const status = cellValue.deliveryStatus;
return (
{
1: "ashSpot",
2: "greenSpot",
3: "yellowSpot",
4: "redSpot",
}[status] || ""
);
},
},
],
},
baseData: {
productTypeList: [],
yqRelatedMerchantList: [],
outMerchantList: [], // 调出门店
inMerchantList: [], // 调入门店
billStatusList: [
{
confId: [1],
confLabel: "待审核",
},
{
confId: [2, 5],
confLabel: "已审核",
},
{
confId: [4, 6, 7],
confLabel: "已驳回",
},
],
deliveryStatusList: [
{
confId: 1,
confLabel: "未发货",
},
{
confId: 2,
confLabel: "全部发货",
},
{
confId: 3,
confLabel: "部分发货",
},
// {
// confId: 4,
// confLabel: "结束发货"
// }
],
},
transferDetailVisible: false,
transferObj: {},
};
},
computed: {
...mapState({
dowloadList: state => state.d2admin.user.dowloadList,
}),
},
mounted() {
// this.getBaseData()
// 获取全部类目
getProductTypeBySceneId({ sceneType: "" }).then((res) => {
this.baseData.productTypeList = res;
this.getOptionsList();
});
},
methods: {
...mapActions({
get: "d2admin/base/get",
close: "d2admin/page/close",
}),
...mapActions("d2admin/user", ["actionSetDownloadList"]),
// async getBaseData() {
// this.getOptionsList()
// },
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm);
if (
this.searchFormSearch.billStatus
&& this.searchFormSearch.billStatus.length
) {
this.searchFormSearch.billStatusList
= this.searchFormSearch.billStatus;
}
delete this.searchFormSearch.billStatus;
resolve();
});
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === "select") {
if (
this.baseData[item.optionsName].length
&& this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
) {
const temp = {};
temp[this.showFormData[index].optionId] = "";
temp[this.showFormData[index].optionLabel] = "全部";
this.baseData[item.optionsName].unshift(temp);
}
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName],
);
}
});
},
// handleSearch() {
// this.$refs.recordTable.refreshTable()
// },
handleReset() {
this.searchForm = {
allocateCode: "",
callInName: "",
billStatus: "",
deliveryStatus: "",
queryType: 1,
};
this.getOptionsList();
this.$refs.recordTable.refreshTable(true, true);
},
async handleExport() {
await this.beforeSearchFn();
let params = this.searchFormSearch;
// 数组参数处理
Object.keys(params).forEach((key) => {
if (Array.isArray(params[key])) {
if (params[key].length > 0) {
params[key].forEach((item, index) => {
params[`${key}[${index}]`] = item;
});
}
delete params[key];
}
});
// 去除为null的值
for (const key in params) {
if (params[key] === null || params[key] === "" || params[key].length === 0) {
delete params[key];
}
}
params.method = "dj.smartcarlife.api.stockAllocate.exportExcel.async";
const list = [
...this.dowloadList,
{
name: "运营审核列表",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime(),
},
];
this.actionSetDownloadList({ list, type: "dowloadList" });
},
// 查看
look(row) {
this.transferObj = {
allocateCode: row.allocateCode,
};
this.transferDetailVisible = true;
},
// 审批
handleReview(row) {
this.$router.push({
name: "handleReview",
query: {
id: row.id,
allocateCode: row.allocateCode,
reviewType: "operator",
},
});
},
// 驳回
handleReject(row) {
this.$router.push({
name: "handleReject",
query: {
id: row.id,
allocateCode: row.allocateCode,
reviewType: "operator",
},
});
},
gotoAdd() {
this.$router.push({ name: "addAllocation" });
},
dialogClose(flag) {
this.allocationDetailVisible = !this.allocationDetailVisible;
},
},
};
</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>
<baseDialog :is-show.sync="dialogShow" :dialog-config="rejectConfig.config" @handleClick="handleRejectConfirm" @closeDialog="handleRejectClose">
<div class="reject-dialog" style="margin: 0;" v-if="dialogShow">
<div class="address-info">
<div class="info-item" v-for="(item, index) in infoList" :key="index" :class="{ 'remark-item': item.isRemark }">
<span class="label-name">{{ item.label }}:</span>
<ellipsis-tooltip class="label-value" :content="detailInfo[item.prop]" />
</div>
</div>
<div class="reject-page edit-tmpl">
<div class="title">商品信息</div>
<div class="content-box">
<d2-table ref="purchaseOrderDetailTable" :table-params="rejectTableParams" :table-data="goodsList" @refreshTable="refreshTable" :table-total="tableTotal">
</d2-table>
</div>
</div>
<el-form :rules="rejectRules" :model="formData" label-width="150px" ref="delivery-dialog-form">
<el-form-item label="驳回节点:" prop="rejectNode">
<el-select v-model="formData.rejectNode" placeholder="请选择驳回节点" style="width: 450px">
<el-option v-for="item in rejectNodeOptions" :key="item.id" :label="item.label" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="驳回原因:" prop="rejectCause">
<el-input type="textarea" placeholder="请输入驳回原因" maxlength="200" style="width: 450px;" :rows="4" show-word-limit v-model.trim="formData.rejectCause" class="dis-in-block reject-input" />
</el-form-item>
</el-form>
<p style="margin-left: 150px; color: #999999;">
说明:驳回后,整个调拨订单进行驳回,无法再重新进行发货操作。
</p>
<div class="examine-record">
<div class="title">审核记录</div>
<div class="log-box">
<div class="record-div" v-if="detailInfo.auditDetaiList && detailInfo.auditDetaiList.length">
<div class="record-div-d" v-for="(item, index) in detailInfo.auditDetaiList" :key="index">
<!-- <span class="dot"></span> -->
<div class="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</div>
<div class="span-txt-two" style="font-weight: 500;">
<!-- :class="item.status ? examineStatusClass[item.status] : ''" -->
<span>
{{ item.status ? $$(statusForShow, [item.status], 'status') : '' }}</span>
<!-- <span v-if="item.rejectedStatus">
<span style="display: inline-block; margin: 0 8px;">至</span>
<span>{{ item.rejectedStatus ? $$(rejectedForShow, [item.rejectedStatus], 'rejectedStatus') : '' }}</span>
</span> -->
</div>
<div class="span-txt-two reviewer ellipsis">审核人:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.reviewedBy" placement="bottom">
<span>{{ item.reviewedBy }}</span>
</el-tooltip>
</div>
<div class="span-txt-two">审核时间:{{ item.reviewedDateFormat }}</div>
<div v-if="item.remark" class="span-txt-two">备注:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.remark" placement="bottom">
<span>{{ item.remark ? (item.remark.length > 5 ? (item.remark.slice(0, 5) + '...') : item.remark) : '' }}</span>
</el-tooltip>
</div>
<div class="span-txt-two" v-if="[4, 6, 7, 9].includes(item.status)">驳回原因:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.rejectCause" placement="bottom">
<span>{{ item.rejectCause ? (item.rejectCause.length > 5 ? (item.rejectCause.slice(0, 5) + '...') : item.rejectCause) : '' }}</span>
</el-tooltip>
</div>
</div>
</div>
<div class="emptyCom" v-else>
<img :src="emptyImgUrl" class="emptyImg" alt="">
<span class="tips">暂无数据</span>
</div>
</div>
</div>
</div>
</baseDialog>
</div>
</template>
<script>
import { getTransferGoodsInfo, getTransferAuitInfo, deliveryReject } from '@/api/stockManage'
import { deepClone, Util } from '@/common/util'
import { baseConfig } from "@/main"
import EllipsisTooltip from '../../components/EllipsisTooltip.vue'
export default {
name: "RejectDialog",
props: {
visible: {
type: Boolean,
default: false
},
rejectData: {
type: Object
}
},
components: {
EllipsisTooltip
},
data() {
return {
hasPage: false,
emptyImgUrl: require("@/assets/empty-5.png"),
layout: 'total,sizes,prev,pager,next,jumper',
rejectNodeOptions: [
{
id: 1,
label: "调拨商户"
},
{
id: 2,
label: "运营审核"
},
{
id: 3,
label: "商务审核"
}
],
rejectConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: [
]
},
config: {
title: "驳回",
width: "1080px"
}
},
examineStatusClass: {
2: 'greenSp',
4: 'redSp',
5: 'greenSp',
6: 'redSp',
7: 'redSp',
8: 'greenSp',
9: 'redSp'
},
statusForShow: {
2: { text: '运营审核', status: '通过' },
4: { text: '运营审核', status: '驳回' },
5: { text: '商务审核', status: '通过' },
6: { text: '商务审核', status: '驳回' },
7: { text: '调拨驳回', status: '驳回' },
8: { text: '总监审核', status: '通过' },
9: { text: '总监驳回', status: '驳回' }
},
rejectedForShow: {
1: { rejectedStatus: '调拨商户' },
2: { rejectedStatus: '运营审核' },
3: { rejectedStatus: '商务审核' }
},
rejectTableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableColumns: [
{
label: '商品名称',
prop: 'goodsName'
},
{
label: '商品编码',
prop: 'productCode'
},
{
label: '规格',
prop: 'specificationData'
},
{
label: '系列',
prop: 'sourceMaterialName'
},
{
label: '所属分类',
prop: 'goodsTypeName'
},
{
label: '调拨数量',
prop: 'allocateNumber',
formatter: (cellValue) => {
const qty = cellValue.allocateNumber ?? '-'
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '调入门店库存',
prop: 'inStockQty',
formatter: (cellValue) => {
const qty = cellValue.inStockQty ?? '-'
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '调出门店库存',
prop: 'outStockQty',
formatter: (cellValue) => {
const qty = cellValue.outStockQty ?? '-'
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '膜卷号',
prop: 'filmRollNo'
}
]
},
infoList: [
{ label: '调出仓库', prop: 'callOutYqMerchantName' },
{ label: '调出门店', prop: 'callOutMerchantName' },
{ label: '调入仓库', prop: 'callInYqMerchantName' },
{ label: '调入门店', prop: 'callInMerchantName' },
{ label: '备注', prop: 'remark', isRemark: true }
],
rejectRules: {
rejectNode: [
{ required: true, message: "请选择驳回节点", trigger: "change" }
],
rejectCause: [
{ required: true, message: "请输入驳回原因", trigger: "blur" }
]
},
formData: {},
goodsList: [],
tableTotal: 0,
detailInfo: {},
auditDetaiList: [],
}
},
computed: {
dialogShow: {
get() {
if (this.visible) {
this.getGoodsDetail({ currentPage: 1, pageSize: 10 })
this.getInfoDetail()
}
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
},
mounted() {
},
methods: {
refreshTable(pageObj) {
this.getGoodsDetail(pageObj)
},
getGoodsDetail(pageObj) {
getTransferGoodsInfo({ allocateCode: this.rejectData.allocateCode, pageSize: pageObj.pageSize, currentPage: pageObj.currentPage }).then(res => {
this.goodsList = res.list || []
this.tableTotal = res.total
})
},
getInfoDetail() {
getTransferAuitInfo({ allocateCode: this.rejectData.allocateCode }).then(res => {
res?.auditDetaiList?.forEach(item => {
item.reviewedDateFormat = item.reviewedDate
? Util.dateFormate(item.reviewedDate, 'YYYY-MM-DD HH:mm:ss')
: ""
})
this.detailInfo = res
})
},
handleRejectClose(isRefresh = false) {
this.$emit("rejectClose", isRefresh)
},
handleRejectConfirm() {
this.$refs["delivery-dialog-form"].validate((valid) => {
if (valid) {
deliveryReject({ allocateCode: this.rejectData.allocateCode, rejectNode: this.formData.rejectNode, rejectCause: this.formData.rejectCause })
.then((res) => {
this.handleRejectClose(true)
this.notice.okTips('驳回成功')
})
.catch(() => {
this.handleRejectClose()
})
}
})
},
}
}
</script>
<style lang="scss" scoped>
.address-info {
display: flex;
box-sizing: border-box;
flex-wrap: wrap;
width: 100%;
padding: 0 20px;
margin-top: 10px;
font-size: 14px;
color: #666666;
.info-item {
width: 33.33%;
display: flex;
align-items: center;
margin-bottom: 10px;
padding-right: 15px;
box-sizing: border-box;
.label-name {
white-space: nowrap;
min-width: fit-content;
}
.label-value {
flex: 1;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
}
&.remark-item {
flex-grow: 1;
width: 33.33%;
}
}
}
.reject-page {
margin-bottom: 20px;
.title {
margin: 16px 0;
height: 22px;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 16px;
color: #333333;
padding-bottom: 10px;
border-bottom: 1px solid #e5e5e5;
}
}
.examine-record {
min-height: 157px;
margin-top: 23px;
.log-box {
margin-top: 20px;
border-radius: 4px;
background: #FAFAFA;
padding: 16px;
}
.title {
margin: 16px 0;
height: 22px;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 16px;
color: #333333;
padding-bottom: 10px;
border-bottom: 1px solid #e5e5e5;
}
.dot {
width: 6px;
height: 6px;
background: #185efe;
border-radius: 6px;
display: inline-block;
}
.record-div {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #666666;
letter-spacing: 0;
.record-div-d {
display: flex;
align-items: center;
margin-bottom: 10px;
&:last-child{
margin-bottom: 0;
}
}
.span-txt-one {
height: 21px;
font-weight: 500;
color: #333333;
}
.reviewer {
width: 140px;
&.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.span-txt-two {
margin-left: 40px;
}
.greenSp {
color: #4aca74;
}
.redSp {
color: #eb4e4e;
}
}
.emptyCom {
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: center;
align-items: center;
.emptyImg {
width: 64px;
}
.tips {
font-size: 14px;
color: #999999;
margin: 20px 0;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div>
<baseDialog :is-show.sync="dialogShow" :dialog-config="dialogConfig.config" @handleClick="submit" @closeDialog="handleShipmentClose(false)">
<div class="edit-order-dialog" v-if="dialogShow">
<div class="address-info">
<div class="info-item" v-for="(item, index) in infoList" :key="index" :class="{ 'remark-item': item.isRemark }">
<span class="label-name">{{ item.label }}:</span>
<ellipsis-tooltip class="label-value" :content="paramsObj[item.prop]" />
</div>
</div>
<div class="table-class">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" :has-page="hasPage" :table-data="tableList">
<div slot="nowPurNum" slot-scope="scope" style="margin: 0 8px;">
<div>
<el-input v-if="
(!tableList[scope.index].shipperUuid) || tableList[scope.index].shipperUuid == userInfo.detail.uuid" :class="{ 'border-red': !nowPurNumList[scope.index] && isSubmit }" placeholder="请输入" v-model="nowPurNumList[scope.index]" @input="(e) => handleInput(e, scope)"></el-input>
</div>
</div>
</d2-table>
</div>
<div class="form-content">
<el-form label-width="100px" :rules="dialogRules" :model="dialogData" ref="delivery-dialog-form">
<el-form-item label="承运单号:" prop="deliveryNumber">
<el-input maxlength="50" placeholder="请输入承运物流单号" v-model.trim="dialogData.deliveryNumber" class="dis-in-block" @input="deliveryNumberInput" />
</el-form-item>
<el-form-item label="承运公司:" prop="deliveryCompany">
<el-input placeholder="请输入承运物流公司" maxlength="20" v-model.trim="dialogData.deliveryCompany" class="dis-in-block" />
</el-form-item>
<el-form-item label="发货时间:" prop="deliveryDate">
<el-date-picker class="dis-in-block" v-model="dialogData.deliveryDate" type="datetime" placeholder="请选择发货时间">
</el-date-picker>
</el-form-item>
</el-form>
</div>
</div>
</baseDialog>
</div>
</template>
<script>
import { batchDelicery } from "@/api/stockManage.js"
import { baseConfig } from "@/main"
import { limitPrice } from "@/common/format"
import { Util } from "@/common/util"
import EllipsisTooltip from '../../components/EllipsisTooltip.vue'
import _ from "lodash"
export default {
name: "shipmentDialog",
props: {
page: {
type: String,
default: "purchase"
},
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: () => { }
},
tableList: {
type: Array,
default: () => { }
}
},
components: {
EllipsisTooltip
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit("update:visible", val)
}
}
},
data() {
return {
showOptionInput: false,
addOptionValue: "",
editOptionIndex: -1,
editOptionValue: "",
userInfo: this.$store.state.d2admin.user.info,
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: [
]
},
config: {
title: "发货",
width: "1300px"
}
},
isSubmit: false,
dialogData: {},
deliveryCardList: [],
oldPurNumList: [],
nowPurNumList: [],
orderInfo: {},
hasPage: false,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableColumns: [
{
label: "商品名称",
prop: 'goodsName'
},
{
label: "商品编码",
prop: "productCode"
},
{
label: "规格",
prop: "specificationData"
},
{
label: "系列",
prop: "sourceMaterialName"
},
{
label: "所属分类",
prop: "goodsTypeName"
},
{
label: "调拨数量",
prop: "allocateNumber",
formatter: (cellValue) => {
const qty = cellValue.allocateNumber ?? '-'
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: "发货数量",
prop: "",
width: 124,
addHtml: "nowPurNum"
},
{
label: '调入门店库存',
prop: 'inStockQty',
formatter: (cellValue) => {
const qty = cellValue.inStockQty ?? '-'
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '调出门店库存',
prop: 'outStockQty',
formatter: (cellValue) => {
const qty = cellValue.outStockQty ?? '-'
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '膜卷号',
prop: 'filmRollNo'
}
]
},
dialogRules: {
deliveryCompany: [
{ required: true, message: "请输入承运公司", trigger: "blur" }
],
deliveryNumber: [
{ required: true, message: "请输入承运单号", trigger: "blur" }
],
deliveryDate: [
{ required: true, message: "请选择发货时间", trigger: "blur" }
]
},
shippingWarehouseList: [],
infoList: [
{ label: '调出仓库', prop: 'callOutYqMerchantName' },
{ label: '调出门店', prop: 'callOutMerchantName' },
{ label: '调入仓库', prop: 'callInYqMerchantName' },
{ label: '调入门店', prop: 'callInMerchantName' },
{ label: '备注', prop: 'remark', isRemark: true }
],
}
},
filters: {
formatCar(list) {
// console.log(list, 'list')
let str = list.map(item => {
return `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`
}).join(',')
return str.length > 15 ? str.substring(0, 15) + '...' : str
}
},
mounted() {
// 初始化发货数量输入数据列表
this.nowPurNumList = this.tableList?.map(() => '')
},
methods: {
handleShipmentClose(isRefresh = false) {
this.$emit("shipmentClose", isRefresh)
},
deliveryNumberInput(event, index) {
this.$set(
this.dialogData,
"deliveryNumber",
event.replace(/[^a-zA-Z0-9]/g, "")
)
},
handleInput(val, scope) {
const _row = scope.scope
const _index = scope.index
const _oldVal = this.oldPurNumList[_index] || 0
const _maxVal = _row.allocateNumber - _row.deliveryNumber
this.nowPurNumList[_index] =
limitPrice(val, _oldVal, 9999, 0, 0, _maxVal) || (val ? _maxVal : "")
this.oldPurNumList = JSON.parse(JSON.stringify(this.nowPurNumList))
},
submit() {
this.isSubmit = true
this.$refs["delivery-dialog-form"].validate((valid) => {
if (valid) {
// 验证本次发货数量
if (this.nowPurNumList.some((item) => !item || item <= 0)) {
this.notice.errorTips("发货数量必须全部填写且不能为0")
return true
}
var params = {
...this.dialogData,
deliveryDate: Util.dateFormate(
this.dialogData.deliveryDate,
"YYYY-MM-DD HH:mm:ss"
),
orderCode: this.paramsObj.allocateCode,
deliveryDetailList: []
}
for (let idx = 0; idx < this.tableList.length; idx++) {
const item = this.tableList[idx]
if (this.nowPurNumList[idx] && this.nowPurNumList[idx] != 0) {
params.deliveryDetailList.push({
id: item.detailId,
purchaseNumber: this.nowPurNumList[idx],
})
}
}
batchDelicery(params)
.then((res) => {
this.handleShipmentClose(true)
this.notice.okTips()
})
.catch(() => {
this.handleShipmentClose(false)
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.car-type-list {
max-height: 300px;
overflow-y: scroll;
}
.return {
width: 15px;
height: 14px;
margin-right: 2px;
vertical-align: middle;
}
.addressTitle {
display: flex;
align-items: center;
.title {
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 16px;
color: #333333;
margin-right: 20px;
}
.icon {
width: 28px;
height: 28px;
margin-right: 8px;
}
}
.address-info {
display: flex;
box-sizing: border-box;
flex-wrap: wrap;
width: 100%;
padding: 0 20px;
margin-top: 10px;
font-size: 14px;
color: #666666;
.info-item {
width: 33.33%;
display: flex;
align-items: center;
margin-bottom: 10px;
padding-right: 15px;
box-sizing: border-box;
.label-name {
white-space: nowrap;
min-width: fit-content;
}
.label-value {
flex: 1;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
}
&.remark-item {
flex-grow: 1;
width: 33.33%;
}
}
}
.form-content {
margin-top: 16px;
.dis-in-block {
width: 432px;
}
}
.footer {
display: flex;
justify-content: flex-end;
}
.edit-order-dialog .el-input--medium.border-red .el-input__inner {
border: 1px solid #eb4e4e;
}
.flex-option {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}
.add-option {
padding: 0 20px;
display: flex;
flex-flow: column;
align-items: flex-start;
}
.add-option-input {
width: 285px !important;
display: inline-block;
}
.add-option-input .el-input__inner {
border: none;
padding: 0;
}
.option_icon {
font-size: 14px;
cursor: pointer;
}
.del_icon {
margin-left: 15px;
color: #eb4e4e;
}
.add_icon {
color: #3fcf77;
}
</style>
<!-- 调拨发货 -->
<template>
<d2-container class="container">
<div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :form-data="showFormData">
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary" handle>
查询
</el-button>
<el-button size="small" @click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<span>
<!-- 导出暂时不做 -->
<!-- <span style="margin-right: 10px">
<auth-button category="Button" :show-btn-ids="['9081101']" />
</span> -->
<auth-button category="Button" :show-btn-ids="['9081102']" />
</span>
</d2-table-header>
<d2-table ref="transferShipmentTable" :search-form="tableSearchForm" :table-params="tableParams" :table-data="tableData" :selectable-fn="selectableFn" @selectionTable="handleSelectionChange" :get-list-api="getListApi" :before-search-fn="beforeSearchFn">
<template slot="receiver" slot-scope="scope">
<div v-if="scope.scope.receiver">
<el-popover v-if="scope.scope.receiver.length > 12" placement="top" effect="dark" width="300" trigger="hover">
<div class="merchant-name-box">
{{ spanFilter(scope.scope.receiver) }}
</div>
<div slot="reference">
{{ spanFilter(scope.scope.receiver, 12) }}
</div>
</el-popover>
<div v-else>{{ scope.scope.receiver }}</div>
</div>
<span v-else>-</span>
</template>
<template slot="address" slot-scope="scope">
<div v-if="scope.scope.address">
<el-popover v-if="scope.scope.address.length > 12" placement="top" effect="dark" width="300" trigger="hover">
<div class="merchant-name-box">
{{ spanFilter(scope.scope.address) }}
</div>
<div slot="reference">
{{ spanFilter(scope.scope.address, 12) }}
</div>
</el-popover>
<div v-else>{{ scope.scope.address }}</div>
</div>
<span v-else>-</span>
</template>
<div slot="auth-button" slot-scope="scope">
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9081103']" />
</span>
<span style="margin-right: 10px" v-if="scope.scope.deliveryStatus != 2">
<auth-button :data="scope.scope" :show-btn-ids="['9081104']" />
</span>
<auth-button v-if="scope.scope.billStatus != 7 && scope.scope.deliveryStatus == 1" :data="scope.scope" :show-btn-ids="['9081105']" />
</div>
</d2-table>
</div>
<shipment-dialog :visible.sync="shipmentVisible"
:tableList="shipmentTableList" :params-obj="shipmentDialogData"
v-if="shipmentVisible"
@shipmentClose="shipmentDialogClose"></shipment-dialog>
<reject-dialog v-if="rejectVisible" :visible.sync="rejectVisible" :rejectData="rejectData" @rejectClose="handleRejectClose"></reject-dialog>
<transferDetailDialog :visible.sync="transferDetailVisible"
v-if="transferDetailVisible"
:params-obj="transferObj"></transferDetailDialog>
</d2-container>
</template>
<script>
import { getTransferShipmentList, deliveryReject, batchDelicery, getGoodsWarehousingList, deliveryBatchCheck } from '@api/stockManage'
import { Util, deepClone } from '@/common/util'
import shipmentDialog from './components/shipmentDialog.vue'
import { mapState, mapActions } from 'vuex'
import RejectDialog from "./components/rejectDialog.vue"
import transferDetailDialog from '../components/transferDetailDialog.vue'
import { baseConfig } from "@/main"
export default {
name: 'TransferShipment',
components: {
shipmentDialog,
RejectDialog,
transferDetailDialog
},
data() {
return {
searchForm: {
allocateCode: '',
callInName: '',
deliveryStatus: '',
goodsName: '',
productCode: '',
callOutName: ''
},
tableSearchForm: {},
tableData: [],
showFormData: [
{
label: '调拨单号',
name: 'allocateCode',
type: 'input',
isClear: true
},
{
label: '调入方',
name: 'callInName',
type: 'input',
isClear: true
},
{
label: '发货状态',
name: 'deliveryStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'deliveryStatusOptions'
},
{
label: '商品名称',
name: 'goodsName',
type: 'input',
isClear: true
},
{
label: '商品编码',
name: 'productCode',
type: 'input',
isClear: true
},
{
label: '调出方',
name: 'callOutName',
type: 'input',
isClear: true
}
],
getListApi: getTransferShipmentList,
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
mutiSelectUniqueKey: "id",
mutiSelectName: "list",
tableOption: {
width: "140"
},
tableColumns: [
{
label: '调拨单号',
prop: 'allocateCode',
width: 150
},
{
label: '商品名称',
prop: 'goodsName'
},
{
label: '商品编码',
prop: 'productCode'
},
{
label: '规格',
prop: 'specificationData'
},
{
label: '系列',
prop: 'sourceMaterialName'
},
{
label: '所属分类',
prop: 'goodsTypeName'
},
{
label: '调拨数量',
prop: 'allocateNumber',
formatter: (cellValue) => {
const qty = cellValue.allocateNumber ?? '-'
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}`
}
},
{
label: '调拨人',
prop: 'createdBy'
},
{
label: '调入门店',
prop: 'callInMerchantName'
},
{
label: '调入仓库',
prop: 'callInYqMerchantName'
},
{
label: '调出门店',
prop: 'callOutMerchantName'
},
{
label: '调出仓库',
prop: 'callOutYqMerchantName'
},
{
label: '收货人',
prop: 'receiver',
width: 120,
addHtml: 'receiver'
},
{
label: '收货人电话',
prop: 'phone',
width: 130
},
{
label: '收货地址',
prop: 'address',
width: 120,
addHtml: 'address'
},
{
label: '发货状态',
prop: 'deliveryStatus',
formatter: (cellValue) => {
return this.baseData.deliveryStatusOptions.find(item => item.confId === `${cellValue.deliveryStatus}`)?.confLabel || '-'
},
className: (cellValue) => {
return {
1: 'ashSpot',
2: 'greenSpot',
3: 'yellowSpot'
}[cellValue.deliveryStatus]
}
},
{
label: '订单状态',
prop: 'billStatus',
formatter: (cellValue) => {
return this.baseData.billStatusOptions.find(item => item.confId == cellValue.billStatus)?.confLabel || '-'
},
className: (cellValue) => {
return {
5: 'greenSpot',
7: 'redSpot'
}[cellValue.billStatus]
}
}
]
},
// 查看
transferDetailVisible: false,
// 驳回
rejectVisible: false,
// 发货
shipmentVisible: false,
// 基本数据
baseData: {
deliveryStatusOptions: [{
confId: '1',
confLabel: '未发货'
}, {
confId: '3',
confLabel: '部分发货'
}, {
confId: '2',
confLabel: '全部发货'
}],
billStatusOptions: [{
confId: '5',
confLabel: '已审核'
}, {
confId: '7',
confLabel: '已驳回'
}]
},
paramsObj: {},
selectedList: [],
shipmentTableList: [],
shipmentDialogData: {},
rejectData: {}
}
},
watch: {
rejectVisible(val) {
if (!val) {
this.rejectData = {}
this.$nextTick(() => {
this.auditDetaiList = []
this.$refs['delivery-dialog-form'] && this.$refs['delivery-dialog-form'].clearValidate()
})
}
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
this.getBaseData()
},
methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']),
getBaseData() {
const allOpt = {
confId: '',
confLabel: '全部'
}
this.showFormData.forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName]) {
this.baseData[item.optionsName].unshift(allOpt)
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
spanFilter(ele, lenght) {
if (ele) {
const text = `${ele}`
return lenght
? text?.length > lenght
? text.substring(0, lenght) + "\u2026"
: text.substring(0, lenght)
: text
} else {
return "-"
}
},
selectableFn(row, index) {
if (this.selectedList.length) {
return this.selectedList?.some(val => val.allocateCode == row.allocateCode) && (row.deliveryStatus == 1 || row.deliveryStatus == 3)
} else {
return row.deliveryStatus == 1 || row.deliveryStatus == 3
}
},
handleSelectionChange(selection) {
this.selectedList = selection
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
resolve()
})
},
getParams() {
var params = deepClone(this.searchForm)
return params
},
handleReset() {
for (const key in this.searchForm) {
this.searchForm[key] = ''
}
this.$refs.transferShipmentTable.refreshTable(true)
},
handleExport() {
var params = this.tableSearchForm
// params.method = 'dj.api.smarcarlife.purchaseOrder.export.async'
params.method = 'dj.api.life.operatorreview.exportExcel.async'
const list = [
...this.dowloadList,
{
name: '调拨发货',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
batchShipment() {
if (!this.selectedList.length) { // 未选择
this.notice.errorTips('请选择要发货的订单')
return
}
const target = this.selectedList[0]
this.shipmentTableList = deepClone(this.selectedList)
this.shipmentDialogData.callOutYqMerchantName = target.callOutYqMerchantName
this.shipmentDialogData.callOutMerchantName = target.callOutMerchantName
this.shipmentDialogData.callInYqMerchantName = target.callInYqMerchantName
this.shipmentDialogData.callInMerchantName = target.callInMerchantName
this.shipmentDialogData.remark = target.remark
this.shipmentDialogData.allocateCode = target.allocateCode
this.shipmentVisible = true
},
shipmentDialogClose(obj) {
this.shipmentVisible = false
if (obj) this.$refs.transferShipmentTable.refreshTable(true)
},
// 查看详情
handleDetail(row) {
this.transferObj = {
allocateCode: row.allocateCode,
merchantName: row.merchantName,
purchaseType: row.purchaseType
}
this.transferDetailVisible = true
},
// 发货
handleShipment(row) {
this.shipmentTableList = [row]
this.shipmentDialogData.callOutYqMerchantName = row.callOutYqMerchantName
this.shipmentDialogData.callOutMerchantName = row.callOutMerchantName
this.shipmentDialogData.callInYqMerchantName = row.callInYqMerchantName
this.shipmentDialogData.callInMerchantName = row.callInMerchantName
this.shipmentDialogData.remark = row.remark
this.shipmentDialogData.allocateCode = row.allocateCode
this.shipmentVisible = true
},
// 驳回
handleReject(row) {
this.rejectData = {
allocateCode: row.allocateCode
}
this.rejectVisible = true
},
handleRejectClose(obj) {
this.rejectVisible = false
if (obj) this.$refs.transferShipmentTable.refreshTable(true)
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-table__header-wrapper .has-gutter .el-checkbox{
display: none;
}
</style>
<!-- 交付单管理 --> <!-- 交付单管理 -->
<template> <template>
<d2-container class="evaluation-wrap"> <d2-container class="evaluation-wrap">
<div class="header" slot="header"> <template #header>
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'120px'" <div class="header">
:search-select-obj="searchSelectObj" :form-data="showFormData"> <d2-search ref="showSearch"
<div class="input" slot="sourceNoInput"> class="show-search"
<el-input clear v-model="searchForm.sourceNo" placeholder="请输入来源单号" clearable :maxlength="20" :form-data="showFormData"
@input="filterSourceNo" @compositionstart="isComposing = true" label-width="120px"
@compositionend="handleCompositionEnd"></el-input> :search-form="searchForm"
</div> :search-select-obj="searchSelectObj">
</d2-search> <template #sourceNoInput>
<div class="up-btns"> <div class="input">
<el-button size="small" type="primary" @click="handleSearch"> <el-input v-model="searchForm.sourceNo"
查询 clear
</el-button> clearable
<el-button size="small" @click="handleReset"> 重置 </el-button> :maxlength="20"
</div> placeholder="请输入来源单号"
</div> @compositionend="handleCompositionEnd"
<div class="d2-container-content"> @compositionstart="isComposing = true"
<d2-table-header> @input="filterSourceNo">
<auth-button category="Button" :show-btn-ids="['9200503']" </el-input>
data-event-code="deliveryOrderManagement_management_list_export" /> </div>
</d2-table-header> </template>
<d2-table ref="table" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" </d2-search>
:before-search-fn="beforeSearchFn"> <div class="up-btns">
<!-- <div slot="coverImage" slot-scope="scope" class="coverImage-preview"> <el-button size="small"
type="primary"
@click="handleSearch">
查询
</el-button>
<el-button size="small" @click="handleReset">
重置
</el-button>
</div>
</div>
</template>
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button"
data-event-code="deliveryOrderManagement_management_list_export"
:show-btn-ids="['9200503']" />
</d2-table-header>
<d2-table ref="table"
:before-search-fn="beforeSearchFn"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams">
<!-- <div slot="coverImage" slot-scope="scope" class="coverImage-preview">
<glsx-preview v-if="scope.scope.coverImage" :image-url-arr="scope.scope.coverImage ? [scope.scope.coverImage] : [] <glsx-preview v-if="scope.scope.coverImage" :image-url-arr="scope.scope.coverImage ? [scope.scope.coverImage] : []
" :picOptions="picOptions" limit="1"></glsx-preview> " :picOptions="picOptions" limit="1"></glsx-preview>
<span v-else>-</span> <span v-else>-</span>
</div> --> </div> -->
<!-- 交付状态 --> <!-- 交付状态 -->
<div slot="orderStatusHtml" slot-scope="scope"> <template #orderStatusHtml="scope">
<div class="online-status"> <div>
<span class="dot" :style="{ <div class="online-status">
background: ((baseData.orderStatusMap || []).find( <span class="dot"
(item) => String(item.confId) === String(scope.scope.orderStatus) :style="{
) || {}).color || '' background: ((baseData.orderStatusMap || []).find(
}"></span> (item) => String(item.confId) === String(scope.scope.orderStatus),
{{ ) || {}).color || '',
((baseData.orderStatusMap || []).find( }">
(item) => String(item.confId) === String(scope.scope.orderStatus) </span>
) || {}).confValue || '--' {{
}} ((baseData.orderStatusMap || []).find(
</div> (item) => String(item.confId) === String(scope.scope.orderStatus),
</div> ) || {}).confValue || '--'
<!-- 付款状态 --> }}
<div slot="tailPayStatusHtml" slot-scope="scope"> </div>
<div class="online-status"> </div>
<span class="dot" :style="{ </template>
background: ((baseData.tailPayStatusMap || []).find( <!-- 付款状态 -->
(item) => String(item.confId) === String(scope.scope.paymentStatus) <template #tailPayStatusHtml="scope">
) || {}).color || '' <div>
}"></span> <div class="online-status">
{{ <span class="dot"
((baseData.tailPayStatusMap || []).find( :style="{
(item) => String(item.confId) === String(scope.scope.paymentStatus) background: ((baseData.tailPayStatusMap || []).find(
) || {}).confValue || '--' (item) => String(item.confId) === String(scope.scope.paymentStatus),
}} ) || {}).color || '',
</div> }">
</div> </span>
<div slot="auth-button" slot-scope="scope"> {{
<!-- 详情 --> ((baseData.tailPayStatusMap || []).find(
<span style="margin-right: 10px"> (item) => String(item.confId) === String(scope.scope.paymentStatus),
<auth-button :data="scope.scope" :show-btn-ids="['9200504']" /> ) || {}).confValue || '--'
</span> }}
</div>
</div>
</template>
<template #auth-button="scope">
<div>
<!-- 详情 -->
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9200504']" />
</span>
</div>
</template>
</d2-table>
</div> </div>
</d2-table> </d2-container>
</div>
</d2-container>
</template> </template>
<script> <script>
import { mapActions, mapState } from "vuex" import { mapActions, mapState } from "vuex";
import preview from "../components/preview" import { getDeliveryOrderPageList, getEvalOrderList } from "@/api/usedCarManagement.js";
import { getEvalOrderList, getDeliveryOrderPageList } from "@/api/usedCarManagement.js"
import { import {
usageTypeOpt, buyNewCarOpt,
ownerTypeOpt, deliveryTypeMap,
vehicleCategoryOpt, evaluationStatusOpt,
buyNewCarOpt, evaluationStatusOptMap,
hasAccidentOpt, hasAccidentOpt,
evaluationStatusOpt, orderStatusMap,
evaluationStatusOptMap, ownerTypeOpt,
orderStatusMap, tailPayStatusMap,
tailPayStatusMap, usageTypeOpt,
deliveryTypeMap vehicleCategoryOpt,
} from "@/common/constants.js" } from "@/common/constants.js";
import { Util, deepClone } from "@/common/util" import { deepClone, Util } from "@/common/util";
import reportTrackPageMixin from "@/mixins/reportTrackPageMixin" import reportTrackPageMixin from "@/mixins/reportTrackPageMixin";
import preview from "../components/preview";
export default { export default {
mixins: [reportTrackPageMixin], components: {
components: { GlsxPreview: preview,
glsxPreview: preview },
}, mixins: [reportTrackPageMixin],
data() { data() {
return { return {
// //
getListApi: getDeliveryOrderPageList, getListApi: getDeliveryOrderPageList,
picOptions: { picOptions: {
width: "138px", width: "138px",
height: "54px", height: "54px",
isClose: false isClose: false,
}, },
tableParams: { tableParams: {
listName: "records", listName: "records",
mutiSelectUniqueKey: "id", mutiSelectUniqueKey: "id",
mutiSelectName: "mutiSelectIndex", mutiSelectName: "mutiSelectIndex",
tableOption: { tableOption: {
width: "170" width: "170",
}, },
tableColumns: [ tableColumns: [
{ {
label: "交付单编号", label: "交付单编号",
prop: "deliveryOrderId", prop: "deliveryOrderId",
width: "180px" width: "180px",
}, },
{ {
label: "车牌号", label: "车牌号",
prop: "licensePlate", prop: "licensePlate",
width: "100px" width: "100px",
// width: "240px" // width: "240px"
}, },
{ {
label: "车架号", label: "车架号",
prop: "vin", prop: "vin",
width: "200px" width: "200px",
// width: "350px" // width: "350px"
}, },
{ {
label: "车源号", label: "车源号",
prop: "sourceNo", prop: "sourceNo",
width: "100px" width: "100px",
// width: "290px" // width: "290px"
}, },
{ {
label: "车型", label: "车型",
prop: "vehicleTitle", prop: "vehicleTitle",
minWidth: 250 minWidth: 250,
}, },
{ {
label: "交付专员姓名", label: "交付专员姓名",
prop: "handlerName", prop: "handlerName",
width: "110px" width: "110px",
}, },
{ {
label: "交付专员电话", label: "交付专员电话",
prop: "handlerPhone", prop: "handlerPhone",
minWidth: 120 minWidth: 120,
}, },
{ {
label: "买家姓名", label: "买家姓名",
prop: "buyerName" prop: "buyerName",
}, },
{ {
label: "买家联系方式", label: "买家联系方式",
prop: "buyerContact", prop: "buyerContact",
minWidth: 120 minWidth: 120,
}, },
{ {
label: "车辆保管人姓名", label: "车辆保管人姓名",
prop: "custodianName", prop: "custodianName",
width: "120px" width: "120px",
}, },
{ {
label: "车辆保管人联系方式", label: "车辆保管人联系方式",
prop: "custodianPhone", prop: "custodianPhone",
width: "150px" width: "150px",
}, },
{ {
label: "交付单创建时间", label: "交付单创建时间",
prop: "createdDate", prop: "createdDate",
width: "160px" width: "160px",
}, },
{ {
label: "交付单最后更新时间", label: "交付单最后更新时间",
prop: "updatedDate", prop: "updatedDate",
width: "160px" width: "160px",
}, },
{ {
label: "成交时间", label: "成交时间",
prop: "transactionTime", prop: "transactionTime",
width: "160px" width: "160px",
}, },
{ {
label: "预约提车时间", label: "预约提车时间",
prop: "scheduledTime", prop: "scheduledTime",
width: "160px" width: "160px",
}, },
{ {
label: "实际交付时间", label: "实际交付时间",
prop: "actualTime", prop: "actualTime",
width: "160px" width: "160px",
}, },
{ {
label: "交付状态", label: "交付状态",
prop: "orderStatus", prop: "orderStatus",
minWidth: 120, minWidth: 120,
addHtml: "orderStatusHtml" addHtml: "orderStatusHtml",
}, },
{ {
label: "付款状态", label: "付款状态",
prop: "paymentStatus", prop: "paymentStatus",
minWidth: 120, minWidth: 120,
addHtml: "tailPayStatusHtml" addHtml: "tailPayStatusHtml",
}, },
{ {
label: "交付方式", label: "交付方式",
prop: "deliveryType", prop: "deliveryType",
formatter: (row) => { formatter: (row) => {
// 0-客户自提 1-安排送车 加空判断 // 0-客户自提 1-安排送车 加空判断
return row.deliveryType == 0 ? "客户自提" : row.deliveryType == 1 ? "安排送车" : "-" return row.deliveryType == 0 ? "客户自提" : row.deliveryType == 1 ? "安排送车" : "-";
} },
}, },
{ {
label: "拍卖场次", label: "拍卖场次",
prop: "auctionId", prop: "auctionId",
width: "160px" width: "160px",
} },
] ],
}, },
searchFormSearch: {}, searchFormSearch: {},
searchForm: { searchForm: {
licensePlate: "", licensePlate: "",
vin: "", vin: "",
sourceNo: "", sourceNo: "",
vehicleTitle: "", vehicleTitle: "",
deliveryOrderId: "", deliveryOrderId: "",
orderStatus: "", orderStatus: "",
paymentStatus: "", paymentStatus: "",
deliveryType: "", deliveryType: "",
auctionId: "", auctionId: "",
handlerName: "", handlerName: "",
buyerName: "", buyerName: "",
custodianName: "", custodianName: "",
handlerPhone: "", handlerPhone: "",
buyerPhone: "", buyerPhone: "",
custodianPhone: "", custodianPhone: "",
createdDate: "", createdDate: "",
updatedDate: "", updatedDate: "",
transactionTime: "", transactionTime: "",
scheduledTime: "", scheduledTime: "",
actualTime: "", actualTime: "",
}, },
searchSelectObj: { searchSelectObj: {
orderName: { orderName: {
attr: 'handlerName', attr: "handlerName",
value: '' value: "",
}, },
orderPhone: { orderPhone: {
attr: 'handlerPhone', attr: "handlerPhone",
value: '' value: "",
}, },
divisionOrPayDate: { divisionOrPayDate: {
attr: 'createdDate', attr: "createdDate",
value: '' value: "",
} },
}, },
showFormData: [ showFormData: [
{ {
label: "车牌号", label: "车牌号",
name: "licensePlate", name: "licensePlate",
type: "input", type: "input",
isClear: true, isClear: true,
maxlength: 20 maxlength: 20,
}, },
{ {
label: "车架号", label: "车架号",
name: "vin", name: "vin",
type: "input", type: "input",
isClear: true, isClear: true,
maxlength: 20 maxlength: 20,
}, },
{ {
label: "车源号", label: "车源号",
name: "sourceNo", name: "sourceNo",
// type: "input", // type: "input",
// isClear: true, // isClear: true,
// maxlength: 20, // maxlength: 20,
addHtml: 'sourceNoInput' addHtml: "sourceNoInput",
}, },
{ {
label: "车型", label: "车型",
name: "vehicleTitle", name: "vehicleTitle",
type: "input", type: "input",
isClear: true, isClear: true,
maxlength: 50 maxlength: 50,
}, },
{ {
type: "selectInput", type: "selectInput",
selectName: "orderName", selectName: "orderName",
isClear: true, isClear: true,
selectWidth: "140px", selectWidth: "140px",
selectOption: [ selectOption: [
{ {
label: "交付专员姓名", label: "交付专员姓名",
name: "handlerName" name: "handlerName",
}, },
{ {
label: "买家姓名", label: "买家姓名",
name: "buyerName" name: "buyerName",
}, },
{ {
label: "车辆保管人姓名", label: "车辆保管人姓名",
name: "custodianName" name: "custodianName",
} },
], ],
handleSelectChange: (value) => { handleSelectChange: (value) => {
console.log(value, 'value') console.log(value, "value");
this.searchSelectObj.orderName.value = "" this.searchSelectObj.orderName.value = "";
} },
}, },
{ {
type: "selectInput", type: "selectInput",
selectName: "orderPhone", selectName: "orderPhone",
isClear: true, isClear: true,
selectWidth: "140px", selectWidth: "140px",
selectOption: [ selectOption: [
{ {
label: "交付专员电话", label: "交付专员电话",
name: "handlerPhone" name: "handlerPhone",
}, },
{ {
label: "买家联系方式", label: "买家联系方式",
name: "buyerContact" name: "buyerContact",
}, },
{ {
label: "车辆保管人联系方式", label: "车辆保管人联系方式",
name: "custodianPhone" name: "custodianPhone",
} },
], ],
handleSelectChange: (value) => { handleSelectChange: (value) => {
this.searchSelectObj.orderPhone.value = "" this.searchSelectObj.orderPhone.value = "";
} },
}, },
{ {
type: 'selectDatePicker', type: "selectDatePicker",
selectName: 'divisionOrPayDate', selectName: "divisionOrPayDate",
isClear: true, isClear: true,
itemStyle: "width: 94%;", itemStyle: "width: 94%;",
selectWidth: "165px", selectWidth: "165px",
// pickerOptions: 'rangePickerOptions', // pickerOptions: 'rangePickerOptions',
selectOption: [{ selectOption: [{
label: '交付单创建时间', label: "交付单创建时间",
name: 'createdDate' name: "createdDate",
}, { }, {
label: '交付单最后更新时间', label: "交付单最后更新时间",
name: 'updatedDate' name: "updatedDate",
}, }, {
{ label: "成交时间",
label: '成交时间', name: "transactionTime",
name: 'transactionTime' }, {
}, label: "预约提车时间",
{ name: "scheduledTime",
label: '预约提车时间', }, {
name: 'scheduledTime' label: "实际交付时间",
}, name: "actualTime",
{ }],
label: '实际交付时间', handleSelectChange: (value) => {
name: 'actualTime' this.searchSelectObj.divisionOrPayDate.value = "";
} },
], },
handleSelectChange: (value) => { {
this.searchSelectObj.divisionOrPayDate.value = '' label: "交付单编号",
} name: "deliveryOrderId",
}, type: "input",
{ isClear: true,
label: "交付单编号", maxlength: 20,
name: "deliveryOrderId", },
type: "input", {
isClear: true, label: "交付单状态",
maxlength: 20 name: "orderStatus",
}, type: "select",
{ isClear: true,
label: "交付单状态", optionList: [],
name: "orderStatus", optionId: "confId",
type: "select", optionLabel: "confValue",
isClear: true, optionsName: "orderStatusMap",
optionList: [], },
optionId: "confId", {
optionLabel: "confValue", label: "付款状态",
optionsName: "orderStatusMap" name: "paymentStatus",
}, type: "select",
{ isClear: true,
label: "付款状态", optionList: [],
name: "paymentStatus", optionId: "confId",
type: "select", optionLabel: "confValue",
isClear: true, optionsName: "tailPayStatusMap",
optionList: [], },
optionId: "confId", {
optionLabel: "confValue", label: "交付方式",
optionsName: "tailPayStatusMap" name: "deliveryType",
}, type: "select",
{ isClear: true,
label: "交付方式", optionList: [],
name: "deliveryType", optionId: "confId",
type: "select", optionLabel: "confValue",
isClear: true, optionsName: "deliveryTypeMap",
optionList: [], },
optionId: "confId", {
optionLabel: "confValue", label: "拍卖场次",
optionsName: "deliveryTypeMap" name: "auctionId",
}, type: "input",
{ isClear: true,
label: "拍卖场次", maxlength: 20,
name: "auctionId", },
type: "input", ],
isClear: true, baseData: {
maxlength: 20 usageTypeOpt: deepClone(usageTypeOpt),
} ownerTypeOpt: deepClone(ownerTypeOpt),
], vehicleCategoryOpt: deepClone(vehicleCategoryOpt),
baseData: { buyNewCarOpt: deepClone(buyNewCarOpt),
usageTypeOpt: deepClone(usageTypeOpt), hasAccidentOpt: deepClone(hasAccidentOpt),
ownerTypeOpt: deepClone(ownerTypeOpt), evaluationStatusOpt: deepClone(evaluationStatusOpt),
vehicleCategoryOpt: deepClone(vehicleCategoryOpt), evaluationStatusOptMap: deepClone(evaluationStatusOptMap),
buyNewCarOpt: deepClone(buyNewCarOpt), orderStatusMap: deepClone(orderStatusMap),
hasAccidentOpt: deepClone(hasAccidentOpt), tailPayStatusMap: deepClone(tailPayStatusMap),
evaluationStatusOpt: deepClone(evaluationStatusOpt), deliveryTypeMap: deepClone(deliveryTypeMap),
evaluationStatusOptMap: deepClone(evaluationStatusOptMap), },
orderStatusMap: deepClone(orderStatusMap), track_event_code: "delivery_order_management",
tailPayStatusMap: deepClone(tailPayStatusMap), };
deliveryTypeMap: deepClone(deliveryTypeMap) },
}, mounted() {
track_event_code: "delivery_order_management" this.onPageShow();
} this.getOptionsList();
}, },
mounted() { computed: {
this.onPageShow() ...mapState({
this.getOptionsList() dowloadList: state => state.d2admin.user.dowloadList,
}, }),
computed: { },
...mapState({ methods: {
dowloadList: (state) => state.d2admin.user.dowloadList // 只允许英文字母/数字/ASCII 可见特殊字符(过滤中文及非 ASCII)
}) filterSourceNo(val) {
}, if (this.isComposing)
methods: { return;
// 只允许英文字母/数字/ASCII 可见特殊字符(过滤中文及非 ASCII) const sanitized = (val || "").replace(/[^\x20-\x7E]/g, "");
filterSourceNo(val) { const limited = sanitized.slice(0, 20);
if (this.isComposing) return if (val !== limited) {
const sanitized = (val || "").replace(/[^\x20-\x7E]/g, "") this.searchForm.sourceNo = limited;
const limited = sanitized.slice(0, 20) }
if (val !== limited) { },
this.searchForm.sourceNo = limited // 处理中文输入法组合输入结束后统一过滤
} handleCompositionEnd() {
}, this.isComposing = false;
// 处理中文输入法组合输入结束后统一过滤 const val = this.searchForm.sourceNo || "";
handleCompositionEnd() { const limited = val.replace(/[^\x20-\x7E]/g, "").slice(0, 20);
this.isComposing = false if (val !== limited) {
const val = this.searchForm.sourceNo || "" this.$nextTick(() => {
const limited = val.replace(/[^\x20-\x7E]/g, "").slice(0, 20) this.searchForm.sourceNo = limited;
if (val !== limited) { });
this.$nextTick(() => { }
this.searchForm.sourceNo = limited },
}) getStatusItem(baseData, optKey, row, rowKey) {
} if (!baseData || !baseData[optKey] || !row)
}, return null;
getStatusItem(baseData, optKey, row, rowKey) {
if (!baseData || !baseData[optKey] || !row) return null
return baseData[optKey].find( return baseData[optKey].find(
(item) => item.confId == row[rowKey] // 使用严格相等 item => item.confId == row[rowKey], // 使用严格相等
) );
}, },
...mapActions("d2admin/user", ["actionSetDownloadList"]), ...mapActions("d2admin/user", ["actionSetDownloadList"]),
filterIds() { filterIds() {
let ids = [] let ids = [];
if (this.$refs.table.mutiSelectArr.mutiSelectIndex) { if (this.$refs.table.mutiSelectArr.mutiSelectIndex) {
this.$refs.table.mutiSelectArr.mutiSelectIndex.forEach((item) => { this.$refs.table.mutiSelectArr.mutiSelectIndex.forEach((item) => {
ids.push(item.id) ids.push(item.id);
}) });
} }
return ids return ids;
}, },
//导出 // 导出
handleExport() { handleExport() {
var params = this.getParams().t let params = this.getParams();
params.currentPage = 1 params.currentPage = 1;
params.server_provider_type = "gsc" params.server_provider_type = "gsc";
params.server_provider_name = "gsc-vcp-web-facade" params.server_provider_name = "gsc-vcp-web-facade";
if (this.filterIds().length) { if (this.filterIds().length) {
params.idsStr = this.filterIds().join(",") params.idsStr = this.filterIds().join(",");
} }
params.method = "/deliveryOrderManage/exportDeliveryOrderAsync" params.method = "/deliveryOrderManage/exportDeliveryOrderAsync";
const list = [ const list = [
...this.dowloadList, ...this.dowloadList,
{ {
name: "交付单管理", name: "交付单管理",
exportParam: JSON.stringify(params), exportParam: JSON.stringify(params),
status: "waiting", status: "waiting",
timeid: new Date().getTime() timeid: new Date().getTime(),
// uuid: JSON.parse(res).data, // uuid: JSON.parse(res).data,
// ifSuccess: false // ifSuccess: false
} },
] ];
this.actionSetDownloadList({ list, type: "dowloadList" }) this.actionSetDownloadList({ list, type: "dowloadList" });
}, },
//图片下载 // 图片下载
handleDownLoad(row) { handleDownLoad(row) {
var params = { let params = {
evalOrderNo: row.evalOrderNo evalOrderNo: row.evalOrderNo,
} };
params.server_provider_type = "gsc" params.server_provider_type = "gsc";
params.server_provider_name = "gsc-vcp-web-facade" params.server_provider_name = "gsc-vcp-web-facade";
params.method = "/evalOrderManage/exportEvalOrderImageZipAsync" params.method = "/evalOrderManage/exportEvalOrderImageZipAsync";
const list = [ const list = [
...this.dowloadList, ...this.dowloadList,
{ {
name: "评估单车辆图片", name: "评估单车辆图片",
exportParam: JSON.stringify(params), exportParam: JSON.stringify(params),
status: "waiting", status: "waiting",
timeid: new Date().getTime() timeid: new Date().getTime(),
// uuid: JSON.parse(res).data, // uuid: JSON.parse(res).data,
// ifSuccess: false // ifSuccess: false
} },
] ];
this.actionSetDownloadList({ list, type: "dowloadList" }) this.actionSetDownloadList({ list, type: "dowloadList" });
}, },
//车辆评估 // 车辆评估
handleAssess(data) { handleAssess(data) {
console.log("row", data) console.log("row", data);
this.$router.push({ this.$router.push({
path: "/evaluate", path: "/evaluate",
query: { query: {
evalOrderNo: data.evalOrderNo evalOrderNo: data.evalOrderNo,
} },
}) });
}, },
// 详情 // 详情
handleDetail(data) { handleDetail(data) {
console.log("row", data) console.log("row", data);
this.$router.push({ this.$router.push({
path: "/deliveryOrderManagementDetail", path: "/deliveryOrderManagementDetail",
query: { query: {
id: data.id, id: data.id,
deliveryOrderId: data.deliveryOrderId, deliveryOrderId: data.deliveryOrderId,
} },
}) });
}, },
getSelectInputParams() { getSelectInputParams() {
const list = Object.keys(this.searchSelectObj) const list = Object.keys(this.searchSelectObj);
var params = {} let params = {};
list.forEach(i => { list.forEach((i) => {
const item = this.searchSelectObj[i] const item = this.searchSelectObj[i];
item.value && (params[item.attr] = item.value) item.value && (params[item.attr] = item.value);
}) });
return params return params;
}, },
getParams() { getParams() {
let params = deepClone(this.searchForm) let params = deepClone(this.searchForm);
const tempParams = this.getSelectInputParams() const tempParams = this.getSelectInputParams();
// console.log(tempParams) // console.log(tempParams)
params = { params = {
...params, ...params,
...tempParams ...tempParams,
} };
// 上牌时间 // 上牌时间
if (params?.createdDate?.length) { if (params?.createdDate?.length) {
let [start, end] = let [start, end]
params.createdDate = params.createdDate;
params.createdStartDate = Util.dateFormate( params.createdStartDate = Util.dateFormate(
start, start,
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD HH:mm:ss",
) );
params.createdEndDate = Util.dateFormate( params.createdEndDate = Util.dateFormate(
end, end,
"YYYY-MM-DD" "YYYY-MM-DD",
) + " 23:59:59" ) + " 23:59:59";
delete params.createdDate delete params.createdDate;
} }
// 更新时间 // 更新时间
if (params?.updatedDate?.length) { if (params?.updatedDate?.length) {
let [start, end] = let [start, end]
params.updatedDate = params.updatedDate;
params.updatedStartDate = Util.dateFormate( params.updatedStartDate = Util.dateFormate(
start, start,
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD HH:mm:ss",
) );
params.updatedEndDate = Util.dateFormate( params.updatedEndDate = Util.dateFormate(
end, end,
"YYYY-MM-DD" "YYYY-MM-DD",
) + " 23:59:59" ) + " 23:59:59";
delete params.updatedDate delete params.updatedDate;
} }
// 交易时间 // 交易时间
if (params?.transactionTime?.length) { if (params?.transactionTime?.length) {
let [start, end] = let [start, end]
params.transactionTime = params.transactionTime;
params.transactionStartTime = Util.dateFormate( params.transactionStartTime = Util.dateFormate(
start, start,
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD HH:mm:ss",
) );
params.transactionEndTime = Util.dateFormate( params.transactionEndTime = Util.dateFormate(
end, end,
"YYYY-MM-DD" "YYYY-MM-DD",
) + " 23:59:59" ) + " 23:59:59";
delete params.transactionTime delete params.transactionTime;
} }
// scheduledTime // scheduledTime
if (params?.scheduledTime?.length) { if (params?.scheduledTime?.length) {
let [start, end] = let [start, end]
params.scheduledTime = params.scheduledTime;
params.scheduledStartTime = Util.dateFormate( params.scheduledStartTime = Util.dateFormate(
start, start,
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD HH:mm:ss",
) );
params.scheduledEndTime = Util.dateFormate( params.scheduledEndTime = Util.dateFormate(
end, end,
"YYYY-MM-DD" "YYYY-MM-DD",
) + " 23:59:59" ) + " 23:59:59";
delete params.scheduledTime delete params.scheduledTime;
} }
// actualTime // actualTime
if (params?.actualTime?.length) { if (params?.actualTime?.length) {
let [start, end] = let [start, end]
params.actualTime = params.actualTime;
params.actualStartTime = Util.dateFormate( params.actualStartTime = Util.dateFormate(
start, start,
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD HH:mm:ss",
) );
params.actualEndTime = Util.dateFormate( params.actualEndTime = Util.dateFormate(
end, end,
"YYYY-MM-DD" "YYYY-MM-DD",
) + " 23:59:59" ) + " 23:59:59";
delete params.actualTime delete params.actualTime;
} }
return { return {
t: params t: params,
} };
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.searchFormSearch = this.getParams() this.searchFormSearch = this.getParams();
resolve() resolve();
}) });
}, },
handleSearch() { handleSearch() {
this.page = this.$options.data.call(this).page this.page = this.$options.data.call(this).page;
this.$refs.table.refreshTable(true, true) this.$refs.table.refreshTable(true, true);
}, },
handleReset() { handleReset() {
this.searchForm = this.$options.data.call(this).searchForm this.searchForm = this.$options.data.call(this).searchForm;
this.searchSelectObj = this.$options.data.call(this).searchSelectObj this.searchSelectObj = this.$options.data.call(this).searchSelectObj;
this.handleSearch() this.handleSearch();
}, },
async exportTable() { async exportTable() {
let selectedData = [] let selectedData = [];
console.log(this.$refs.table.mutiSelectArr.mutiSelectIndex) console.log(this.$refs.table.mutiSelectArr.mutiSelectIndex);
}, },
getOptionsList() { getOptionsList() {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === "select") { if (item.type === "select") {
if ( if (
this.baseData[item.optionsName].length && this.baseData[item.optionsName].length
this.baseData[item.optionsName][0][ && this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel this.showFormData[index].optionLabel
] !== "全部" ] !== "全部"
) { ) {
// if (item.optionsName != "brandList") { // if (item.optionsName != "brandList") {
const temp = {} const temp = {};
temp[this.showFormData[index].optionId] = "" temp[this.showFormData[index].optionId] = "";
temp[this.showFormData[index].optionLabel] = "全部" temp[this.showFormData[index].optionLabel] = "全部";
this.baseData[item.optionsName].unshift(temp) this.baseData[item.optionsName].unshift(temp);
// } // }
} }
this.$set( this.$set(
this.showFormData[index], this.showFormData[index],
"optionList", "optionList",
this.baseData[item.optionsName] this.baseData[item.optionsName],
) );
} }
}) });
} },
} },
} };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.coverImage-preview { .coverImage-preview {
width: 138px; width: 138px;
height: 54px; height: 54px;
::v-deep .photo-activity { ::v-deep .photo-activity {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: contain; object-fit: contain;
position: static !important; position: static !important;
} }
} }
.online-status { .online-status {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.dot { .dot {
display: inline-block; display: inline-block;
width: 8px; width: 8px;
height: 8px; height: 8px;
border-radius: 50%; border-radius: 50%;
margin-right: 8px; margin-right: 8px;
} }
} }
</style> </style>
...@@ -513,11 +513,13 @@ export default { ...@@ -513,11 +513,13 @@ export default {
getFileTypeFromUrl(url) { getFileTypeFromUrl(url) {
if (!url) return "file" if (!url) return "file"
const pathname = url.split("?")[0]
const extension = url.split(".").pop().toLowerCase() const extension = pathname.split(".").pop()?.toLowerCase() || ""
const imageExtensions = ["jpg", "jpeg", "png", "gif", "bmp", "webp"] const imageExtensions = ["jpg", "jpeg", "png", "gif", "bmp", "webp"]
if (imageExtensions.includes(extension)) return "image"
return imageExtensions.includes(extension) ? "image" : "file" // 阿里云 OSS 图片处理:x-oss-process=image/format,jpg 表示图片
if (/x-oss-process=image\/format,\w+/.test(url)) return "image"
return "file"
}, },
getFileNameFromUrlForDisplay(url) { getFileNameFromUrlForDisplay(url) {
if (!url) return "未知文件" if (!url) return "未知文件"
...@@ -552,9 +554,10 @@ export default { ...@@ -552,9 +554,10 @@ export default {
}, },
processFileLinks(fileString) { processFileLinks(fileString) {
if (!fileString) return [] if (!fileString) return []
// 兼容数组;字符串时按"逗号+http"分割,避免 OSS query 中逗号误分割
// 分割逗号分隔的文件链接 const links = Array.isArray(fileString)
const links = fileString.split(",").filter((link) => link.trim()) ? fileString
: fileString.split(/,\s*(?=https?:\/\/)/).map((s) => s.trim()).filter(Boolean)
console.log(links, "links") console.log(links, "links")
// 根据文件类型返回相应的对象数组 // 根据文件类型返回相应的对象数组
return links.map((link) => { return links.map((link) => {
......
...@@ -622,10 +622,10 @@ export default { ...@@ -622,10 +622,10 @@ export default {
if (this.getFileType(item.value) == "image") { if (this.getFileType(item.value) == "image") {
item.otherType = "image" item.otherType = "image"
item.value = item.value.split(",") item.value = this.splitUrls(item.value)
} else if (this.getFileType(item.value) == "video") { } else if (this.getFileType(item.value) == "video") {
item.otherType = "video" item.otherType = "video"
item.value = item.value.split(",") item.value = this.splitUrls(item.value)
} }
// item.value = item.value.split(",") // item.value = item.value.split(",")
// } // }
...@@ -634,6 +634,11 @@ export default { ...@@ -634,6 +634,11 @@ export default {
console.log(this.detailInfo, "this.detailInfo") console.log(this.detailInfo, "this.detailInfo")
}) })
}, },
// 按“逗号+http”分割 URL 字符串,避免 OSS query 中逗号(如 quality,q_100) 误分割
splitUrls(str) {
if (!str || typeof str !== "string") return []
return str.split(/,\s*(?=https?:\/\/)/).map((s) => s.trim()).filter(Boolean)
},
getFileType(url) { getFileType(url) {
// 图片扩展名 // 图片扩展名
const imageExtensions = [ const imageExtensions = [
...@@ -648,13 +653,16 @@ export default { ...@@ -648,13 +653,16 @@ export default {
// 视频扩展名 // 视频扩展名
const videoExtensions = ["mp4", "avi", "mov", "wmv", "flv", "webm", "mkv"] const videoExtensions = ["mp4", "avi", "mov", "wmv", "flv", "webm", "mkv"]
// 提取文件扩展名 // 提取文件扩展名(先去掉 query,支持 OSS 带参数链接)
const extension = url.split(".").pop().toLowerCase().split("?")[0] const pathname = url.split("?")[0]
const extension = pathname.split(".").pop()?.toLowerCase() || ""
if (imageExtensions.includes(extension)) { if (imageExtensions.includes(extension)) {
return "image" return "image"
} else if (videoExtensions.includes(extension)) { } else if (videoExtensions.includes(extension)) {
return "video" return "video"
} else if (/x-oss-process=image\/format,\w+/.test(url)) {
return "image"
} else { } else {
return "unknown" return "unknown"
} }
......
...@@ -729,13 +729,16 @@ export default { ...@@ -729,13 +729,16 @@ export default {
// 视频扩展名 // 视频扩展名
const videoExtensions = ["mp4", "avi", "mov", "wmv", "flv", "webm", "mkv"] const videoExtensions = ["mp4", "avi", "mov", "wmv", "flv", "webm", "mkv"]
// 提取文件扩展名 // 提取文件扩展名(先去掉 query,支持 OSS 带参数链接)
const extension = url.split(".").pop().toLowerCase().split("?")[0] const pathname = url.split("?")[0]
const extension = pathname.split(".").pop()?.toLowerCase() || ""
if (imageExtensions.includes(extension)) { if (imageExtensions.includes(extension)) {
return "image" return "image"
} else if (videoExtensions.includes(extension)) { } else if (videoExtensions.includes(extension)) {
return "video" return "video"
} else if (/x-oss-process=image\/format,\w+/.test(url)) {
return "image"
} else { } else {
return "unknown" return "unknown"
} }
......
...@@ -216,9 +216,12 @@ export default { ...@@ -216,9 +216,12 @@ export default {
}, },
getFileTypeFromUrl (url) { getFileTypeFromUrl (url) {
if (!url) return 'file' if (!url) return 'file'
const extension = url.split('.').pop().toLowerCase() const pathname = url.split('?')[0]
const extension = pathname.split('.').pop()?.toLowerCase() || ''
const imageExtensions = ['jpg', 'jpeg', 'png', 'bmp', 'webp'] const imageExtensions = ['jpg', 'jpeg', 'png', 'bmp', 'webp']
return imageExtensions.includes(extension) ? 'image' : 'file' if (imageExtensions.includes(extension)) return 'image'
if (/x-oss-process=image\/format,\w+/.test(url)) return 'image'
return 'file'
}, },
closeImgViewer () { closeImgViewer () {
this.imgViewerVisible = false this.imgViewerVisible = false
......
...@@ -216,10 +216,12 @@ export default { ...@@ -216,10 +216,12 @@ export default {
}, },
getFileTypeFromUrl (url) { getFileTypeFromUrl (url) {
if (!url) return 'file' if (!url) return 'file'
const extension = url.split('.').pop().toLowerCase() const pathname = url.split('?')[0]
const extension = pathname.split('.').pop()?.toLowerCase() || ''
const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp'] const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']
if (imageExtensions.includes(extension)) return 'image'
return imageExtensions.includes(extension) ? 'image' : 'file' if (/x-oss-process=image\/format,\w+/.test(url)) return 'image'
return 'file'
}, },
closeImgViewer () { closeImgViewer () {
this.imgViewerVisible = false this.imgViewerVisible = false
......
...@@ -792,21 +792,20 @@ export default { ...@@ -792,21 +792,20 @@ export default {
data.carImages = [] data.carImages = []
data.carImagesList = [] data.carImagesList = []
} }
// 处理 documents 字段 // 处理 documents 字段(支持 documentUrls 数组或 documents JSON)
if (data.documents) { if (data.documentUrls && Array.isArray(data.documentUrls)) {
// if (typeof data.documents === 'string') { data.documentsList = this.processFileLinks(data.documentUrls)
// data.documentsList = this.processFileLinks(data.documents) } else if (data.documents) {
// } else { data.documents = typeof data.documents === 'string' ? JSON.parse(data.documents) : data.documents
data.documents = JSON.parse(data.documents) const arr = Array.isArray(data.documents) ? data.documents : []
data.documentsList = data.documents.map(item => { data.documentsList = arr.map(item => {
const url = typeof item === 'string' ? item : item?.fileUrl
return { return {
fileUrl: item.fileUrl, fileUrl: url,
fileType: this.getFileTypeFromUrl(item.fileUrl), fileType: this.getFileTypeFromUrl(url),
fileName: item.fileName fileName: typeof item === 'object' && item?.fileName ? item.fileName : this.getFileNameFromUrlForDisplay(url)
} }
}) })
console.log('data.documentsList', data.documentsList)
// }
} else { } else {
data.documents = [] data.documents = []
data.documentsList = [] data.documentsList = []
...@@ -953,9 +952,10 @@ export default { ...@@ -953,9 +952,10 @@ export default {
processFileLinks(fileString) { processFileLinks(fileString) {
if (!fileString) return [] if (!fileString) return []
// 兼容数组;字符串时按"逗号+http"分割,避免 OSS query 中逗号(如 quality,q_100) 误分割
// 分割逗号分隔的文件链接 const links = Array.isArray(fileString)
const links = fileString.split(',').filter(link => link.trim()) ? fileString
: fileString.split(/,\s*(?=https?:\/\/)/).map(s => s.trim()).filter(Boolean)
console.log(links, 'links') console.log(links, 'links')
// 根据文件类型返回相应的对象数组 // 根据文件类型返回相应的对象数组
return links.map(link => { return links.map(link => {
...@@ -992,11 +992,12 @@ export default { ...@@ -992,11 +992,12 @@ export default {
}, },
getFileTypeFromUrl(url) { getFileTypeFromUrl(url) {
if (!url) return 'file' if (!url) return 'file'
const pathname = url.split('?')[0]
const extension = url.split('.').pop().toLowerCase() const extension = pathname.split('.').pop()?.toLowerCase() || ''
const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp'] const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']
if (imageExtensions.includes(extension)) return 'image'
return imageExtensions.includes(extension) ? 'image' : 'file' if (/x-oss-process=image\/format,\w+/.test(url)) return 'image'
return 'file'
}, },
isImageType(file) { isImageType(file) {
return file && file.fileType === 'image' return file && file.fileType === 'image'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!