Commit bc5abcca by 张立顺

feat 功能开发

1 parent e925d0bc
...@@ -47,12 +47,12 @@ ...@@ -47,12 +47,12 @@
</div> </div>
</d2-container> </d2-container>
<!-- 查看 --> <!-- 查看 -->
<!-- <allocation-detail-dialog <transferDetailDialog
:allocation-detail-visible="allocationDetailVisible" :visible.sync="transferDetailVisible"
:record-info="recordInfo" v-if="transferDetailVisible"
v-if="allocationDetailVisible" :params-obj="transferObj"
@dialogClose="dialogClose" :hideContact="true"
/> --> />
</div> </div>
</template> </template>
...@@ -71,6 +71,7 @@ export default { ...@@ -71,6 +71,7 @@ export default {
name: "TransferOperationsReviewList", name: "TransferOperationsReviewList",
components: { components: {
// allocationDetailDialog // allocationDetailDialog
transferDetailDialog: () => import("../components/transferDetailDialog.vue")
}, },
data() { data() {
return { return {
...@@ -279,8 +280,8 @@ export default { ...@@ -279,8 +280,8 @@ export default {
] ]
}, },
allocationDetailVisible: false, transferDetailVisible: false,
recordInfo: null transferObj: {}
} }
}, },
computed: { computed: {
...@@ -307,7 +308,13 @@ export default { ...@@ -307,7 +308,13 @@ export default {
// async getBaseData() { // async getBaseData() {
// this.getOptionsList() // this.getOptionsList()
// }, // },
// 查看
look(row) {
this.transferObj = {
allocateCode: row.allocateCode
}
this.transferDetailVisible = true
},
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
...@@ -364,8 +371,7 @@ export default { ...@@ -364,8 +371,7 @@ export default {
async handleExport() { async handleExport() {
await this.beforeSearchFn() await this.beforeSearchFn()
var params = this.searchFormSearch var params = this.searchFormSearch
params.method = params.method = "dj.smartcarlife.api.stockAllocate.exportExcel.async"
"dj.smartcarlife.api.stockAllocate.exportExcel.async excel"
const list = [ const list = [
...this.dowloadList, ...this.dowloadList,
{ {
...@@ -378,18 +384,39 @@ export default { ...@@ -378,18 +384,39 @@ export default {
this.actionSetDownloadList({ list, type: "dowloadList" }) this.actionSetDownloadList({ list, type: "dowloadList" })
}, },
// 查看 // // 查看
look(row) { // look(row) {
this.recordInfo = row // this.recordInfo = row
this.allocationDetailVisible = true // 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) { handleReview(row) {
this.$router.push({ this.$router.push({
name: "handleReview", name: "handleReview",
query: { query: {
id: row.id id: row.id,
allocateCode: row.allocateCode,
reviewType: "business"
} }
}) })
}, },
...@@ -399,11 +426,12 @@ export default { ...@@ -399,11 +426,12 @@ export default {
this.$router.push({ this.$router.push({
name: "handleReject", name: "handleReject",
query: { query: {
id: row.id id: row.id,
allocateCode: row.allocateCode,
reviewType: "business"
} }
}) })
}, },
gotoAdd() { gotoAdd() {
this.$router.push({ name: "addAllocation" }) this.$router.push({ name: "addAllocation" })
}, },
......
...@@ -74,12 +74,77 @@ ...@@ -74,12 +74,77 @@
ref="recordTable" ref="recordTable"
:table-data="tableData" :table-data="tableData"
:table-params="tableParams" :table-params="tableParams"
:table-total="tableTotal"
@refreshTable="refreshTable"
> >
<template slot="actionSlot" slot-scope="scope"> <template slot="actionSlot" slot-scope="scope">
<el-button type="text" @click="handleInventoryDetail(scope.row)" <el-button type="text" @click="handleInventoryDetail(scope.row)"
>库存明细</el-button >库存明细</el-button
> >
</template> </template>
<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>
<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> </d2-table>
</div> </div>
...@@ -232,6 +297,11 @@ ...@@ -232,6 +297,11 @@
> >
<el-button @click="handleCancel">取消</el-button> <el-button @click="handleCancel">取消</el-button>
</div> </div>
<stockDetailDialog
:visible.sync="stockDetailDialogVisible"
v-if="stockDetailDialogVisible"
:record-info="stockDetailInfo"
/>
</d2-container> </d2-container>
</template> </template>
...@@ -241,42 +311,55 @@ import { ...@@ -241,42 +311,55 @@ import {
stockAllocateOperatorAudit, stockAllocateOperatorAudit,
stockAllocateBusinessAudit, stockAllocateBusinessAudit,
getyqMerchantList, getyqMerchantList,
getServicemerchantrefList getServicemerchantrefList,
getTransferGoodsInfo
} from "@api/stockManage" } from "@api/stockManage"
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import { deepClone, Util } from "@/common/util" import { deepClone, Util } from "@/common/util"
import stockDetailDialog from "@/views/stockManage/stock/stockDetailDialog.vue"
export default { export default {
name: "TransferReviewHandle", name: "TransferReviewHandle",
components: {
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() { data() {
return { return {
stockDetailDialogVisible: false,
stockDetailInfo: {},
detailInfo: {}, detailInfo: {},
tableData: [], tableData: [],
tableTotal: 0,
auditRemark: "", auditRemark: "",
activeNames: ["1"], activeNames: ["1"],
loading: false, loading: false,
tableParams: { tableParams: {
tableOption: false, btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableColumns: [ tableColumns: [
{ {
label: "序号",
width: "60px",
formatter: (row, column, cellValue, index) => index + 1
},
{
label: "商品名称", label: "商品名称",
prop: "goodsName", prop: "goodsName"
width: "150px"
}, },
{ {
label: "商品编码", label: "商品编码",
prop: "productCode", prop: "productCode"
width: "150px"
}, },
{ {
label: "规格", label: "规格",
prop: "specificationData", prop: "specificationData"
width: "150px"
}, },
{ {
label: "系列", label: "系列",
...@@ -290,48 +373,58 @@ export default { ...@@ -290,48 +373,58 @@ export default {
label: "调拨数量", label: "调拨数量",
prop: "allocateNumber", prop: "allocateNumber",
formatter: (cellValue) => { 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( const unit = baseConfig.membraneTypeList.includes(
cellValue.goodsType cellValue.goodsType
) )
? "米" ? "卷"
: "件" : "件"
return cellValue.allocateNumber || cellValue.allocateNumber == 0 return qty === "-" ? "-" : `${qty}${unit}`
? parseFloat(cellValue.allocateNumber).toFixed(2) + unit
: "-"
} }
}, },
{ {
label: "调入门店库存", label: "调入门店库存",
prop: "inStockQty", prop: "inStockQty",
width: 150,
formatter: (cellValue) => { formatter: (cellValue) => {
const qty = cellValue.inStockQty ?? "-"
const unit = baseConfig.membraneTypeList.includes( const unit = baseConfig.membraneTypeList.includes(
cellValue.goodsType cellValue.goodsType
) )
? "米" ? "卷"
: "件" : "件"
return cellValue.inStockQty || cellValue.inStockQty == 0 return qty === "-" ? "-" : `${qty}${unit}`
? parseFloat(cellValue.inStockQty).toFixed(2) + unit
: "-"
} }
}, },
{ {
label: "调出门店库存", label: "调出门店库存",
prop: "outStockQty", prop: "outStockQty",
width: 150,
formatter: (cellValue) => { formatter: (cellValue) => {
const qty = cellValue.outStockQty ?? "-"
const unit = baseConfig.membraneTypeList.includes( const unit = baseConfig.membraneTypeList.includes(
cellValue.goodsType cellValue.goodsType
) )
? "米" ? "卷"
: "件" : "件"
return cellValue.outStockQty || cellValue.outStockQty == 0 return qty === "-" ? "-" : `${qty}${unit}`
? parseFloat(cellValue.outStockQty).toFixed(2) + unit
: "-"
} }
}, },
{ {
label: "膜卷号", label: "膜卷号",
prop: "filmRollNo", prop: "filmRollNo"
formatter: (cellValue) => cellValue.filmRollNo || "-"
} }
] ]
}, },
...@@ -363,7 +456,8 @@ export default { ...@@ -363,7 +456,8 @@ export default {
1: { rejectedStatus: "调拨商户" }, 1: { rejectedStatus: "调拨商户" },
2: { rejectedStatus: "运营审核" }, 2: { rejectedStatus: "运营审核" },
3: { rejectedStatus: "商务审核" } 3: { rejectedStatus: "商务审核" }
} },
userInfo: this.$store.state.d2admin.user.info
} }
}, },
computed: { computed: {
...@@ -371,7 +465,9 @@ export default { ...@@ -371,7 +465,9 @@ export default {
// 运营审核 parentId: 90809 // 运营审核 parentId: 90809
// 商务审核 parentId: 90810 // 商务审核 parentId: 90810
isOperatorReview() { isOperatorReview() {
return this.$route.meta.parentId == "90809" // 运营审核 reviewType: operator
// 商务审核 reviewType: business
return this.$route.query.reviewType == "operator"
} }
}, },
created() { created() {
...@@ -393,9 +489,11 @@ export default { ...@@ -393,9 +489,11 @@ export default {
const allocateCode = this.$route.query.allocateCode const allocateCode = this.$route.query.allocateCode
if (!allocateCode) return if (!allocateCode) return
this.getGoodsDetail({ currentPage: 1, pageSize: 10 })
stockAllocateInfo({ allocateCode }).then((res) => { stockAllocateInfo({ allocateCode }).then((res) => {
this.detailInfo = res || {} this.detailInfo = res || {}
this.tableData = res.stockAllocateDetailList || [] // this.tableData = res.stockAllocateDetailList || []
this.originalAuditDetaiList = res.auditDetaiList || [] this.originalAuditDetaiList = res.auditDetaiList || []
if ( if (
this.originalAuditDetaiList && this.originalAuditDetaiList &&
...@@ -453,7 +551,11 @@ export default { ...@@ -453,7 +551,11 @@ export default {
} }
}, },
handleInventoryDetail(row) { handleInventoryDetail(row) {
this.$message.info("查看库存明细功能开发中") this.stockDetailInfo = {
upgradeGoodsId: row.goodsId,
yqMerchantId: this.detailInfo.callOutYqMerchantId
}
this.stockDetailDialogVisible = true
}, },
handleUpDown() { handleUpDown() {
this.auditDetaiList = this.isVisible this.auditDetaiList = this.isVisible
...@@ -467,14 +569,23 @@ export default { ...@@ -467,14 +569,23 @@ export default {
}) })
}, },
handleSubmit() { handleSubmit() {
const params = { let params = {}
if (this.isOperatorReview) {
params = {
allocateCode: this.detailInfo.allocateCode,
remark: this.auditRemark,
updatedBy: this.userInfo.detail ? this.userInfo.detail.userName : ""
}
} else {
params = {
allocateCode: this.detailInfo.allocateCode, allocateCode: this.detailInfo.allocateCode,
callOutYqMerchantId: this.detailInfo.callOutYqMerchantId, callOutYqMerchantId: this.detailInfo.callOutYqMerchantId,
callOutYqMerchantName: this.detailInfo.callOutYqMerchantName, callOutYqMerchantName: this.detailInfo.callOutYqMerchantName,
callOutMerchantId: this.detailInfo.callOutMerchantId, callOutMerchantId: this.detailInfo.callOutMerchantId,
callOutMerchantName: this.detailInfo.callOutMerchantName, callOutMerchantName: this.detailInfo.callOutMerchantName,
remark: this.auditRemark, remark: this.auditRemark,
id: this.detailInfo.id // 补充 id,虽然用户没列出,但通常需要 id: this.detailInfo.id
}
} }
this.loading = true this.loading = true
...@@ -496,6 +607,20 @@ export default { ...@@ -496,6 +607,20 @@ export default {
tagName: this.$route.fullPath tagName: this.$route.fullPath
}) })
this.$router.go(-1) this.$router.go(-1)
},
refreshTable(pageObj) {
this.getGoodsDetail(pageObj)
},
getGoodsDetail(pageObj) {
const allocateCode = this.$route.query.allocateCode
getTransferGoodsInfo({
allocateCode: allocateCode,
pageSize: pageObj.pageSize,
currentPage: pageObj.currentPage
}).then((res) => {
this.tableData = res.list || []
this.tableTotal = res.total
})
} }
} }
} }
......
...@@ -47,12 +47,12 @@ ...@@ -47,12 +47,12 @@
</div> </div>
</d2-container> </d2-container>
<!-- 查看 --> <!-- 查看 -->
<!-- <allocation-detail-dialog <transferDetailDialog
:allocation-detail-visible="allocationDetailVisible" :visible.sync="transferDetailVisible"
:record-info="recordInfo" v-if="transferDetailVisible"
v-if="allocationDetailVisible" :params-obj="transferObj"
@dialogClose="dialogClose" :hideContact="true"
/> --> />
</div> </div>
</template> </template>
...@@ -71,6 +71,7 @@ export default { ...@@ -71,6 +71,7 @@ export default {
name: "TransferOperationsReviewList", name: "TransferOperationsReviewList",
components: { components: {
// allocationDetailDialog // allocationDetailDialog
transferDetailDialog: () => import("../components/transferDetailDialog.vue")
}, },
data() { data() {
return { return {
...@@ -279,8 +280,8 @@ export default { ...@@ -279,8 +280,8 @@ export default {
] ]
}, },
allocationDetailVisible: false, transferDetailVisible: false,
recordInfo: null transferObj: {}
} }
}, },
computed: { computed: {
...@@ -364,8 +365,7 @@ export default { ...@@ -364,8 +365,7 @@ export default {
async handleExport() { async handleExport() {
await this.beforeSearchFn() await this.beforeSearchFn()
var params = this.searchFormSearch var params = this.searchFormSearch
params.method = params.method = "dj.smartcarlife.api.stockAllocate.exportExcel.async"
"dj.smartcarlife.api.stockAllocate.exportExcel.async excel"
const list = [ const list = [
...this.dowloadList, ...this.dowloadList,
{ {
...@@ -380,8 +380,10 @@ export default { ...@@ -380,8 +380,10 @@ export default {
// 查看 // 查看
look(row) { look(row) {
this.recordInfo = row this.transferObj = {
this.allocationDetailVisible = true allocateCode: row.allocateCode
}
this.transferDetailVisible = true
}, },
// 审批 // 审批
...@@ -390,7 +392,8 @@ export default { ...@@ -390,7 +392,8 @@ export default {
name: "handleReview", name: "handleReview",
query: { query: {
id: row.id, id: row.id,
allocateCode: row.allocateCode allocateCode: row.allocateCode,
reviewType: "operator"
} }
}) })
}, },
...@@ -400,7 +403,9 @@ export default { ...@@ -400,7 +403,9 @@ export default {
this.$router.push({ this.$router.push({
name: "handleReject", name: "handleReject",
query: { query: {
id: row.id id: row.id,
allocateCode: row.allocateCode,
reviewType: "operator"
} }
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!