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 @@
"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": {
"version": "27.0.0",
"resolved": "https://registry.npmmirror.com/@vue/vue2-jest/-/vue2-jest-27.0.0.tgz",
......
......@@ -86,3 +86,12 @@ export function onlinestatementAccountPage(data) {
data.method = "dj.api.smartcarlife.onlineStatementAccount.page"
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
......@@ -11,6 +11,12 @@ export function getyqMerchantList(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) {
data.method = `${path2}servicemerchantref.list`
......@@ -65,6 +71,48 @@ export function stockAllocatePage(data) {
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) {
data.method = `${path3}stock.allocate.detail.page`
......@@ -107,6 +155,12 @@ export function merchantShopGoodsStockPage(data) {
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) {
data.method = `dj.smartcarlife.stock.vdCard.page`
......@@ -166,3 +220,57 @@ export function stockRefundUpdateStatus(data) {
data.method = "dj.smartcarlife.api.stock.refund.updateStatus"
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>
<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-content" flex="dir:top">
<!-- 顶栏 -->
<div class="d2-theme-header" :style="{
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">
<div
class="d2-theme-header"
:style="{
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-else src="../../assets/all.png" />
<!-- <img style="width: 32px; height: 32px;" src="../../assets/icon-only.png"> -->
......@@ -35,24 +48,47 @@
<d2-header-user />
</div>
</div>
<div class="d2-theme-header" style="height: 40px; font-size: 14px; border-top: 1px solid #f0f2f5" flex-box="0"
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" />
<div
class="d2-theme-header"
style="height: 40px; font-size: 14px; border-top: 1px solid #f0f2f5"
flex-box="0"
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>
</div>
<!-- 下面 主体 -->
<div class="d2-theme-container" flex-box="1" flex>
<!-- 主体 侧边栏 -->
<div flex-box="0" ref="aside" class="d2-theme-container-aside" :style="{
width: asideCollapse ? asideWidthCollapse : asideWidth,
opacity: this.searchActive ? 0.5 : 1
}">
<div
flex-box="0"
ref="aside"
class="d2-theme-container-aside"
:style="{
width: asideCollapse ? asideWidthCollapse : asideWidth,
opacity: this.searchActive ? 0.5 : 1
}"
>
<d2-menu-side />
</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">
<div v-if="searchActive" class="d2-theme-container-main-layer" flex>
......@@ -61,14 +97,21 @@
</transition>
<!-- 内容 -->
<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 -->
<div class="d2-theme-container-main-header" flex-box="0">
<!-- <d2-tabs/> -->
</div>
<!-- 页面 -->
<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">
<router-view />
</keep-alive>
......@@ -163,8 +206,8 @@ export default {
return {
...(this.themeActiveSetting.backgroundImage
? {
backgroundImage: `url('${this.$baseUrl}${this.themeActiveSetting.backgroundImage}')`
}
backgroundImage: `url('${this.$baseUrl}${this.themeActiveSetting.backgroundImage}')`
}
: {})
}
}
......@@ -173,8 +216,12 @@ export default {
...mapActions("d2admin/menu", ["asideCollapseToggle"]),
...mapActions("d2admin/user", ["load"]),
findTitle(val) {
this.headerTitle = val?.title
? val.title + (this.headerTitle ? " / " : "") + this.headerTitle
let title = val?.title
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) {
return this.findTitle(
......
......@@ -312,5 +312,276 @@ export const routerName = {
activePath: "/returnManage"
},
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>
<d2-container class="container">
<div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :form-data="showFormData"
labelWidth="130px">
<div
class="header"
slot="header"
>
<d2-search
ref="showSearch"
class="show-search"
:search-select-obj="searchSelectObj"
:search-form="searchForm"
:form-data="showFormData"
labelWidth="130px"
>
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary">
<el-button
:id="tableParams.btnId"
size="small"
type="primary"
>
查询
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
<el-button
size="small"
@click="handleReset"
> 重置 </el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<div class="btns flex">
<span data-event-code="ysprepaymentManage_Export">
<auth-button category="Button" :show-btn-ids="['9051701']" />
<auth-button
category="Button"
:show-btn-ids="['9051701']"
/>
</span>
</div>
</d2-table-header>
<d2-table ref="usedCarFundWarningManageTable" :search-form="searchFormSearch" :table-params="tableParams"
:get-list-api="getListApi" :before-search-fn="beforeSearchFn">
<d2-table
ref="usedCarFundWarningManageTable"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
show-summary
:summary-method="getSummaries"
>
</d2-table>
</div>
<ManageReceiptDialog v-if="manageReceiptDialogVisible"
:manageReceiptDialogVisible.sync="manageReceiptDialogVisible" />
<TrafficFeeDialog v-if="trafficFeeDialogVisible" :trafficFeeDialogVisible.sync="trafficFeeDialogVisible" />
<PaymentDialog v-if="paymentDialogVisible" :paymentDialogVisible.sync="paymentDialogVisible" />
<ManageReceiptDialog
v-if="manageReceiptDialogVisible"
:manageReceiptDialogVisible.sync="manageReceiptDialogVisible"
/>
<TrafficFeeDialog
v-if="trafficFeeDialogVisible"
:trafficFeeDialogVisible.sync="trafficFeeDialogVisible"
/>
<PaymentDialog
v-if="paymentDialogVisible"
:paymentDialogVisible.sync="paymentDialogVisible"
/>
</d2-container>
</template>
<script>
import { deepClone } from "@/common/util"
import { onlinestatementAccountPage } from "@api/prepaymentManage"
import { onlinestatementAccountPage, onlineStatementAccountCountTotal } from "@api/prepaymentManage"
import { mapActions, mapState } from "vuex"
import dayjs from "dayjs"
import reportTrackPageMixin from "@/mixins/reportTrackPageMixin"
......@@ -52,7 +86,7 @@ export default {
// TrafficFeeDialog,
// PaymentDialog
},
data() {
data () {
return {
// rangePickerOptions: {
// disabledDate(date) {
......@@ -64,22 +98,41 @@ export default {
// },
searchForm: {
merchantName: '',
tradeTime: [new Date(), new Date()],
// tradeTime: [new Date(), new Date()],
monthrange: '',
yqMerchantName: ''
},
// searchSelectObj: {
// divisionOrPayDate: {
// attr: 'daterange',
// value: [dayjs(), dayjs()]
// }
// },
searchSelectObj: {
divisionOrPayDate: {
attr: 'monthrange',
value: [dayjs().subtract(1, 'month'), dayjs().subtract(1, 'month')]
}
},
showFormData: [
{
label: '时间范围',
name: 'tradeTime',
type: 'datePicker',
type: 'selectDatePicker',
selectName: 'divisionOrPayDate',
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: "园区店名称",
......@@ -175,21 +228,22 @@ export default {
manageReceiptDialogVisible: false,
paymentDialogVisible: false,
trafficFeeDialogVisible: false,
detailInfo: {}
detailInfo: {},
summaries:{}
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
}),
},
provide() {
provide () {
return {
userInfo: this.$store.state.d2admin.user.info
}
},
created() {
created () {
// 设置获得当天日期
// this.searchForm.daterange = [
// dayjs().format("YYYY-MM-DD"),
......@@ -197,7 +251,7 @@ export default {
// ]
// this.searchSelectObj.divisionOrPayDate.value = [dayjs(), dayjs()]
},
mounted() {
mounted () {
},
......@@ -207,38 +261,39 @@ export default {
close: "d2admin/page/close"
}),
...mapActions("d2admin/user", ["actionSetDownloadList"]),
handleManageReceipt() {
handleManageReceipt () {
this.manageReceiptDialogVisible = true
},
handleManagePayment() {
handleManagePayment () {
this.paymentDialogVisible = true
},
handleTrafficFee() {
handleTrafficFee () {
this.trafficFeeDialogVisible = true
},
handleReset() {
handleReset () {
this.searchForm = this.$options.data.call(this).searchForm
this.searchSelectObj = this.$options.data.call(this).searchSelectObj
this.$refs.usedCarFundWarningManageTable.refreshTable(true, true)
},
beforeSearchFn() {
console.log(this.searchForm)
beforeSearchFn () {
return new Promise((resolve, reject) => {
// // 判断是否有日期,没有提示用户选择日期
// if (!this.searchSelectObj.divisionOrPayDate.value) {
// this.$message({
// message: '请选择日期',
// type: 'warning'
// })
// return reject(new Error('请选择日期'))
// } else {
this.searchFormSearch = this.getParams()
console.log(this.searchFormSearch)
resolve()
// }
if (!this.searchSelectObj.divisionOrPayDate.value) {
this.$message({
message: '请选择日期',
type: 'warning'
})
return reject(new Error('请选择日期'))
} else {
this.searchFormSearch = this.getParams()
console.log(this.searchFormSearch)
this.onlineStatementAccountCountTotal()
resolve()
}
})
},
getSelectInputParams() {
getSelectInputParams () {
const list = Object.keys(this.searchSelectObj)
var params = {}
list.forEach(i => {
......@@ -247,37 +302,34 @@ export default {
})
return params
},
getParams() {
getParams () {
let params = deepClone(this.searchForm)
// const tempParams = this.getSelectInputParams()
const tempParams = this.getSelectInputParams()
// console.log(tempParams)
params = {
...params,
// ...tempParams
...tempParams
}
console.log(params)
if (params.tradeTime) {
let [srart, end] = params.tradeTime
if (params.daterange) {
let [srart, end] = params.daterange
params.startTradeTime = dayjs(srart).format("YYYY-MM-DD")
params.endTradeTime = dayjs(end).format("YYYY-MM-DD")
// params.timeType = 1
}
delete params.tradeTime
// if (params.monthrange) {
// let [srart, end] = params.monthrange
// params.startTradeTime = dayjs(srart).format("YYYY-MM-DD 00:00:00")
// // 这个月的 最后一天
// params.endTradeTime = dayjs(end).endOf('month').format("YYYY-MM-DD 23:59:59")
// params.timeType = 2
// }
// delete params.monthrange
// console.log(JSON.parse(JSON.stringify(params)))
delete params.daterange
if (params.monthrange) {
let [srart, end] = params.monthrange
params.startTradeTime = dayjs(srart).startOf('month').format("YYYY-MM-DD")
// 这个月的 最后一天
params.endTradeTime = dayjs(end).endOf('month').format("YYYY-MM-DD")
}
delete params.monthrange
return params
},
handleAddUsedQuota() {
handleAddUsedQuota () {
this.authPhoneDialogVisible = true
},
handleDetail(row) {
handleDetail (row) {
// this.detailVisible = true
this.detailInfo = row
this.$router.push({
......@@ -289,7 +341,7 @@ export default {
}
})
},
handleExport() {
handleExport () {
const params = {
// 导出预付款管理记录列表(异步)
method: "dj.api.smartcarlife.onlineStatementAccount.page.export.async",
......@@ -311,21 +363,48 @@ export default {
]
this.actionSetDownloadList({ list, type: "dowloadList" })
},
getTableList() {
getTableList () {
// this.$refs.usedCarFundWarningManageTable.refreshTable(true, true)
},
loginSuccess() {
loginSuccess () {
this.authPhoneDialogVisible = false
this.usageLimitDialogVisible = true
},
addUsageLimitSuccess() {
addUsageLimitSuccess () {
this.usageLimitDialogVisible = false
this.$refs.usedCarFundWarningManageTable.refreshTable(true, true)
},
addZero(num) {
addZero (num) {
let numStr = parseFloat(num).toFixed(2)
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>
......
This diff could not be displayed because it is too large.
......@@ -11,14 +11,34 @@
label-width="150px"
:inline="true">
<el-form-item label="订单编号:" class="form-item-half">
{{ detailInfo.orderCode ? detailInfo.orderCode : "--" }}
<ellipsisText :content="detailInfo.orderCode"></ellipsisText>
</el-form-item>
<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 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.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>
</div>
<template v-if="detailInfo.oldOrderCode">
......@@ -131,13 +151,20 @@
</el-form>
</div>
</div>
<el-image-viewer v-if="imgVisible" :on-close="closeImgViewer" :url-list="imgList" :initial-index="initialIndex" />
</baseDialog>
</template>
<script>
import { djOrderTypeMap, discountTypeMap } from "@/common/constants"
import { getAuditOrderDetail, auditGoodsOrderApplyRecord } from "@api/order"
import ellipsisText from './ellipsisText'
export default {
name: "ApprovalDialog",
components: {
ellipsisText,
"el-image-viewer": () =>
import("element-ui/packages/image/src/image-viewer")
},
props: {
approvalVisible: {
type: Boolean,
......@@ -156,6 +183,13 @@ export default {
set(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() {
......@@ -171,7 +205,8 @@ export default {
},
formObj: {
remark: ''
}
},
imgVisible: false
}
},
created() {
......@@ -195,6 +230,15 @@ export default {
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) {
const result = []
......@@ -255,6 +299,13 @@ export default {
.form-item-half {
width: calc(50% - 10px) !important;
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 {
width: 585px;
......@@ -263,4 +314,16 @@ export default {
.split {
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>
\ 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
This diff could not be displayed because it is too large.
<!-- 审核 -->
<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="edit-page edit-tmpl">
<div class="title">商品信息</div>
<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">
<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>
</div>
</template>
<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] }}
</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">
<div class="film-roll-box">
<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 }}
</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>
<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>
<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">
<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
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>
<template slot="actionSlot" slot-scope="scope">
<el-button type="text" @click="handleInventoryDetail(scope.scope)"
>库存明细</el-button
>
</template>
</d2-table>
</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>
<div class="examine-record">
<div class="title">审核记录</div>
<div 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'" />
<div
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 ? "收起" : "展开" }}
</div>
<div>
<div class="record-div" v-if="auditDetaiList && auditDetaiList.length">
<div class="record-div-d" v-for="(item, index) in auditDetaiList" :key="index">
<div
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="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</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 class="span-txt-one">{{
item.status ? $$(statusForShow, [item.status], "text") : ""
}}</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 style="display: inline-block; margin: 0 8px;">至</span>
<span>{{ item.rejectedStatus ? $$(rejectedForShow, [item.rejectedStatus], 'rejectedStatus') : '' }}</span>
<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" popper-class="remark-popper-class" effect="dark" :content="item.reviewedBy" placement="bottom">
<span class="span-txt-two reviewer ellipsis"
>审核人:
<el-tooltip
class="item"
popper-class="remark-popper-class"
effect="dark"
:content="item.reviewedBy"
placement="bottom"
>
<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" popper-class="remark-popper-class" effect="dark" :content="item.remark" placement="bottom">
<span class="span-txt-two"
>审核时间:{{ item.reviewedDateFormat }}</span
>
<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">
{{ 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-tooltip>
</span>
<span 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
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">
{{ 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-tooltip>
</span>
</div>
</div>
<div class="emptyCom" v-else>
<img :src="emptyImgUrl" class="emptyImg" alt="">
<img :src="emptyImgUrl" class="emptyImg" alt="" />
<span class="tips">暂无数据</span>
</div>
</div>
</div>
</div>
<stockDetailDialog
:visible.sync="stockDetailDialogVisible"
v-if="stockDetailDialogVisible"
:record-info="stockDetailInfo"
/>
</baseDialog>
</template>
......@@ -111,11 +254,18 @@ import {
} from "@/api/purchaseShopping.js"
import { getShippingEntityInfoAll } from "@api/serviceManage"
import { deepClone, Util } from "@/common/util"
import { baseConfig } from '@/main'
import { baseConfig } from "@/main"
import stockDetailDialog from "@/views/stockManage/components/stockDetailDialog.vue"
export default {
name: "CheckDialog",
components: {
stockDetailDialog
},
data() {
return {
stockDetailDialogVisible: false,
stockDetailInfo: {},
userInfo: this.$store.state.d2admin.user.info,
txtObj: {
procurementReview: "说明:订单审核后自动流转至下一节点进行复审",
......@@ -162,85 +312,103 @@ export default {
},
isVisible: false,
examineStatusClass: {
2: 'greenSp',
4: 'redSp',
5: 'greenSp',
6: 'redSp',
7: 'redSp',
8: 'greenSp',
9: 'redSp'
2: "greenSp",
4: "redSp",
5: "greenSp",
6: "redSp",
7: "redSp",
8: "greenSp",
9: "redSp"
},
examineStatus: 1,
statusForShow: {
2: { text: '运营审核', status: '通过' },
4: { text: '运营审核', status: '驳回' },
5: { text: '商务审核', status: '通过' },
6: { text: '商务审核', status: '驳回' },
7: { text: '采购驳回', status: '驳回' },
8: { text: '总监审核', status: '通过' },
9: { text: '总监审核', status: '驳回' }
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: '商务审核' }
1: { rejectedStatus: "采购商户" },
2: { rejectedStatus: "运营审核" },
3: { rejectedStatus: "商务审核" }
},
baseConfig,
detailInfo: {
purchaseOrderRemark: ''
purchaseOrderRemark: ""
},
layout: 'total,sizes,prev,pager,next,jumper',
layout: "total,sizes,prev,pager,next,jumper",
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
listName: "list",
tableColumns: [
{
label: '商品名称',
addHtml: 'upgradeGoodsName',
prop: 'upgradeGoodsName'
label: "商品名称",
addHtml: "upgradeGoodsName",
prop: "upgradeGoodsName"
},
{
label: '商品编码',
prop: 'type'
label: "商品编码",
prop: "type"
},
{
label: '规格',
prop: 'specificationData'
label: "规格",
prop: "specificationData"
},
{
label: '采购数量',
prop: 'goodsNumber',
label: "采购数量",
prop: "goodsNumber",
formatter: (cellValue) => {
const condition = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.goodsNumber}卷` : `${cellValue.goodsNumber}件`
return this.paramsObj.purchaseType == 1 ? condition : `${cellValue.goodsNumber}件`
const condition = baseConfig.membraneTypeList.includes(
cellValue.goodsType
)
? `${cellValue.goodsNumber}卷`
: `${cellValue.goodsNumber}件`
return this.paramsObj.purchaseType == 1
? condition
: `${cellValue.goodsNumber}件`
}
},
{
label: '库存总量',
prop: 'goodsTypeName',
formatter: cellValue => {
const condition = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.conversionValue ? cellValue.goodsNumber * cellValue.conversionValue : '-'}米` : `${cellValue.goodsNumber}件`
return this.paramsObj.purchaseType == 1 ? condition : `${cellValue.goodsNumber}件`
label: "库存总量",
prop: "goodsTypeName",
formatter: (cellValue) => {
const condition = baseConfig.membraneTypeList.includes(
cellValue.goodsType
)
? `${
cellValue.conversionValue
? cellValue.goodsNumber * cellValue.conversionValue
: "-"
}米`
: `${cellValue.goodsNumber}件`
return this.paramsObj.purchaseType == 1
? condition
: `${cellValue.goodsNumber}件`
}
},
{
label: '已发货数量',
prop: 'purchaseNumber',
label: "已发货数量",
prop: "purchaseNumber",
width: 110,
formatter: cellValue => {
return baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber}卷` : `${cellValue.purchaseNumber}件`
formatter: (cellValue) => {
return baseConfig.membraneTypeList.includes(cellValue.goodsType)
? `${cellValue.purchaseNumber}卷`
: `${cellValue.purchaseNumber}件`
}
},
{
label: '单价',
prop: 'upgradePurchasePrice',
label: "单价",
prop: "upgradePurchasePrice",
formatter: (row) => {
return '¥' + row.upgradePurchasePrice
return "¥" + row.upgradePurchasePrice
}
},
{
label: '总价',
prop: 'goodsTotalPrice',
label: "总价",
prop: "goodsTotalPrice",
formatter: (cellValue) => {
return "¥" + cellValue.goodsTotalPrice
}
......@@ -265,7 +433,7 @@ export default {
},
paramsObj: {
type: Object,
default: {}
default: () => ({})
}
},
computed: {
......@@ -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) {
this.infoForm.sendOutMerchantId = deepClone(this.paramsObj?.sendOutMerchantId)
this.infoForm.sendOutMerchantId = deepClone(
this.paramsObj?.sendOutMerchantId
)
}
this.getDetail({ currentPage: 1, pageSize: 10 })
},
......@@ -317,7 +496,7 @@ export default {
hasAll &&
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this[formName][index].optionLabel
this[formName][index].optionLabel
] !== "全部"
) {
const temp = {}
......@@ -340,7 +519,7 @@ export default {
hasAll &&
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this[formName][index].optionLabel
this[formName][index].optionLabel
] !== "全部"
) {
const temp = {}
......@@ -353,25 +532,36 @@ export default {
}
},
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
},
refreshTable(pageObj) {
this.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.tableData = res.pagination.list
this.detailInfo.tableTotal = res.pagination.total
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
})
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.slice(0, 2))
})
......@@ -399,6 +589,13 @@ export default {
})
}
})
},
handleInventoryDetail(row) {
this.stockDetailInfo = {
upgradeGoodsId: row?.upgradeGoodsId
// yqMerchantId: this.detailInfo.callOutYqMerchantId
}
this.stockDetailDialogVisible = true
}
}
}
......
<!-- 驳回 -->
<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="edit-page edit-tmpl">
<div class="title">商品信息</div>
<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">
<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>
</div>
</template>
<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] }}
</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">
<div class="film-roll-box">
<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 }}
</div>
</div>
<div slot="reference">
<span style="color: #2A58AD;">(…{{ scope.scope.filmRollList.length }})</span>
<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>
<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">
<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
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>
<template slot="actionSlot" slot-scope="scope">
<el-button type="text" @click="handleInventoryDetail(scope.scope)"
>库存明细</el-button
>
</template>
</d2-table>
</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-select 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
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-form-item>
<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>
<div class="examine-record">
<div class="title">审核记录</div>
<div 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'" />
<div
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 ? "收起" : "展开" }}
</div>
<div>
<div class="record-div" v-if="auditDetaiList && auditDetaiList.length">
<div class="record-div-d" v-for="(item, index) in auditDetaiList" :key="index">
<div
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="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</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 class="span-txt-one">{{
item.status ? $$(statusForShow, [item.status], "text") : ""
}}</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 style="display: inline-block; margin: 0 8px;">至</span>
<span>{{ item.rejectedStatus ? $$(rejectedForShow, [item.rejectedStatus], 'rejectedStatus') : '' }}</span>
<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" popper-class="remark-popper-class" effect="dark" :content="item.reviewedBy" placement="bottom">
<span class="span-txt-two reviewer ellipsis"
>审核人:
<el-tooltip
class="item"
popper-class="remark-popper-class"
effect="dark"
:content="item.reviewedBy"
placement="bottom"
>
<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" popper-class="remark-popper-class" effect="dark" :content="item.remark" placement="bottom">
<span class="span-txt-two"
>审核时间:{{ item.reviewedDateFormat }}</span
>
<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">
{{ 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-tooltip>
</span>
<span 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
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">
{{ 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-tooltip>
</span>
</div>
</div>
<div class="emptyCom" v-else>
<img :src="emptyImgUrl" class="emptyImg" alt="">
<img :src="emptyImgUrl" class="emptyImg" alt="" />
<span class="tips">暂无数据</span>
</div>
</div>
</div>
</div>
<stockDetailDialog
:visible.sync="stockDetailDialogVisible"
v-if="stockDetailDialogVisible"
:record-info="stockDetailInfo"
/>
</baseDialog>
</template>
<script>
import { purchaseOrderReject, operatorreviewOperatorReject, businessreviewBusinessReject, operatorreviewView } from '@/api/purchaseShopping.js'
import { deepClone, Util } from '@/common/util'
import {
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 { baseConfig } from '@/main'
import { baseConfig } from "@/main"
export default {
name: 'RejectDialog',
name: "RejectDialog",
components: {
stockDetailDialog
},
data() {
return {
stockDetailDialogVisible: false,
userInfo: this.$store.state.d2admin.user.info,
infoForm: {
rejectNode: '',
rejectCause: ''
rejectNode: "",
rejectCause: ""
},
dialogConfig: {
title: '驳回',
width: '900px'
title: "驳回",
width: "900px"
},
formRules: {
rejectNode: [{ required: true, message: "请选择驳回节点", trigger: "change" }],
rejectCause: [{ required: true, message: '请输入驳回原因', trigger: 'change' }]
rejectNode: [
{ required: true, message: "请选择驳回节点", trigger: "change" }
],
rejectCause: [
{ required: true, message: "请输入驳回原因", trigger: "change" }
]
},
emptyImgUrl: require("@/assets/empty-5.png"),
auditDetaiList: [],
originalAuditDetaiList: [],
baseData: {
rejectNodeOptions: deepClone(rejectNodeOptions.filter(item => this.filterRejectList.includes(item.id)))
rejectNodeOptions: deepClone(
rejectNodeOptions.filter((item) =>
this.filterRejectList.includes(item.id)
)
)
},
isVisible: false,
examineStatusClass: {
2: 'greenSp',
4: 'redSp',
5: 'greenSp',
6: 'redSp',
7: 'redSp',
8: 'greenSp',
9: 'redSp'
2: "greenSp",
4: "redSp",
5: "greenSp",
6: "redSp",
7: "redSp",
8: "greenSp",
9: "redSp"
},
examineStatus: 1,
statusForShow: {
2: { text: '运营审核', status: '通过' },
4: { text: '运营审核', status: '驳回' },
5: { text: '商务审核', status: '通过' },
6: { text: '商务审核', status: '驳回' },
7: { text: '采购驳回', status: '驳回' },
8: { text: '总监审核', status: '通过' },
9: { text: '总监审核', status: '驳回' }
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: '商务审核' }
1: { rejectedStatus: "采购商户" },
2: { rejectedStatus: "运营审核" },
3: { rejectedStatus: "商务审核" }
},
baseConfig,
detailInfo: {
purchaseOrderRemark: ''
purchaseOrderRemark: ""
},
layout: 'total,sizes,prev,pager,next,jumper',
layout: "total,sizes,prev,pager,next,jumper",
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
listName: "list",
tableColumns: [
{
label: '商品名称',
addHtml: 'upgradeGoodsName',
prop: 'upgradeGoodsName'
label: "商品名称",
addHtml: "upgradeGoodsName",
prop: "upgradeGoodsName"
},
{
label: '商品编码',
prop: 'type'
label: "商品编码",
prop: "type"
},
{
label: '规格',
prop: 'specificationData'
label: "规格",
prop: "specificationData"
},
{
label: '采购数量',
prop: 'goodsNumber',
label: "采购数量",
prop: "goodsNumber",
formatter: (cellValue) => {
const condition = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.goodsNumber}卷` : `${cellValue.goodsNumber}件`
return this.paramsObj.purchaseType == 1 ? condition : `${cellValue.goodsNumber}件`
const condition = baseConfig.membraneTypeList.includes(
cellValue.goodsType
)
? `${cellValue.goodsNumber}卷`
: `${cellValue.goodsNumber}件`
return this.paramsObj.purchaseType == 1
? condition
: `${cellValue.goodsNumber}件`
}
},
{
label: '库存总量',
prop: 'goodsTypeName',
formatter: cellValue => {
const condition = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.conversionValue ? cellValue.goodsNumber * cellValue.conversionValue : '-'}米` : `${cellValue.goodsNumber}件`
return this.paramsObj.purchaseType == 1 ? condition : `${cellValue.goodsNumber}件`
label: "库存总量",
prop: "goodsTypeName",
formatter: (cellValue) => {
const condition = baseConfig.membraneTypeList.includes(
cellValue.goodsType
)
? `${
cellValue.conversionValue
? cellValue.goodsNumber * cellValue.conversionValue
: "-"
}米`
: `${cellValue.goodsNumber}件`
return this.paramsObj.purchaseType == 1
? condition
: `${cellValue.goodsNumber}件`
}
},
{
label: '已发货数量',
prop: 'purchaseNumber',
label: "已发货数量",
prop: "purchaseNumber",
width: 110,
formatter: cellValue => {
return baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber}卷` : `${cellValue.purchaseNumber}件`
formatter: (cellValue) => {
return baseConfig.membraneTypeList.includes(cellValue.goodsType)
? `${cellValue.purchaseNumber}卷`
: `${cellValue.purchaseNumber}件`
}
},
{
label: '单价',
prop: 'upgradePurchasePrice',
label: "单价",
prop: "upgradePurchasePrice",
formatter: (row) => {
return '¥' + row.upgradePurchasePrice
return "¥" + row.upgradePurchasePrice
}
},
{
label: '总价',
prop: 'goodsTotalPrice',
label: "总价",
prop: "goodsTotalPrice",
formatter: (cellValue) => {
return "¥" + cellValue.goodsTotalPrice
}
......@@ -232,6 +425,10 @@ export default {
},
props: {
fromPage: {
type: String,
default: "procurementReview"
},
rejectVisible: {
type: Boolean,
default: false
......@@ -255,44 +452,68 @@ export default {
return this.rejectVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'rejectVisible' })
this.$emit("dialogClose", { flag: newVal, attrName: "rejectVisible" })
// this.$emit('update:visible', newVal)
}
}
},
watch: {
},
watch: {},
created() {
if (this.fromPage == "procurementBusiness") {
this.tableParams.tableColumns.push({
label: "操作",
prop: "action",
width: "100px",
addHtml: "actionSlot"
})
}
},
components: {},
mounted() {
this.getDetail({ currentPage: 1, pageSize: 10 })
},
methods: {
handleInventoryDetail(row) {
this.stockDetailInfo = {
upgradeGoodsId: row?.upgradeGoodsId
// yqMerchantId: this.detailInfo.callOutYqMerchantId
}
this.stockDetailDialogVisible = true
},
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
},
refreshTable(pageObj) {
this.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.tableData = res.pagination.list
this.detailInfo.tableTotal = res.pagination.total
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
})
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.slice(0, 2))
})
......@@ -300,7 +521,7 @@ export default {
handleAddConfirm() {
// return
this.$refs.refundForm.validate(valid => {
this.$refs.refundForm.validate((valid) => {
if (valid) {
// console.log(valid)
// return
......@@ -309,11 +530,14 @@ export default {
params.rejectNode = infoForm.rejectNode
params.rejectCause = infoForm.rejectCause
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 => {
_api(params).then(res => {
this.notice.okTips('驳回成功')
_api(params).then((res) => {
this.notice.okTips("驳回成功")
// this.handleClose(true)
this.visible = true
})
......@@ -322,7 +546,7 @@ export default {
},
handleClose(flag) {
this.$emit('dialogClose', flag)
this.$emit("dialogClose", flag)
}
}
}
......
......@@ -38,7 +38,7 @@
<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>
<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>
</d2-container>
</template>
......
......@@ -46,6 +46,48 @@
:table-params="tableParams"
: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
slot="auth-button"
slot-scope="scope"
......@@ -55,12 +97,15 @@
</div>
</d2-container>
<!-- 查看 -->
<allocation-detail-dialog
<!-- <allocation-detail-dialog
:allocation-detail-visible="allocationDetailVisible"
:record-info="recordInfo"
v-if="allocationDetailVisible"
@dialogClose="dialogClose"
/>
/> -->
<transferDetailDialog :visible.sync="transferDetailVisible"
v-if="transferDetailVisible"
:params-obj="transferObj"></transferDetailDialog>
</div>
</template>
......@@ -75,10 +120,12 @@ import {
getServicemerchantrefList
} from "@api/stockManage"
import allocationDetailDialog from "./allocationDetailDialog"
import transferDetailDialog from '../components/transferDetailDialog.vue'
export default {
name: "AllocationList",
components: {
allocationDetailDialog
allocationDetailDialog,
transferDetailDialog
},
data () {
return {
......@@ -89,7 +136,9 @@ export default {
callOutYqMerchantId: "",
callInYqMerchantId: "",
callOutMerchantId: "",
callInMerchantId: ""
callInMerchantId: "",
billStatusList: "",
deliveryStatus: ""
},
searchFormSearch: {},
searchSelectObj: {
......@@ -164,6 +213,24 @@ export default {
optionId: "merchantId",
optionLabel: "merchantName",
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,
......@@ -178,6 +245,44 @@ export default {
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: "调拨时间",
prop: "allocateTime",
width: "150px",
......@@ -220,8 +325,41 @@ export default {
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: "备注",
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 {
productTypeList: [],
yqRelatedMerchantList: [],
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
}
},
......@@ -272,7 +439,18 @@ export default {
// async getBaseData() {
// 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 () {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
......@@ -288,6 +466,10 @@ export default {
) + " 23:59:59"
}
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()
})
},
......@@ -356,17 +538,26 @@ export default {
callOutYqMerchantId: "",
callInYqMerchantId: "",
callOutMerchantId: "",
callInMerchantId: ""
callInMerchantId: "",
billStatusList: "",
deliveryStatus: ""
}
this.baseData.outMerchantList = [] // 调出门店
this.baseData.inMerchantList = [] // 调入门店
this.getOptionsList()
this.$refs.recordTable.refreshTable()
this.$refs.recordTable.refreshTable(true)
},
async handleExport () {
await this.beforeSearchFn()
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"
const list = [
...this.dowloadList,
......@@ -382,17 +573,17 @@ export default {
// 查看
look (row) {
this.recordInfo = row
this.allocationDetailVisible = true
this.transferObj = row
this.transferDetailVisible = true
},
gotoAdd () {
this.$router.push({ name: "addAllocation" })
},
dialogClose (flag) {
this.allocationDetailVisible = !this.allocationDetailVisible
}
// dialogClose (flag) {
// this.allocationDetailVisible = !this.allocationDetailVisible
// }
}
}
</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
<!-- 发货单详情弹窗 -->
<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
<!-- 商务审核 -->
<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
<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>
<d2-container class="evaluation-wrap">
<div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'120px'"
:search-select-obj="searchSelectObj" :form-data="showFormData">
<div class="input" slot="sourceNoInput">
<el-input clear v-model="searchForm.sourceNo" placeholder="请输入来源单号" clearable :maxlength="20"
@input="filterSourceNo" @compositionstart="isComposing = true"
@compositionend="handleCompositionEnd"></el-input>
</div>
</d2-search>
<div class="up-btns">
<el-button size="small" type="primary" @click="handleSearch">
查询
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button" :show-btn-ids="['9200503']"
data-event-code="deliveryOrderManagement_management_list_export" />
</d2-table-header>
<d2-table ref="table" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
:before-search-fn="beforeSearchFn">
<!-- <div slot="coverImage" slot-scope="scope" class="coverImage-preview">
<d2-container class="evaluation-wrap">
<template #header>
<div class="header">
<d2-search ref="showSearch"
class="show-search"
:form-data="showFormData"
label-width="120px"
:search-form="searchForm"
:search-select-obj="searchSelectObj">
<template #sourceNoInput>
<div class="input">
<el-input v-model="searchForm.sourceNo"
clear
clearable
:maxlength="20"
placeholder="请输入来源单号"
@compositionend="handleCompositionEnd"
@compositionstart="isComposing = true"
@input="filterSourceNo">
</el-input>
</div>
</template>
</d2-search>
<div class="up-btns">
<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] : []
" :picOptions="picOptions" limit="1"></glsx-preview>
<span v-else>-</span>
</div> -->
<!-- 交付状态 -->
<div slot="orderStatusHtml" slot-scope="scope">
<div class="online-status">
<span class="dot" :style="{
background: ((baseData.orderStatusMap || []).find(
(item) => String(item.confId) === String(scope.scope.orderStatus)
) || {}).color || ''
}"></span>
{{
((baseData.orderStatusMap || []).find(
(item) => String(item.confId) === String(scope.scope.orderStatus)
) || {}).confValue || '--'
}}
</div>
</div>
<!-- 付款状态 -->
<div slot="tailPayStatusHtml" slot-scope="scope">
<div class="online-status">
<span class="dot" :style="{
background: ((baseData.tailPayStatusMap || []).find(
(item) => String(item.confId) === String(scope.scope.paymentStatus)
) || {}).color || ''
}"></span>
{{
((baseData.tailPayStatusMap || []).find(
(item) => String(item.confId) === String(scope.scope.paymentStatus)
) || {}).confValue || '--'
}}
</div>
</div>
<div slot="auth-button" slot-scope="scope">
<!-- 详情 -->
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9200504']" />
</span>
<!-- 交付状态 -->
<template #orderStatusHtml="scope">
<div>
<div class="online-status">
<span class="dot"
:style="{
background: ((baseData.orderStatusMap || []).find(
(item) => String(item.confId) === String(scope.scope.orderStatus),
) || {}).color || '',
}">
</span>
{{
((baseData.orderStatusMap || []).find(
(item) => String(item.confId) === String(scope.scope.orderStatus),
) || {}).confValue || '--'
}}
</div>
</div>
</template>
<!-- 付款状态 -->
<template #tailPayStatusHtml="scope">
<div>
<div class="online-status">
<span class="dot"
:style="{
background: ((baseData.tailPayStatusMap || []).find(
(item) => String(item.confId) === String(scope.scope.paymentStatus),
) || {}).color || '',
}">
</span>
{{
((baseData.tailPayStatusMap || []).find(
(item) => String(item.confId) === String(scope.scope.paymentStatus),
) || {}).confValue || '--'
}}
</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>
</d2-table>
</div>
</d2-container>
</d2-container>
</template>
<script>
import { mapActions, mapState } from "vuex"
import preview from "../components/preview"
import { getEvalOrderList, getDeliveryOrderPageList } from "@/api/usedCarManagement.js"
import { mapActions, mapState } from "vuex";
import { getDeliveryOrderPageList, getEvalOrderList } from "@/api/usedCarManagement.js";
import {
usageTypeOpt,
ownerTypeOpt,
vehicleCategoryOpt,
buyNewCarOpt,
hasAccidentOpt,
evaluationStatusOpt,
evaluationStatusOptMap,
orderStatusMap,
tailPayStatusMap,
deliveryTypeMap
} from "@/common/constants.js"
import { Util, deepClone } from "@/common/util"
import reportTrackPageMixin from "@/mixins/reportTrackPageMixin"
buyNewCarOpt,
deliveryTypeMap,
evaluationStatusOpt,
evaluationStatusOptMap,
hasAccidentOpt,
orderStatusMap,
ownerTypeOpt,
tailPayStatusMap,
usageTypeOpt,
vehicleCategoryOpt,
} from "@/common/constants.js";
import { deepClone, Util } from "@/common/util";
import reportTrackPageMixin from "@/mixins/reportTrackPageMixin";
import preview from "../components/preview";
export default {
mixins: [reportTrackPageMixin],
components: {
glsxPreview: preview
},
data() {
return {
//
getListApi: getDeliveryOrderPageList,
picOptions: {
width: "138px",
height: "54px",
isClose: false
},
tableParams: {
listName: "records",
mutiSelectUniqueKey: "id",
mutiSelectName: "mutiSelectIndex",
tableOption: {
width: "170"
},
tableColumns: [
{
label: "交付单编号",
prop: "deliveryOrderId",
width: "180px"
},
{
label: "车牌号",
prop: "licensePlate",
width: "100px"
// width: "240px"
},
{
label: "车架号",
prop: "vin",
width: "200px"
// width: "350px"
},
{
label: "车源号",
prop: "sourceNo",
width: "100px"
// width: "290px"
},
{
label: "车型",
prop: "vehicleTitle",
minWidth: 250
},
{
label: "交付专员姓名",
prop: "handlerName",
width: "110px"
},
components: {
GlsxPreview: preview,
},
mixins: [reportTrackPageMixin],
data() {
return {
//
getListApi: getDeliveryOrderPageList,
picOptions: {
width: "138px",
height: "54px",
isClose: false,
},
tableParams: {
listName: "records",
mutiSelectUniqueKey: "id",
mutiSelectName: "mutiSelectIndex",
tableOption: {
width: "170",
},
tableColumns: [
{
label: "交付单编号",
prop: "deliveryOrderId",
width: "180px",
},
{
label: "车牌号",
prop: "licensePlate",
width: "100px",
// width: "240px"
},
{
label: "车架号",
prop: "vin",
width: "200px",
// width: "350px"
},
{
label: "车源号",
prop: "sourceNo",
width: "100px",
// width: "290px"
},
{
label: "车型",
prop: "vehicleTitle",
minWidth: 250,
},
{
label: "交付专员姓名",
prop: "handlerName",
width: "110px",
},
{
label: "交付专员电话",
prop: "handlerPhone",
minWidth: 120
},
{
label: "买家姓名",
prop: "buyerName"
},
{
label: "买家联系方式",
prop: "buyerContact",
minWidth: 120
},
{
label: "车辆保管人姓名",
prop: "custodianName",
width: "120px"
{
label: "交付专员电话",
prop: "handlerPhone",
minWidth: 120,
},
{
label: "买家姓名",
prop: "buyerName",
},
{
label: "买家联系方式",
prop: "buyerContact",
minWidth: 120,
},
{
label: "车辆保管人姓名",
prop: "custodianName",
width: "120px",
},
{
label: "车辆保管人联系方式",
prop: "custodianPhone",
width: "150px"
},
{
label: "交付单创建时间",
prop: "createdDate",
width: "160px"
},
{
label: "交付单最后更新时间",
prop: "updatedDate",
width: "160px"
},
{
label: "成交时间",
prop: "transactionTime",
width: "160px"
},
{
label: "预约提车时间",
prop: "scheduledTime",
width: "160px"
},
{
label: "实际交付时间",
prop: "actualTime",
width: "160px"
},
{
label: "交付状态",
prop: "orderStatus",
minWidth: 120,
addHtml: "orderStatusHtml"
},
{
label: "付款状态",
prop: "paymentStatus",
minWidth: 120,
addHtml: "tailPayStatusHtml"
},
{
label: "交付方式",
prop: "deliveryType",
formatter: (row) => {
// 0-客户自提 1-安排送车 加空判断
return row.deliveryType == 0 ? "客户自提" : row.deliveryType == 1 ? "安排送车" : "-"
}
},
{
label: "拍卖场次",
prop: "auctionId",
width: "160px"
}
]
},
searchFormSearch: {},
searchForm: {
licensePlate: "",
vin: "",
sourceNo: "",
vehicleTitle: "",
deliveryOrderId: "",
orderStatus: "",
paymentStatus: "",
deliveryType: "",
auctionId: "",
handlerName: "",
buyerName: "",
custodianName: "",
handlerPhone: "",
buyerPhone: "",
custodianPhone: "",
createdDate: "",
updatedDate: "",
transactionTime: "",
scheduledTime: "",
actualTime: "",
},
searchSelectObj: {
orderName: {
attr: 'handlerName',
value: ''
},
orderPhone: {
attr: 'handlerPhone',
value: ''
},
divisionOrPayDate: {
attr: 'createdDate',
value: ''
}
},
showFormData: [
{
label: "车牌号",
name: "licensePlate",
type: "input",
isClear: true,
maxlength: 20
},
{
label: "车架号",
name: "vin",
type: "input",
isClear: true,
maxlength: 20
},
{
label: "车源号",
name: "sourceNo",
// type: "input",
// isClear: true,
// maxlength: 20,
addHtml: 'sourceNoInput'
},
{
label: "车型",
name: "vehicleTitle",
type: "input",
isClear: true,
maxlength: 50
},
{
type: "selectInput",
selectName: "orderName",
isClear: true,
selectWidth: "140px",
selectOption: [
{
label: "交付专员姓名",
name: "handlerName"
},
{
label: "买家姓名",
name: "buyerName"
},
{
label: "车辆保管人姓名",
name: "custodianName"
}
],
handleSelectChange: (value) => {
console.log(value, 'value')
this.searchSelectObj.orderName.value = ""
}
},
{
type: "selectInput",
selectName: "orderPhone",
isClear: true,
selectWidth: "140px",
selectOption: [
{
label: "交付专员电话",
name: "handlerPhone"
},
{
label: "买家联系方式",
name: "buyerContact"
},
{
label: "车辆保管人联系方式",
name: "custodianPhone"
}
],
handleSelectChange: (value) => {
this.searchSelectObj.orderPhone.value = ""
}
},
{
type: 'selectDatePicker',
selectName: 'divisionOrPayDate',
isClear: true,
itemStyle: "width: 94%;",
selectWidth: "165px",
// pickerOptions: 'rangePickerOptions',
selectOption: [{
label: '交付单创建时间',
name: 'createdDate'
}, {
label: '交付单最后更新时间',
name: 'updatedDate'
},
{
label: '成交时间',
name: 'transactionTime'
},
{
label: '预约提车时间',
name: 'scheduledTime'
},
{
label: '实际交付时间',
name: 'actualTime'
}
],
handleSelectChange: (value) => {
this.searchSelectObj.divisionOrPayDate.value = ''
}
},
{
label: "交付单编号",
name: "deliveryOrderId",
type: "input",
isClear: true,
maxlength: 20
},
{
label: "交付单状态",
name: "orderStatus",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "orderStatusMap"
},
{
label: "付款状态",
name: "paymentStatus",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "tailPayStatusMap"
},
{
label: "交付方式",
name: "deliveryType",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "deliveryTypeMap"
},
{
label: "拍卖场次",
name: "auctionId",
type: "input",
isClear: true,
maxlength: 20
}
],
baseData: {
usageTypeOpt: deepClone(usageTypeOpt),
ownerTypeOpt: deepClone(ownerTypeOpt),
vehicleCategoryOpt: deepClone(vehicleCategoryOpt),
buyNewCarOpt: deepClone(buyNewCarOpt),
hasAccidentOpt: deepClone(hasAccidentOpt),
evaluationStatusOpt: deepClone(evaluationStatusOpt),
evaluationStatusOptMap: deepClone(evaluationStatusOptMap),
orderStatusMap: deepClone(orderStatusMap),
tailPayStatusMap: deepClone(tailPayStatusMap),
deliveryTypeMap: deepClone(deliveryTypeMap)
},
track_event_code: "delivery_order_management"
}
},
mounted() {
this.onPageShow()
this.getOptionsList()
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
methods: {
// 只允许英文字母/数字/ASCII 可见特殊字符(过滤中文及非 ASCII)
filterSourceNo(val) {
if (this.isComposing) return
const sanitized = (val || "").replace(/[^\x20-\x7E]/g, "")
const limited = sanitized.slice(0, 20)
if (val !== limited) {
this.searchForm.sourceNo = limited
}
},
// 处理中文输入法组合输入结束后统一过滤
handleCompositionEnd() {
this.isComposing = false
const val = this.searchForm.sourceNo || ""
const limited = val.replace(/[^\x20-\x7E]/g, "").slice(0, 20)
if (val !== limited) {
this.$nextTick(() => {
this.searchForm.sourceNo = limited
})
}
},
getStatusItem(baseData, optKey, row, rowKey) {
if (!baseData || !baseData[optKey] || !row) return null
},
{
label: "车辆保管人联系方式",
prop: "custodianPhone",
width: "150px",
},
{
label: "交付单创建时间",
prop: "createdDate",
width: "160px",
},
{
label: "交付单最后更新时间",
prop: "updatedDate",
width: "160px",
},
{
label: "成交时间",
prop: "transactionTime",
width: "160px",
},
{
label: "预约提车时间",
prop: "scheduledTime",
width: "160px",
},
{
label: "实际交付时间",
prop: "actualTime",
width: "160px",
},
{
label: "交付状态",
prop: "orderStatus",
minWidth: 120,
addHtml: "orderStatusHtml",
},
{
label: "付款状态",
prop: "paymentStatus",
minWidth: 120,
addHtml: "tailPayStatusHtml",
},
{
label: "交付方式",
prop: "deliveryType",
formatter: (row) => {
// 0-客户自提 1-安排送车 加空判断
return row.deliveryType == 0 ? "客户自提" : row.deliveryType == 1 ? "安排送车" : "-";
},
},
{
label: "拍卖场次",
prop: "auctionId",
width: "160px",
},
],
},
searchFormSearch: {},
searchForm: {
licensePlate: "",
vin: "",
sourceNo: "",
vehicleTitle: "",
deliveryOrderId: "",
orderStatus: "",
paymentStatus: "",
deliveryType: "",
auctionId: "",
handlerName: "",
buyerName: "",
custodianName: "",
handlerPhone: "",
buyerPhone: "",
custodianPhone: "",
createdDate: "",
updatedDate: "",
transactionTime: "",
scheduledTime: "",
actualTime: "",
},
searchSelectObj: {
orderName: {
attr: "handlerName",
value: "",
},
orderPhone: {
attr: "handlerPhone",
value: "",
},
divisionOrPayDate: {
attr: "createdDate",
value: "",
},
},
showFormData: [
{
label: "车牌号",
name: "licensePlate",
type: "input",
isClear: true,
maxlength: 20,
},
{
label: "车架号",
name: "vin",
type: "input",
isClear: true,
maxlength: 20,
},
{
label: "车源号",
name: "sourceNo",
// type: "input",
// isClear: true,
// maxlength: 20,
addHtml: "sourceNoInput",
},
{
label: "车型",
name: "vehicleTitle",
type: "input",
isClear: true,
maxlength: 50,
},
{
type: "selectInput",
selectName: "orderName",
isClear: true,
selectWidth: "140px",
selectOption: [
{
label: "交付专员姓名",
name: "handlerName",
},
{
label: "买家姓名",
name: "buyerName",
},
{
label: "车辆保管人姓名",
name: "custodianName",
},
],
handleSelectChange: (value) => {
console.log(value, "value");
this.searchSelectObj.orderName.value = "";
},
},
{
type: "selectInput",
selectName: "orderPhone",
isClear: true,
selectWidth: "140px",
selectOption: [
{
label: "交付专员电话",
name: "handlerPhone",
},
{
label: "买家联系方式",
name: "buyerContact",
},
{
label: "车辆保管人联系方式",
name: "custodianPhone",
},
],
handleSelectChange: (value) => {
this.searchSelectObj.orderPhone.value = "";
},
},
{
type: "selectDatePicker",
selectName: "divisionOrPayDate",
isClear: true,
itemStyle: "width: 94%;",
selectWidth: "165px",
// pickerOptions: 'rangePickerOptions',
selectOption: [{
label: "交付单创建时间",
name: "createdDate",
}, {
label: "交付单最后更新时间",
name: "updatedDate",
}, {
label: "成交时间",
name: "transactionTime",
}, {
label: "预约提车时间",
name: "scheduledTime",
}, {
label: "实际交付时间",
name: "actualTime",
}],
handleSelectChange: (value) => {
this.searchSelectObj.divisionOrPayDate.value = "";
},
},
{
label: "交付单编号",
name: "deliveryOrderId",
type: "input",
isClear: true,
maxlength: 20,
},
{
label: "交付单状态",
name: "orderStatus",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "orderStatusMap",
},
{
label: "付款状态",
name: "paymentStatus",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "tailPayStatusMap",
},
{
label: "交付方式",
name: "deliveryType",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "deliveryTypeMap",
},
{
label: "拍卖场次",
name: "auctionId",
type: "input",
isClear: true,
maxlength: 20,
},
],
baseData: {
usageTypeOpt: deepClone(usageTypeOpt),
ownerTypeOpt: deepClone(ownerTypeOpt),
vehicleCategoryOpt: deepClone(vehicleCategoryOpt),
buyNewCarOpt: deepClone(buyNewCarOpt),
hasAccidentOpt: deepClone(hasAccidentOpt),
evaluationStatusOpt: deepClone(evaluationStatusOpt),
evaluationStatusOptMap: deepClone(evaluationStatusOptMap),
orderStatusMap: deepClone(orderStatusMap),
tailPayStatusMap: deepClone(tailPayStatusMap),
deliveryTypeMap: deepClone(deliveryTypeMap),
},
track_event_code: "delivery_order_management",
};
},
mounted() {
this.onPageShow();
this.getOptionsList();
},
computed: {
...mapState({
dowloadList: state => state.d2admin.user.dowloadList,
}),
},
methods: {
// 只允许英文字母/数字/ASCII 可见特殊字符(过滤中文及非 ASCII)
filterSourceNo(val) {
if (this.isComposing)
return;
const sanitized = (val || "").replace(/[^\x20-\x7E]/g, "");
const limited = sanitized.slice(0, 20);
if (val !== limited) {
this.searchForm.sourceNo = limited;
}
},
// 处理中文输入法组合输入结束后统一过滤
handleCompositionEnd() {
this.isComposing = false;
const val = this.searchForm.sourceNo || "";
const limited = val.replace(/[^\x20-\x7E]/g, "").slice(0, 20);
if (val !== limited) {
this.$nextTick(() => {
this.searchForm.sourceNo = limited;
});
}
},
getStatusItem(baseData, optKey, row, rowKey) {
if (!baseData || !baseData[optKey] || !row)
return null;
return baseData[optKey].find(
(item) => item.confId == row[rowKey] // 使用严格相等
)
},
...mapActions("d2admin/user", ["actionSetDownloadList"]),
filterIds() {
let ids = []
if (this.$refs.table.mutiSelectArr.mutiSelectIndex) {
this.$refs.table.mutiSelectArr.mutiSelectIndex.forEach((item) => {
ids.push(item.id)
})
}
return baseData[optKey].find(
item => item.confId == row[rowKey], // 使用严格相等
);
},
...mapActions("d2admin/user", ["actionSetDownloadList"]),
filterIds() {
let ids = [];
if (this.$refs.table.mutiSelectArr.mutiSelectIndex) {
this.$refs.table.mutiSelectArr.mutiSelectIndex.forEach((item) => {
ids.push(item.id);
});
}
return ids
},
//导出
handleExport() {
var params = this.getParams().t
params.currentPage = 1
params.server_provider_type = "gsc"
params.server_provider_name = "gsc-vcp-web-facade"
if (this.filterIds().length) {
params.idsStr = this.filterIds().join(",")
}
return ids;
},
// 导出
handleExport() {
let params = this.getParams();
params.currentPage = 1;
params.server_provider_type = "gsc";
params.server_provider_name = "gsc-vcp-web-facade";
if (this.filterIds().length) {
params.idsStr = this.filterIds().join(",");
}
params.method = "/deliveryOrderManage/exportDeliveryOrderAsync"
const list = [
...this.dowloadList,
{
name: "交付单管理",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
// uuid: JSON.parse(res).data,
// ifSuccess: false
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
},
//图片下载
handleDownLoad(row) {
var params = {
evalOrderNo: row.evalOrderNo
}
params.server_provider_type = "gsc"
params.server_provider_name = "gsc-vcp-web-facade"
params.method = "/evalOrderManage/exportEvalOrderImageZipAsync"
const list = [
...this.dowloadList,
{
name: "评估单车辆图片",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
// uuid: JSON.parse(res).data,
// ifSuccess: false
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
},
//车辆评估
handleAssess(data) {
console.log("row", data)
this.$router.push({
path: "/evaluate",
query: {
evalOrderNo: data.evalOrderNo
}
})
},
// 详情
handleDetail(data) {
console.log("row", data)
this.$router.push({
path: "/deliveryOrderManagementDetail",
query: {
id: data.id,
deliveryOrderId: data.deliveryOrderId,
}
})
},
getSelectInputParams() {
const list = Object.keys(this.searchSelectObj)
var params = {}
list.forEach(i => {
const item = this.searchSelectObj[i]
item.value && (params[item.attr] = item.value)
})
return params
},
getParams() {
let params = deepClone(this.searchForm)
const tempParams = this.getSelectInputParams()
// console.log(tempParams)
params = {
...params,
...tempParams
}
// 上牌时间
if (params?.createdDate?.length) {
let [start, end] =
params.createdDate
params.createdStartDate = Util.dateFormate(
start,
"YYYY-MM-DD HH:mm:ss"
)
params.createdEndDate = Util.dateFormate(
end,
"YYYY-MM-DD"
) + " 23:59:59"
delete params.createdDate
}
params.method = "/deliveryOrderManage/exportDeliveryOrderAsync";
const list = [
...this.dowloadList,
{
name: "交付单管理",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime(),
// uuid: JSON.parse(res).data,
// ifSuccess: false
},
];
this.actionSetDownloadList({ list, type: "dowloadList" });
},
// 图片下载
handleDownLoad(row) {
let params = {
evalOrderNo: row.evalOrderNo,
};
params.server_provider_type = "gsc";
params.server_provider_name = "gsc-vcp-web-facade";
params.method = "/evalOrderManage/exportEvalOrderImageZipAsync";
const list = [
...this.dowloadList,
{
name: "评估单车辆图片",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime(),
// uuid: JSON.parse(res).data,
// ifSuccess: false
},
];
this.actionSetDownloadList({ list, type: "dowloadList" });
},
// 车辆评估
handleAssess(data) {
console.log("row", data);
this.$router.push({
path: "/evaluate",
query: {
evalOrderNo: data.evalOrderNo,
},
});
},
// 详情
handleDetail(data) {
console.log("row", data);
this.$router.push({
path: "/deliveryOrderManagementDetail",
query: {
id: data.id,
deliveryOrderId: data.deliveryOrderId,
},
});
},
getSelectInputParams() {
const list = Object.keys(this.searchSelectObj);
let params = {};
list.forEach((i) => {
const item = this.searchSelectObj[i];
item.value && (params[item.attr] = item.value);
});
return params;
},
getParams() {
let params = deepClone(this.searchForm);
const tempParams = this.getSelectInputParams();
// console.log(tempParams)
params = {
...params,
...tempParams,
};
// 上牌时间
if (params?.createdDate?.length) {
let [start, end]
= params.createdDate;
params.createdStartDate = Util.dateFormate(
start,
"YYYY-MM-DD HH:mm:ss",
);
params.createdEndDate = Util.dateFormate(
end,
"YYYY-MM-DD",
) + " 23:59:59";
delete params.createdDate;
}
// 更新时间
if (params?.updatedDate?.length) {
let [start, end] =
params.updatedDate
params.updatedStartDate = Util.dateFormate(
start,
"YYYY-MM-DD HH:mm:ss"
)
params.updatedEndDate = Util.dateFormate(
end,
"YYYY-MM-DD"
) + " 23:59:59"
delete params.updatedDate
}
// 交易时间
if (params?.transactionTime?.length) {
let [start, end] =
params.transactionTime
params.transactionStartTime = Util.dateFormate(
start,
"YYYY-MM-DD HH:mm:ss"
)
params.transactionEndTime = Util.dateFormate(
end,
"YYYY-MM-DD"
) + " 23:59:59"
delete params.transactionTime
}
// scheduledTime
if (params?.scheduledTime?.length) {
let [start, end] =
params.scheduledTime
params.scheduledStartTime = Util.dateFormate(
start,
"YYYY-MM-DD HH:mm:ss"
)
params.scheduledEndTime = Util.dateFormate(
end,
"YYYY-MM-DD"
) + " 23:59:59"
delete params.scheduledTime
}
// actualTime
if (params?.actualTime?.length) {
let [start, end] =
params.actualTime
params.actualStartTime = Util.dateFormate(
start,
"YYYY-MM-DD HH:mm:ss"
)
params.actualEndTime = Util.dateFormate(
end,
"YYYY-MM-DD"
) + " 23:59:59"
delete params.actualTime
}
// 更新时间
if (params?.updatedDate?.length) {
let [start, end]
= params.updatedDate;
params.updatedStartDate = Util.dateFormate(
start,
"YYYY-MM-DD HH:mm:ss",
);
params.updatedEndDate = Util.dateFormate(
end,
"YYYY-MM-DD",
) + " 23:59:59";
delete params.updatedDate;
}
// 交易时间
if (params?.transactionTime?.length) {
let [start, end]
= params.transactionTime;
params.transactionStartTime = Util.dateFormate(
start,
"YYYY-MM-DD HH:mm:ss",
);
params.transactionEndTime = Util.dateFormate(
end,
"YYYY-MM-DD",
) + " 23:59:59";
delete params.transactionTime;
}
// scheduledTime
if (params?.scheduledTime?.length) {
let [start, end]
= params.scheduledTime;
params.scheduledStartTime = Util.dateFormate(
start,
"YYYY-MM-DD HH:mm:ss",
);
params.scheduledEndTime = Util.dateFormate(
end,
"YYYY-MM-DD",
) + " 23:59:59";
delete params.scheduledTime;
}
// actualTime
if (params?.actualTime?.length) {
let [start, end]
= params.actualTime;
params.actualStartTime = Util.dateFormate(
start,
"YYYY-MM-DD HH:mm:ss",
);
params.actualEndTime = Util.dateFormate(
end,
"YYYY-MM-DD",
) + " 23:59:59";
delete params.actualTime;
}
return {
t: params
}
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchFormSearch = this.getParams()
resolve()
})
},
handleSearch() {
this.page = this.$options.data.call(this).page
this.$refs.table.refreshTable(true, true)
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.searchSelectObj = this.$options.data.call(this).searchSelectObj
this.handleSearch()
},
async exportTable() {
let selectedData = []
console.log(this.$refs.table.mutiSelectArr.mutiSelectIndex)
},
return {
t: params,
};
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchFormSearch = this.getParams();
resolve();
});
},
handleSearch() {
this.page = this.$options.data.call(this).page;
this.$refs.table.refreshTable(true, true);
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm;
this.searchSelectObj = this.$options.data.call(this).searchSelectObj;
this.handleSearch();
},
async exportTable() {
let selectedData = [];
console.log(this.$refs.table.mutiSelectArr.mutiSelectIndex);
},
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
] !== "全部"
) {
// if (item.optionsName != "brandList") {
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]
)
}
})
}
}
}
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
] !== "全部"
) {
// if (item.optionsName != "brandList") {
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],
);
}
});
},
},
};
</script>
<style scoped lang="scss">
.coverImage-preview {
width: 138px;
height: 54px;
width: 138px;
height: 54px;
::v-deep .photo-activity {
width: 100%;
height: 100%;
object-fit: contain;
position: static !important;
}
::v-deep .photo-activity {
width: 100%;
height: 100%;
object-fit: contain;
position: static !important;
}
}
.online-status {
display: flex;
justify-content: center;
align-items: center;
display: flex;
justify-content: center;
align-items: center;
.dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 8px;
}
.dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 8px;
}
}
</style>
......@@ -513,11 +513,13 @@ export default {
getFileTypeFromUrl(url) {
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"]
return imageExtensions.includes(extension) ? "image" : "file"
if (imageExtensions.includes(extension)) return "image"
// 阿里云 OSS 图片处理:x-oss-process=image/format,jpg 表示图片
if (/x-oss-process=image\/format,\w+/.test(url)) return "image"
return "file"
},
getFileNameFromUrlForDisplay(url) {
if (!url) return "未知文件"
......@@ -552,9 +554,10 @@ export default {
},
processFileLinks(fileString) {
if (!fileString) return []
// 分割逗号分隔的文件链接
const links = fileString.split(",").filter((link) => link.trim())
// 兼容数组;字符串时按"逗号+http"分割,避免 OSS query 中逗号误分割
const links = Array.isArray(fileString)
? fileString
: fileString.split(/,\s*(?=https?:\/\/)/).map((s) => s.trim()).filter(Boolean)
console.log(links, "links")
// 根据文件类型返回相应的对象数组
return links.map((link) => {
......
......@@ -622,10 +622,10 @@ export default {
if (this.getFileType(item.value) == "image") {
item.otherType = "image"
item.value = item.value.split(",")
item.value = this.splitUrls(item.value)
} else if (this.getFileType(item.value) == "video") {
item.otherType = "video"
item.value = item.value.split(",")
item.value = this.splitUrls(item.value)
}
// item.value = item.value.split(",")
// }
......@@ -634,6 +634,11 @@ export default {
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) {
// 图片扩展名
const imageExtensions = [
......@@ -648,13 +653,16 @@ export default {
// 视频扩展名
const videoExtensions = ["mp4", "avi", "mov", "wmv", "flv", "webm", "mkv"]
// 提取文件扩展名
const extension = url.split(".").pop().toLowerCase().split("?")[0]
// 提取文件扩展名(先去掉 query,支持 OSS 带参数链接)
const pathname = url.split("?")[0]
const extension = pathname.split(".").pop()?.toLowerCase() || ""
if (imageExtensions.includes(extension)) {
return "image"
} else if (videoExtensions.includes(extension)) {
return "video"
} else if (/x-oss-process=image\/format,\w+/.test(url)) {
return "image"
} else {
return "unknown"
}
......
......@@ -729,13 +729,16 @@ export default {
// 视频扩展名
const videoExtensions = ["mp4", "avi", "mov", "wmv", "flv", "webm", "mkv"]
// 提取文件扩展名
const extension = url.split(".").pop().toLowerCase().split("?")[0]
// 提取文件扩展名(先去掉 query,支持 OSS 带参数链接)
const pathname = url.split("?")[0]
const extension = pathname.split(".").pop()?.toLowerCase() || ""
if (imageExtensions.includes(extension)) {
return "image"
} else if (videoExtensions.includes(extension)) {
return "video"
} else if (/x-oss-process=image\/format,\w+/.test(url)) {
return "image"
} else {
return "unknown"
}
......
......@@ -216,9 +216,12 @@ export default {
},
getFileTypeFromUrl (url) {
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']
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 () {
this.imgViewerVisible = false
......
......@@ -216,10 +216,12 @@ export default {
},
getFileTypeFromUrl (url) {
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']
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 () {
this.imgViewerVisible = false
......
......@@ -792,21 +792,20 @@ export default {
data.carImages = []
data.carImagesList = []
}
// 处理 documents 字段
if (data.documents) {
// if (typeof data.documents === 'string') {
// data.documentsList = this.processFileLinks(data.documents)
// } else {
data.documents = JSON.parse(data.documents)
data.documentsList = data.documents.map(item => {
// 处理 documents 字段(支持 documentUrls 数组或 documents JSON)
if (data.documentUrls && Array.isArray(data.documentUrls)) {
data.documentsList = this.processFileLinks(data.documentUrls)
} else if (data.documents) {
data.documents = typeof data.documents === 'string' ? JSON.parse(data.documents) : data.documents
const arr = Array.isArray(data.documents) ? data.documents : []
data.documentsList = arr.map(item => {
const url = typeof item === 'string' ? item : item?.fileUrl
return {
fileUrl: item.fileUrl,
fileType: this.getFileTypeFromUrl(item.fileUrl),
fileName: item.fileName
fileUrl: url,
fileType: this.getFileTypeFromUrl(url),
fileName: typeof item === 'object' && item?.fileName ? item.fileName : this.getFileNameFromUrlForDisplay(url)
}
})
console.log('data.documentsList', data.documentsList)
// }
} else {
data.documents = []
data.documentsList = []
......@@ -953,9 +952,10 @@ export default {
processFileLinks(fileString) {
if (!fileString) return []
// 分割逗号分隔的文件链接
const links = fileString.split(',').filter(link => link.trim())
// 兼容数组;字符串时按"逗号+http"分割,避免 OSS query 中逗号(如 quality,q_100) 误分割
const links = Array.isArray(fileString)
? fileString
: fileString.split(/,\s*(?=https?:\/\/)/).map(s => s.trim()).filter(Boolean)
console.log(links, 'links')
// 根据文件类型返回相应的对象数组
return links.map(link => {
......@@ -992,11 +992,12 @@ export default {
},
getFileTypeFromUrl(url) {
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']
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'
},
isImageType(file) {
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!