Commit e6db735b by zhangxw

发货单出入库记录联调

1 parent da5bed27
......@@ -173,6 +173,36 @@ export function stockRefundUpdateStatus(data) {
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"
......
......@@ -441,6 +441,8 @@ export const routerName = {
authId: "9081102",
parentId: "90811",
label: "批量发货",
category: "Button",
type: "primary",
handle: "batchShipment"
},
{
......@@ -492,7 +494,7 @@ export const routerName = {
authId: "9081203",
parentId: "90812",
label: "发货签收单",
handle: "handleShipment"
handle: "handleSign"
}
],
component: _import("stockManage/shippingDocument/index")
......
......@@ -55,12 +55,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 +78,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 {
......@@ -90,8 +95,8 @@ export default {
callInYqMerchantId: "",
callOutMerchantId: "",
callInMerchantId: "",
documentStatus: "",
shippingStatus: ""
billStatusList: "",
deliveryStatus: ""
},
searchFormSearch: {},
searchSelectObj: {
......@@ -169,21 +174,21 @@ export default {
},
{
label: "单据状态",
name: "documentStatus",
name: "billStatusList",
type: "select",
optionList: [],
optionId: 'confId',
optionLabel: "confLabel",
optionsName: "documentStatusList"
optionsName: "billStatusListOptions"
},
{
label: "发货状态",
name: "shippingStatus",
name: "deliveryStatus",
type: "select",
optionList: [],
optionId: 'confId',
optionLabel: "confLabel",
optionsName: "shippingStatusList"
optionsName: "deliveryStatusList"
}
],
getListApi: stockAllocatePage,
......@@ -202,27 +207,37 @@ export default {
prop: "",
width: "150px",
formatter: (cellValue) => {
return cellValue.allocateTime
return cellValue.submitTime
? Util.dateFormate(
cellValue.allocateTime,
cellValue.submitTime,
"YYYY-MM-DD HH:mm:ss"
)
: ""
: "-"
}
},
{
label: "单据状态",
prop: "documentStatus",
width: "150px",
prop: "billStatus",
width: "120px",
formatter: (cellValue) => {
return this.baseData.documentStatusList.find(item => item.confId === cellValue.documentStatus)?.confLabel || '-'
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 {
2: 'yellowSpot',
3: 'redSpot',
4: 'greenSpot'
}[cellValue.documentStatus]
'0': 'yellowSpot',
'1': 'yellowSpot',
'2': 'yellowSpot',
'5': 'greenSpot',
'4': 'redSpot',
'6': 'redSpot',
'7': 'redSpot',
'-1': 'ashSpot'
}[status]
}
},
{
......@@ -268,21 +283,37 @@ 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',
'2': 'yellowSpot',
'3': 'greenSpot'
}[status]
}
},
{
label: "备注",
prop: "remark"
},
{
label: "收货人",
peop: ""
prop: "receiver"
},
{
label: "收货人电话",
width: "120px",
prop: ""
prop: "phone"
},
{
label: "收货地址",
prop: ""
prop: "address"
}
]
},
......@@ -291,26 +322,26 @@ export default {
yqRelatedMerchantList: [],
outMerchantList: [], // 调出门店
inMerchantList: [], // 调入门店
documentStatusList: [{
confId: '1',
billStatusListOptions: [{
confId: '0',
confLabel: '待提交'
}, {
confId: '2',
confId: '1',
confLabel: '运营审核'
}, {
confId: '3',
confId: '2',
confLabel: '商务审核'
}, {
confId: '4',
confLabel: '审批驳回'
confLabel: '审核驳回'
}, {
confId: '5',
confLabel: '审批通过'
confLabel: '审核通过'
}, {
confId: '6',
confId: '-1',
confLabel: '作废'
}],
shippingStatusList: [{
deliveryStatusList: [{
confId: '1',
confLabel: '未发货'
}, {
......@@ -322,7 +353,7 @@ export default {
}]
},
allocationDetailVisible: false,
transferDetailVisible: false,
recordInfo: null
}
},
......@@ -378,6 +409,9 @@ export default {
) + " 23:59:59"
}
delete this.searchFormSearch.allocateTime
if (this.searchFormSearch.billStatusList) {
this.searchFormSearch.billStatusList = this.searchFormSearch.billStatusList == 4 ? [4, 6, 7] : [this.searchFormSearch.billStatusList]
}
resolve()
})
},
......@@ -447,18 +481,25 @@ export default {
callInYqMerchantId: "",
callOutMerchantId: "",
callInMerchantId: "",
documentStatus: "",
shippingStatus: ""
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,
......@@ -474,17 +515,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>
......
......@@ -16,20 +16,10 @@
<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']" />
<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">
<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>
......@@ -40,6 +30,7 @@ import { getInventoryTransactionRecordsPage } from '@api/stockManage'
import { Util, deepClone } from '@/common/util'
import { mapState, mapActions } from 'vuex'
import { baseConfig } from '@/main'
import dayjs from "dayjs"
export default {
name: 'TransferShipment',
data() {
......@@ -75,14 +66,14 @@ export default {
},
{
label: '出入库单号',
name: 'goodsName',
name: 'businessCode',
type: 'input',
isClear: true,
maxlength: 50
},
{
label: '商品名称',
name: 'goodsName',
name: 'upgradeGoodsName',
type: 'input',
isClear: true,
maxlength: 50
......@@ -100,12 +91,14 @@ export default {
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '出入库时间',
prop: 'flowTime',
width: 150
width: 150,
formatter: (cellValue) => {
return dayjs(cellValue.flowTime).format("YYYY-MM-DD HH:mm:ss")
}
},
{
label: '商品名称',
......@@ -271,11 +264,17 @@ export default {
businessCode: '',
queryFlowTypes: []
}
this.$refs.purchasementReviewTable.refreshTable()
this.$refs.purchasementReviewTable.refreshTable(true)
},
handleExport() {
this.filterSearchTime()
var params = this.tableSearchForm
if (params.queryFlowTypes.length > 0) {
const queryFlowTypes = `queryFlowTypes[0]`
params[queryFlowTypes] = params.queryFlowTypes[0]
}
delete params.queryFlowTypes
console.log(params)
params.method = 'dj.api.smartcarlife.StockFlow.export.async'
const list = [
...this.dowloadList,
......
<!-- 发货单详情弹窗 -->
<template>
<div>
<d2-dialog title="详细信息" :is-visible="detailVisible" class="stockMonthDailog" width="1400px" :no-cancel="true" btn-ok-label="关闭" @closeDialog="handleClose" @confirmDialog="handleClose">
<d2-dialog title="详细信息" :is-visible="detailVisible" class="stockMonthDailog" width="1400px" :no-cancel="true" :isShowFooter="false" @closeDialog="handleClose" @confirmDialog="handleClose">
<div class="detail-info">
<div>
<div class="item">
收货人:
<span>{{ detailInfo.contactName }}</span>
</div>
<div class="item">
收货人电话:
<span>{{ detailInfo.contactPhone }}</span>
</div>
<div class="item">
收货地址:
<span>{{ detailInfo.contactAddress }}</span>
</div>
<div class="item">
发货单号:
<span>{{ detailInfo.deliveryNumber }}</span>
</div>
<div>
<div class="item">
发货仓库:
<span>{{ detailInfo.shippingWarehouseName }}</span>
</div>
<div>
<div class="item">
承运公司:
<span>{{ detailInfo.deliveryCompany }}</span>
</div>
<div>
<div class="item">
发货时间:
<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>
<div class="detail-info border-b">
<div class="item wid-40">
商品名称:
<span>{{ item.upgradeGoodsName }}&nbsp;&nbsp;&nbsp;&nbsp; {{item.specificationData}}</span>
</div>
<div>
<div class="item wid-30">
发货数量:
<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>
<span>{{ item.purchaseNumber + (baseConfig.membraneTypeList.includes(item.goodsType) ? '卷' : '件') }}</span>
</div>
<div>
<div class="item wid-30">
可用库存数量:
<span>{{ item.stockNum + (membraneTypeList.includes(item.goodsType) ? '米' : '件') }}</span>
<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">
......@@ -66,10 +77,6 @@
</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>
......@@ -83,7 +90,6 @@ export default {
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: baseConfig.membraneTypeList,
detailInfo: {},
searchFormSearch: {},
// tableData: [],
......@@ -97,7 +103,7 @@ export default {
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) ? '卷' : '件') : '-'
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: '膜卷号',
......@@ -156,12 +162,6 @@ export default {
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
lookNumber(data) {
this.innerVisible = true
this.tableDataCardList = data.map(item => {
return { cardNum: item }
})
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
......@@ -170,11 +170,11 @@ export default {
},
getDetail() {
var params = { id: deepClone(this.recordInfo.orderCode) }
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')
this.detailInfo.deliveryDate = Util.dateFormate(this.detailInfo.deliveryDate, 'YYYY-MM-DD HH:mm:ss')
}
const _deliveryDetailList = this.detailInfo.deliveryDetailList
if (_deliveryDetailList && _deliveryDetailList.length > 0) {
......@@ -204,20 +204,34 @@ export default {
.detail-info {
display: flex;
align-items: center;
justify-content: space-between;
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;
}
.add-btn {
font-size: 14px;
color: #5850ff;
cursor: pointer;
}
}
.border-b {
border-bottom: 1px solid #e5e5e5;
margin-bottom: 12px;
}
.film-roll-box {
......@@ -244,14 +258,7 @@ export default {
}
.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>
......@@ -52,8 +52,9 @@ export default {
data() {
return {
searchForm: {
orderType: 1,
orderCode: '',
merchantName: '',
callInMerchantName: '',
putStatus: '',
deliveryNumber: '',
deliveryCompany: ''
......@@ -69,7 +70,7 @@ export default {
},
{
label: '调拨商户',
name: 'merchantName',
name: 'callInMerchantName',
type: 'input',
isClear: true
},
......@@ -94,15 +95,6 @@ export default {
type: 'input',
isClear: true
},
{
label: '调出方',
name: 'transferOutMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionNames: 'transferOutMerchantList'
}
],
getListApi: getDeliveryPage,
// 表格参数
......@@ -125,52 +117,56 @@ export default {
prop: 'deliveryCompany'
},
{
label: '调拨数量',
prop: 'orderCode'
},
{
label: '调拨人',
prop: 'orderCode'
prop: 'allocateCreatedBy'
},
{
label: '调入门店',
prop: 'orderCode'
prop: 'callInMerchantName'
},
{
label: '调入仓库',
prop: 'orderCode'
prop: 'callInYqMerchantName'
},
{
label: '调出门店',
prop: 'orderCode'
prop: 'callOutMerchantName'
},
{
label: '调出仓库',
prop: 'orderCode'
prop: 'callOutYqMerchantName'
},
{
label: '入库状态',
prop: 'orderCode'
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: 'orderCode'
prop: 'contactName'
},
{
label: '收货人电话',
prop: 'orderCode'
prop: 'contactPhone'
},
{
label: '收货地址',
prop: 'orderCode'
prop: 'contactAddress'
}
]
},
// 查看门店
detailVisible: false,
// 驳回
rejectVisible: false,
checkVisible: false,
// 基本数据
baseData: {
putStatusOptions: [{
......@@ -185,11 +181,8 @@ export default {
}, {
confId: '3',
confLabel: '部分入库'
}],
transferOutMerchantList: [],
transferInMerchantList: []
},
paramsObj: {}
}]
}
}
},
computed: {
......@@ -222,18 +215,28 @@ export default {
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.searchForm = {
orderType: 1,
orderCode: '',
callInMerchantName: '',
putStatus: '',
deliveryNumber: '',
deliveryCompany: ''
}
this.$refs.purchasementReviewTable.refreshTable()
this.$refs.purchasementReviewTable.refreshTable(true)
},
handleExport() {
var params = this.tableSearchForm
params.method = 'dj.api.life.operatorreview.exportExcel.async'
params.method = 'dj.api.smarcarlife.purchaseOrder.delivery.export.async'
const list = [
...this.dowloadList,
{
......@@ -246,17 +249,10 @@ export default {
]
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
id: row.id
}
this.detailVisible = true
},
......@@ -269,7 +265,6 @@ export default {
id: row.id
}
deliveryPdf(params).then((res) => {
console.log(res)
this.$open(res)
})
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!