Commit a22d9cb8 by zhangxw

调拨需求

1 parent 7c3f24ec
...@@ -166,3 +166,27 @@ export function stockRefundUpdateStatus(data) { ...@@ -166,3 +166,27 @@ export function stockRefundUpdateStatus(data) {
data.method = "dj.smartcarlife.api.stock.refund.updateStatus" data.method = "dj.smartcarlife.api.stock.refund.updateStatus"
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 发货单列表数据
export function 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)
}
...@@ -312,5 +312,126 @@ export const routerName = { ...@@ -312,5 +312,126 @@ export const routerName = {
activePath: "/returnManage" activePath: "/returnManage"
}, },
component: _import("stockManage/returnManage/reviewPage") component: _import("stockManage/returnManage/reviewPage")
},
90809: {
path: "/transferOperationsReview",
name: "transferOperationsReview",
meta: {
title: "运营审核",
authId: "90809",
parentId: "908",
cache: false
},
component: _import("stockManage/transferOperationsReview/index")
},
90810: {
path: "/transferCommercialReview",
name: "transferCommercialReview",
meta: {
title: "商务审核",
authId: "90810",
parentId: "908",
cache: false
},
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: "批量发货",
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: "handleShipment"
}
],
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")
},
} }
...@@ -89,7 +89,9 @@ export default { ...@@ -89,7 +89,9 @@ export default {
callOutYqMerchantId: "", callOutYqMerchantId: "",
callInYqMerchantId: "", callInYqMerchantId: "",
callOutMerchantId: "", callOutMerchantId: "",
callInMerchantId: "" callInMerchantId: "",
documentStatus: "",
shippingStatus: ""
}, },
searchFormSearch: {}, searchFormSearch: {},
searchSelectObj: { searchSelectObj: {
...@@ -164,6 +166,24 @@ export default { ...@@ -164,6 +166,24 @@ export default {
optionId: "merchantId", optionId: "merchantId",
optionLabel: "merchantName", optionLabel: "merchantName",
optionsName: "inMerchantList" optionsName: "inMerchantList"
},
{
label: "单据状态",
name: "documentStatus",
type: "select",
optionList: [],
optionId: 'confId',
optionLabel: "confLabel",
optionsName: "documentStatusList"
},
{
label: "发货状态",
name: "shippingStatus",
type: "select",
optionList: [],
optionId: 'confId',
optionLabel: "confLabel",
optionsName: "shippingStatusList"
} }
], ],
getListApi: stockAllocatePage, getListApi: stockAllocatePage,
...@@ -178,6 +198,34 @@ export default { ...@@ -178,6 +198,34 @@ export default {
width: "200px" width: "200px"
}, },
{ {
label: "单据时间",
prop: "",
width: "150px",
formatter: (cellValue) => {
return cellValue.allocateTime
? Util.dateFormate(
cellValue.allocateTime,
"YYYY-MM-DD HH:mm:ss"
)
: ""
}
},
{
label: "单据状态",
prop: "documentStatus",
width: "150px",
formatter: (cellValue) => {
return this.baseData.documentStatusList.find(item => item.confId === cellValue.documentStatus)?.confLabel || '-'
},
className: (cellValue) => {
return {
2: 'yellowSpot',
3: 'redSpot',
4: 'greenSpot'
}[cellValue.documentStatus]
}
},
{
label: "调拨时间", label: "调拨时间",
prop: "allocateTime", prop: "allocateTime",
width: "150px", width: "150px",
...@@ -222,6 +270,19 @@ export default { ...@@ -222,6 +270,19 @@ export default {
{ {
label: "备注", label: "备注",
prop: "remark" prop: "remark"
},
{
label: "收货人",
peop: ""
},
{
label: "收货人电话",
width: "120px",
prop: ""
},
{
label: "收货地址",
prop: ""
} }
] ]
}, },
...@@ -229,7 +290,36 @@ export default { ...@@ -229,7 +290,36 @@ export default {
productTypeList: [], productTypeList: [],
yqRelatedMerchantList: [], yqRelatedMerchantList: [],
outMerchantList: [], // 调出门店 outMerchantList: [], // 调出门店
inMerchantList: [] // 调入门店 inMerchantList: [], // 调入门店
documentStatusList: [{
confId: '1',
confLabel: '待提交'
}, {
confId: '2',
confLabel: '运营审核'
}, {
confId: '3',
confLabel: '商务审核'
}, {
confId: '4',
confLabel: '审批驳回'
}, {
confId: '5',
confLabel: '审批通过'
}, {
confId: '6',
confLabel: '作废'
}],
shippingStatusList: [{
confId: '1',
confLabel: '未发货'
}, {
confId: '2',
confLabel: '部分发货'
}, {
confId: '3',
confLabel: '全部发货'
}]
}, },
allocationDetailVisible: false, allocationDetailVisible: false,
...@@ -356,7 +446,9 @@ export default { ...@@ -356,7 +446,9 @@ export default {
callOutYqMerchantId: "", callOutYqMerchantId: "",
callInYqMerchantId: "", callInYqMerchantId: "",
callOutMerchantId: "", callOutMerchantId: "",
callInMerchantId: "" callInMerchantId: "",
documentStatus: "",
shippingStatus: ""
} }
this.baseData.outMerchantList = [] // 调出门店 this.baseData.outMerchantList = [] // 调出门店
this.baseData.inMerchantList = [] // 调入门店 this.baseData.inMerchantList = [] // 调入门店
......
<!-- 出入库记录 -->
<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>
<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="purchasementReviewTable" :search-form="tableSearchForm" :table-params="tableParams" :table-data="tableData" :selectable-fn="selectableFn" :get-list-api="getListApi" :before-search-fn="beforeSearchFn">
<span style="margin-right: 10px">
<auth-button category="Button" :show-btn-ids="['9081103']" />
</span>
<span style="margin-right: 10px">
<auth-button category="Button" :show-btn-ids="['9081104']" />
</span>
<auth-button category="Button" :show-btn-ids="['9081105']" />
</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'
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: 'goodsName',
type: 'input',
isClear: true,
maxlength: 50
},
{
label: '商品名称',
name: 'goodsName',
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',
tableOption: true,
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: 'orderType',
width: 130
},
{
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: '自采入库'
}]
},
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()
},
handleExport() {
this.filterSearchTime()
var params = this.tableSearchForm
params.method = 'dj.api.smartcarlife.StockFlow.export.async'
const list = [
...this.dowloadList,
{
name: '出入库记录',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
}
}
</script>
<style lang="scss" scoped></style>
\ No newline at end of file \ No newline at end of file
<!-- 发货单详情弹窗 -->
<template>
<div>
<d2-dialog title="详细信息" :is-visible="detailVisible" class="stockMonthDailog" width="1400px" :no-cancel="true" btn-ok-label="关闭" @closeDialog="handleClose" @confirmDialog="handleClose">
<div class="detail-info">
<div>
发货单号:
<span>{{ detailInfo.deliveryNumber }}</span>
</div>
<div>
发货仓库:
<span>{{ detailInfo.shippingWarehouseName }}</span>
</div>
<div>
承运公司:
<span>{{ detailInfo.deliveryCompany }}</span>
</div>
<div>
发货时间:
<span>{{ detailInfo.deliveryDate }}</span>
</div>
</div>
<template v-for="(item, index) in detailInfo.deliveryDetailList">
<div class="table-wrap" :key="index">
<div class="detail-info">
<div>
商品名称:
<span>{{ item.upgradeGoodsName }}&nbsp;&nbsp;&nbsp;&nbsp; {{item.specificationData}}</span>
</div>
<div>
发货数量:
<span>{{ item.purchaseNumber + (membraneTypeList.includes(item.goodsType) ? '卷' : '件') }}</span>
<el-button type="text" class="lookNumber" @click="lookNumber(item.deliveryCardList)" v-if="item.deliveryCardList && item.deliveryCardList.length > 0">查看卡号</el-button>
</div>
<div>
可用库存数量:
<span>{{ item.stockNum + (membraneTypeList.includes(item.goodsType) ? '米' : '件') }}</span>
</div>
</div>
<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>
<d2-dialog title="查看发货卡号" :is-visible="innerVisible" width="500px" :no-cancel="true" btn-ok-label="关闭" @closeDialog="innerVisible = false" @confirmDialog="innerVisible = false">
<d2-table class="deliveryCardCon" ref="recordTable" :table-data="tableDataCardList" :table-params="innerParams" :has-page="false">
</d2-table>
</d2-dialog>
</div>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { getDeliveryDetail } from '@/api/stockManage.js'
import { baseConfig } from '@/main'
export default {
name: 'DeliveryDetailDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: baseConfig.membraneTypeList,
detailInfo: {},
searchFormSearch: {},
// tableData: [],
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
// singleSelectUniqueKey: 'id',
tableOption: false,
tableColumns: [{
label: '入库数量',
prop: 'increaseStockNum',
// width: '200px'
formatter: (cellValue) => {
return (cellValue.increaseStockNum || cellValue.increaseStockNum == 0) ? (this.membraneTypeList.includes(cellValue.goodsType) ? parseFloat(cellValue.increaseStockNum / cellValue.alternateUnits).toFixed(2) : parseFloat(cellValue.increaseStockNum).toFixed(2)) + (this.membraneTypeList.includes(cellValue.goodsType) ? '卷' : '件') : '-'
}
}, {
label: '膜卷号',
name: '',
type: 'slot',
addHtml: 'filmRollNo'
}, {
label: '入库仓库',
prop: 'yqMerchantName'
// width: '150px'
}, {
label: '入库门店',
prop: 'merchantName'
// width: '200px'
}]
},
baseData: {
},
merchantDialogVisible: false,
tableDataCardList: [],
innerVisible: false,
innerParams: {
tableOption: false,
tableColumns: [
{
label: '卡号',
prop: 'cardNum'
// width:630
}
]
}
}
},
props: {
detailVisible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => { }
}
},
computed: {
},
mounted() {
this.getDetail()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
lookNumber(data) {
this.innerVisible = true
this.tableDataCardList = data.map(item => {
return { cardNum: item }
})
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
getDetail() {
var params = { id: deepClone(this.recordInfo.orderCode) }
getDeliveryDetail(params).then(res => {
this.detailInfo = res
if (this.detailInfo.deliveryDate) {
this.detailInfo.deliveryDate = Util.dateFormate(this.detailInfo.deliveryDate, 'YYYY-MM-DD HH:mm')
}
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;
align-items: center;
justify-content: space-between;
color: #666666ff;
font-size: 14px;
margin-bottom: 16px;
span {
color: #333333ff;
}
.add-btn {
font-size: 14px;
color: #5850ff;
cursor: pointer;
}
}
.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 {
border: 1px solid #e5e5e5;
padding: 16px;
box-sizing: border-box;
margin-top: 16px;
// /deep/ .el-form-item__error {
// padding-top: 2px;
// z-index: 9999999;
// position: static;
// }
}
</style>
<!-- 发货单 -->
<template>
<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">
<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: {
orderCode: '',
merchantName: '',
putStatus: '',
deliveryNumber: '',
deliveryCompany: ''
},
tableSearchForm: {},
tableData: [],
showFormData: [
{
label: '调拨单号',
name: 'orderCode',
type: 'input',
isClear: true
},
{
label: '调拨商户',
name: 'merchantName',
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
},
{
label: '调出方',
name: 'transferOutMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionNames: 'transferOutMerchantList'
}
],
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: 'orderCode'
},
{
label: '调拨人',
prop: 'orderCode'
},
{
label: '调入门店',
prop: 'orderCode'
},
{
label: '调入仓库',
prop: 'orderCode'
},
{
label: '调出门店',
prop: 'orderCode'
},
{
label: '调出仓库',
prop: 'orderCode'
},
{
label: '入库状态',
prop: 'orderCode'
},
{
label: '收货人',
prop: 'orderCode'
},
{
label: '收货人电话',
prop: 'orderCode'
},
{
label: '收货地址',
prop: 'orderCode'
}
]
},
// 查看门店
detailVisible: false,
// 驳回
rejectVisible: false,
checkVisible: false,
// 基本数据
baseData: {
putStatusOptions: [{
confId: '0',
confLabel: '待签收'
}, {
confId: '1',
confLabel: '未入库'
}, {
confId: '2',
confLabel: '已入库'
}, {
confId: '3',
confLabel: '部分入库'
}],
transferOutMerchantList: [],
transferInMerchantList: []
},
paramsObj: {}
}
},
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])
}
})
},
selectableFn(row, index) {
return row.status == 1 && row.sendOutMerchantId != null
},
beforeSearchFn() {
return new Promise(resolve => {
resolve()
})
},
handleReset() {
for (const key in this.searchForm) {
this.searchForm[key] = ''
}
this.$refs.purchasementReviewTable.refreshTable()
},
handleExport() {
var params = this.tableSearchForm
params.method = 'dj.api.life.operatorreview.exportExcel.async'
const list = [
...this.dowloadList,
{
// name: '采购审核',
name: '发货单',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
// 审核
handleCheck(row) {
this.checkVisible = !this.checkVisible
this.paramsObj = row
},
// 查看详情
handleDetail(row) {
this.recordInfo = {
orderCode: row.orderCode,
merchantName: row.merchantName,
purchaseType: row.purchaseType
}
this.detailVisible = true
},
dialogClose(flag) {
this.detailVisible = !this.detailVisible
},
// 签收发货单
handleSign(row) {
const params = {
id: row.id
}
deliveryPdf(params).then((res) => {
console.log(res)
this.$open(res)
})
}
}
}
</script>
<style lang="scss" scoped></style>
\ No newline at end of file \ No newline at end of file
<!-- 商务审核 -->
<template>
</template>
\ No newline at end of file \ No newline at end of file
<!-- 运营审核 -->
<template>
</template>
\ No newline at end of file \ No newline at end of file
<!-- 调拨发货 -->
<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="purchasementReviewTable" :search-form="tableSearchForm" :table-params="tableParams" :table-data="tableData" :selectable-fn="selectableFn" :get-list-api="getListApi" :before-search-fn="beforeSearchFn">
<span style="margin-right: 10px">
<auth-button category="Button" :show-btn-ids="['9081103']" />
</span>
<span style="margin-right: 10px">
<auth-button category="Button" :show-btn-ids="['9081104']" />
</span>
<auth-button category="Button" :show-btn-ids="['9081105']" />
</d2-table>
</div>
</d2-container>
</template>
<script>
import { operatorreviewPage } from '@api/stockManage'
import { Util, deepClone } from '@/common/util'
import { mapState, mapActions } from 'vuex'
export default {
name: 'TransferShipment',
data() {
return {
searchForm: {
shippingStatus: ''
},
tableSearchForm: {},
tableData: [],
showFormData: [
{
label: '调拨单号',
name: 'orderCode',
type: 'input',
isClear: true
},
{
label: '调入方',
name: 'transferInMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionNames: 'transferInMerchantList'
},
{
label: '发货状态',
name: 'shippingStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'shippingStatusOptions'
},
{
label: '商品名称',
name: 'goodsName',
type: 'input',
isClear: true,
maxlength: 50
},
{
label: '商品编码',
name: 'productCode',
type: 'input',
isClear: true,
maxlength: 50
},
{
label: '调出方',
name: 'transferOutMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionNames: 'transferOutMerchantList'
}
],
getListApi: operatorreviewPage,
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
mutiSelectUniqueKey: "id",
mutiSelectName: "list",
tableOption: true,
tableColumns: [
{
label: '调拨单号',
prop: 'orderCode',
width: 150
},
{
label: '商品名称',
prop: 'orderCode'
},
{
label: '商品编码',
prop: 'orderCode'
},
{
label: '规格',
prop: 'orderCode'
},
{
label: '系列',
prop: 'orderCode'
},
{
label: '所属分类',
prop: 'orderCode'
},
{
label: '调拨数量',
prop: 'orderCode'
},
{
label: '调拨人',
prop: 'orderCode'
},
{
label: '调入门店',
prop: 'orderCode'
},
{
label: '调入仓库',
prop: 'orderCode'
},
{
label: '调出门店',
prop: 'orderCode'
},
{
label: '调出仓库',
prop: 'orderCode'
},
{
label: '收货人',
prop: 'orderCode'
},
{
label: '收货人电话',
prop: 'orderCode',
width: 130
},
{
label: '收货地址',
prop: 'orderCode'
},
{
label: '发货状态',
prop: 'deliveryStatus',
formatter: (cellValue) => {
return baseData.shippingStatusOptions.find(item => item.confId == cellValue.deliveryStatus)?.confLabel || '-'
},
className: (cellValue) => {
return {
1: 'ashSpot',
2: 'greenSpot',
3: 'yellowSpot',
4: 'redSpot'
}[cellValue.deliveryStatus]
}
},
{
label: '订单状态',
prop: 'status',
formatter: (cellValue) => {
return operate_statusOptions_table.find(item => item.id == cellValue.status)?.label || '-'
},
className: (cellValue) => {
return {
1: 'yellowSpot',
2: 'greenSpot',
4: 'redSpot',
5: 'greenSpot',
6: 'redSpot',
7: 'redSpot',
8: 'greenSpot',
9: 'redSpot'
}[cellValue.status]
}
}
]
},
// 查看门店
detailVisible: false,
// 驳回
rejectVisible: false,
checkVisible: false,
// 基本数据
baseData: {
shippingStatusOptions: [{
confId: '1',
confLabel: '未发货'
}, {
confId: '2',
confLabel: '部分发货'
}, {
confId: '3',
confLabel: '全部发货'
}],
transferOutMerchantList: [],
transferInMerchantList: []
},
paramsObj: {}
}
},
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])
}
})
},
selectableFn(row, index) {
return row.status == 1 && row.sendOutMerchantId != null
},
beforeSearchFn() {
return new Promise(resolve => {
this.filterSearchTime()
resolve()
})
},
handleReset() {
for (const key in this.searchForm) {
this.searchForm[key] = ''
}
this.searchForm.sortType = 2
this.searchForm.orderTimeStr = []
this.$refs.purchasementReviewTable.refreshTable()
},
handleExport() {
var params = this.tableSearchForm
// 处理查询条件时间
for (const key in params) {
if (key == 'orderTimeStr' || key == 'statuses') {
if (params[key]) {
params[key].forEach((v, index) => {
params[`${key}[${index}]`] = v
})
}
delete params[key]
}
}
// params.method = 'dj.api.smarcarlife.purchaseOrder.export.async'
params.method = 'dj.api.life.operatorreview.exportExcel.async'
const list = [
...this.dowloadList,
{
// name: '采购审核',
name: '运营审核',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
// 审核
handleCheck(row) {
this.checkVisible = !this.checkVisible
this.paramsObj = row
},
// 批量审核
handleBatchCheck() {
var selectedData = this.$refs?.purchasementReviewTable?.mutiSelectArr[this.tableParams.mutiSelectName] || []
if (selectedData.length == 0) {
this.$message({
message: '请选择要批量审核的订单',
type: 'warning'
})
return true
}
console.log(selectedData, 'selectedData')
var list = []
selectedData.forEach(item => {
list.push({
orderCode: item.orderCode,
merchantId: item.merchantId,
merchantName: item.merchantName,
totalPrice: item.totalPrice,
orderTime: item.orderTime,
sendOutMerchantId: item.sendOutMerchantId,
sendOutMerchantName: item.sendOutMerchantName,
remark: ''
})
})
this.$router.push({
name: 'batchReview',
query: {
fromPage: 'procurementReview',
list: list
}
})
},
// 查看详情
handleDetail(row) {
this.paramsObj = {
orderCode: row.orderCode,
merchantName: row.merchantName,
purchaseType: row.purchaseType
}
this.detailVisible = true
},
// 驳回
handleReject(row) {
this.paramsObj = {
orderCode: row.orderCode,
type: 'operator'
}
this.rejectVisible = true
},
dialogClose(obj) {
this[obj.attrName] = !this[obj.attrName]
if (obj.flag) {
this.$refs.purchasementReviewTable.refreshTable()
}
}
}
}
</script>
<style lang="scss" scoped></style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!