Commit a067577e by 张立顺

bug修复

1 parent 65e84471
......@@ -2,58 +2,42 @@
<div>
<div class="d2-mr personal-wrap">
<!-- <p class="bg-blue-500 text-5xl">111111</p> -->
<i class="el-icon-s-tools"
style="marginRight:20px;cursor:pointer"
v-if="userInfo.beSuper"
@click="setTitle" />
<el-popover ref="popover1"
placement="top-start"
width="400"
@show="redPotShow = false"
popper-class="popper"
v-model="visible"
trigger="hover">
<i class="el-icon-s-tools" style="marginRight:20px;cursor:pointer" v-if="userInfo.beSuper" @click="setTitle" />
<el-popover ref="popover1" placement="top-start" width="400" @show="redPotShow = false" popper-class="popper"
v-model="visible" trigger="hover">
<p class="title">
导出和导入任务
</p>
<p class="tips">
导出和导入任务加载完成后将自动进行下载,加载过程中不要离开系统,否则将导致任务自动清空
</p>
<div v-for="(item,index) in dowloadList"
:key="index"
class="downloadSty">
<div v-for="(item, index) in dowloadList" :key="index" class="downloadSty">
<span class="one-line-ellipsis downName">{{ item.name }}</span>
<span class="downLabel"> {{ item.labelText?item.labelText:'导出中' }}</span>
<span class="downLabel"> {{ item.labelText ? item.labelText : '导出中' }}</span>
</div>
<div v-for="(item,index) in updateList"
:key="index+'a'"
class="updateListClass">
<div v-if="item.progress!= 100">
<div v-for="(item, index) in updateList" :key="index + 'a'" class="updateListClass">
<div v-if="item.progress != 100">
<p>{{ item.name }}</p>
<el-progress :percentage="item.progress?item.progress:2" />
<el-progress :percentage="item.progress ? item.progress : 2" />
</div>
<div v-else>
<p>{{ item.name||'' }}</p>
<p>{{ item.name || '' }}</p>
<p>成功{{ item.succNum }}条<span v-if="item.failNum">,失败{{ item.failNum }}条</span></p>
</div>
</div>
<!-- @click="test" -->
<span slot="reference">
<i class="el-icon-bell tipsIcon "
:class="{'redPot':redPotShow }" />
<i class="el-icon-bell tipsIcon " :class="{ 'redPot': redPotShow }" />
</span>
</el-popover>
<span v-if="show"
class="btn-text">{{ info && info.detail ? (info.detail.userType == 2 ? `${info.detail.userName}` : '管理员') : '未登录' }}</span>
<span class="btn-text out-txt"
@click="clear">退出</span>
<span v-if="show" class="btn-text">{{ info && info.detail ? (info.detail.userType == 2 ? `${info.detail.userName}` :
'管理员') : '未登录' }}</span>
<span class="btn-text out-txt" @click="clear">退出</span>
</div>
<!-- 隐私协议 -->
<privacy-agreement-dialog :privacy-visible="privacyVisible"
v-if="privacyVisible"
@dialogClose="privacyClose" />
<privacy-agreement-dialog :privacy-visible="privacyVisible" v-if="privacyVisible" @dialogClose="privacyClose" />
</div>
</template>
......@@ -422,7 +406,8 @@ export default {
if (this.$router.currentRoute.name === 'index') {
reload()
} else {
this.$router.push({ name: 'index' })
// this.$router.push({ name: 'index' })
this.$router.push({ name: 'login' })
var _t = setInterval(() => {
if (this.$router.currentRoute.name === 'index') {
clearInterval(_t)
......@@ -470,12 +455,15 @@ export default {
.personal-wrap {
transform: translateY(-3px);
}
.personal-wrap .arrow-icon {
cursor: pointer;
}
.el-icon-arrow-down {
transition: all 0.2s ease-in-out;
}
.personal-wrap .arrow-icon.drOpen {
transform: rotate(-180deg);
}
......@@ -484,6 +472,7 @@ export default {
font-size: 12px;
position: relative;
}
.redPot::after {
content: "";
width: 6px;
......@@ -494,9 +483,11 @@ export default {
top: -2px;
right: -2px;
}
.popper {
padding: 20px 18px 16px;
z-index: 200;
.title {
font-weight: 600;
font-size: 16px;
......@@ -504,31 +495,38 @@ export default {
margin-top: 0;
color: #333;
}
.downloadSty {
display: flex;
align-items: center;
justify-content: space-between;
}
.downName {
width: 70%;
overflow: hidden;
}
.tips {
word-break: break-all;
font-size: 14px;
color: #333;
}
.updateListClass {
margin-bottom: 15px;
p {
margin: 5px 0;
}
}
}
.accout-panel {
left: -160px;
top: 0;
}
.accout-panel .panel-item {
overflow: hidden;
text-overflow: ellipsis;
......@@ -542,15 +540,19 @@ export default {
user-select: none;
cursor: pointer;
}
.accout-panel .i {
margin-right: 5px;
}
.accout-panel .hidden {
display: none;
}
.accout-panel .el-button--text {
color: #606266;
}
.setC {
margin-right: 20px;
}
......
......@@ -51,29 +51,20 @@
清空本地缓存
</div>
</div>-->
<div
class="panel-item"
@click="handleChangeAccount">
<el-button
type="text"
:disabled="accountInfo.accountList.length == 1">
<i class="i el-icon-sort" />{{ user && user.merchantAccountLevel ? (user.merchantAccountLevel == 4 ? `${user.detail.userName}` : '管理员') : '未登录' }}
<div class="panel-item" @click="handleChangeAccount">
<el-button type="text" :disabled="accountInfo.accountList.length == 1">
<i class="i el-icon-sort" />{{ user && user.merchantAccountLevel ? (user.merchantAccountLevel == 4 ?
`${user.detail.userName}` : '管理员') : '未登录' }}
</el-button>
</div>
<div
class="panel-item"
@click="clear">
<div class="panel-item" @click="clear">
<el-button type="text">
<i class="i el-icon-switch-button" />退出账户
</el-button>
</div>
</div>
<personal-dialog
:visible="personalVisible"
:user="info" />
<password-dialog
:visible="passwordVisible"
:user="info" />
<personal-dialog :visible="personalVisible" :user="info" />
<password-dialog :visible="passwordVisible" :user="info" />
</div>
</template>
......@@ -137,7 +128,7 @@ export default {
}
)
.then(() => {
const reload = async() => {
const reload = async () => {
localStorage.clear()
await this.logout()
this.$store.commit('d2admin/gray/set', false)
......@@ -171,7 +162,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
})
.then(async() => {
.then(async () => {
await this.$store.commit('d2admin/gray/set', false)
resolve(true)
})
......@@ -201,11 +192,13 @@ export default {
width: 182px;
background: #fff;
}
.personal-desc {
/* padding: 15px;
color: #fff; */
padding: 24px 0;
}
// .avatar {
// width: 80px;
// height: 80px;
......@@ -273,6 +266,7 @@ export default {
// background: #b1a6a61e;
// }
}
.personal-panel .panel-item {
overflow: hidden;
text-overflow: ellipsis;
......@@ -286,9 +280,11 @@ export default {
user-select: none;
cursor: pointer;
}
.personal-panel .i {
margin-right: 5px;
}
.personal-panel .el-button--text {
color: #606266;
}
......
......@@ -90,12 +90,13 @@ export default {
userInfo.detail.merchantId = userInfo.detail.merchantNo
var routeAll = util.permision.flatten(Object.values(localRoutes))
var indexPage = routeAll.find((item) => item.authId === "907")
routeAll.splice(
routeAll.findIndex((item) => item.authId === "907"),
1
)
routeAll.unshift(indexPage)
// var indexPage = routeAll.find((item) => item.authId === "907")
// routeAll.splice(
// routeAll.findIndex((item) => item.authId === "907"),
// 1
// )
// routeAll.unshift(indexPage)
// console.log(routeAll, "routeAll")
// if (userInfo.detail.accountType !== 7) {
......@@ -166,18 +167,21 @@ export default {
}
})
// tempAuths.
// var indexPage = tempAuths.find((item) => item.authId === "907")
// tempAuths.splice(
// tempAuths.findIndex((item) => item.authId === "907"),
// 1
// )
tempAuths.unshift(indexPage)
var indexPage = tempAuths.find((item) => item.authId === "907")
if (indexPage) {
tempAuths.splice(
tempAuths.findIndex((item) => item.authId === "907"),
1
)
tempAuths.unshift(indexPage)
}
// const authes = (+accountInfo.roleType === SUPPER_ADMIN) ?
// util.permision.flatten(Object.values(localRoutes))
// .map(obj => ({ authId: obj.authId, parentId: obj.parentId })) :
// tempAuths
// console.log(tempAuths)
console.log("tempAuths", tempAuths)
// console.log("tempAuths", tempAuths)
// debugger
const authes = tempAuths
await dispatch("d2admin/auth/set", authes, { root: true })
......
......@@ -60,25 +60,34 @@ export default {
*/
openedLoad({ state, commit, dispatch }) {
return new Promise(async (resolve) => {
const indexPage = await dispatch("getIndexPage")
// store 赋值
let value = await dispatch(
"d2admin/db/get",
{
dbName: "sys",
path: "page.opened",
defaultValue: [defaultPage],
// defaultValue: [defaultPage],
defaultValue: [indexPage],
user: true
},
{
root: true
}
)
if (value[0].fullPath !== INDEX_PATH) {
const index = value.some((page) => page.fullPath === INDEX_PATH)
// if (value[0].fullPath !== INDEX_PATH) {
// const index = value.some((page) => page.fullPath === INDEX_PATH)
// if (index) {
// value = value.filter((page) => page.fullPath !== INDEX_PATH)
// }
// value.unshift(indexPage)
// }
if (value[0].fullPath !== indexPage.path) {
const index = value.some((page) => page.fullPath === indexPage.path)
if (index) {
value = value.filter((page) => page.fullPath !== INDEX_PATH)
value = value.filter((page) => page.fullPath !== indexPage.path)
}
value.unshift(defaultPage)
value.unshift(indexPage)
}
// 在处理函数中进行数据优化 过滤掉现在已经失效的页签或者已经改变了信息的页签
// 以 fullPath 字段为准
......@@ -382,7 +391,9 @@ export default {
// dispatch('currentSet', _index)
// 持久化
// await dispatch('opend2db')
router.replace(INDEX_PATH)
const indexPage = await dispatch("getIndexPage")
router.replace(indexPage.path)
// router.replace(INDEX_PATH)
// end
resolve()
})
......@@ -464,6 +475,7 @@ export default {
*/
async currentGet({ state, dispatch }, fullPath) {
return new Promise(async (resolve) => {
const indexPage = await dispatch("getIndexPage")
const _current =
state.current ||
(await dispatch(
......@@ -471,7 +483,8 @@ export default {
{
dbName: "sys",
path: "page.current",
defaultValue: INDEX_PATH,
// defaultValue: INDEX_PATH,
defaultValue: indexPage.path,
user: true
},
{
......@@ -481,8 +494,14 @@ export default {
const _in = await dispatch("d2admin/menu/has", _current, {
root: true
})
console.log(_in, _current, "currentGet", INDEX_PATH)
resolve(_in ? _current : INDEX_PATH)
// const
// console.log(_in, _current, "currentGet", INDEX_PATH)
// console.log(rootState, "rootState.aside")
// const { aside } = rootState.d2admin.menu
// const indexPage = commit("getIndexPage")
// console.log(indexPage, "indexPage")
resolve(_in ? _current : indexPage.path)
})
},
/**
......@@ -523,12 +542,28 @@ export default {
state.opened.find((page) => page.name === name).meta.cache = true
dispatch("opend2db")
},
reset({ state }) {
state.pool = []
state.opened = [defaultPage]
state.openedLoaded = false
state.current = ""
state.keepAlive = []
},
// 动态获取首页 处理首页可能不是总览的问题
getIndexPage({ rootState }) {
return new Promise((resolve) => {
// state.current = path
// console.log(rootState, "rootState")
const { aside } = rootState.d2admin.menu
// console.log(aside[0], "aside[0]")
// console.log(aside, "aside[0]")
if (aside[0] && aside[0].authId != "907") {
resolve(aside[0].children[0])
}
// return
resolve(aside[0] || defaultPage)
})
}
},
mutations: {
......
<template>
<div>
<baseDialog :is-show.sync="dialogShow" :config="dialogConfig.setting" :dialog-config="dialogConfig.config" @closeDialog="handleDetailClose(false)">
<baseDialog :is-show.sync="dialogShow" :config="dialogConfig.setting" :dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose(false)">
<div class="edit-order-dialog" v-if="dialogShow">
<div class="addressTitle">
<img src="../images/addressIcon.webp" alt="" class="icon">
......@@ -12,18 +13,26 @@
<span class="address">收货地址:<span class="label">{{ detailInfo.contactAddress }}</span></span>
</div>
<div class="table-class">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" :has-page="hasPage" @refreshTable="refreshTable" :table-data="detailInfo.tableData" :table-total="detailInfo.tableTotal">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" :has-page="hasPage"
@refreshTable="refreshTable" :table-data="detailInfo.tableData" :table-total="detailInfo.tableTotal">
<div slot="nowPurNum" slot-scope="scope">
<div v-if="detailInfo.tableData[scope.index].purchaseNumber == 0 || detailInfo.tableData[scope.index].purchaseNumber != detailInfo.tableData[scope.index].goodsNumber">
<div
v-if="detailInfo.tableData[scope.index].purchaseNumber == 0 || detailInfo.tableData[scope.index].purchaseNumber != detailInfo.tableData[scope.index].goodsNumber">
<!-- 判断是否当前账户发货 -->
<el-input v-if="(isEmptyEdit && !detailInfo.tableData[scope.index].shipperUuid) || (detailInfo.tableData[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>
<el-input
v-if="(isEmptyEdit && !detailInfo.tableData[scope.index].shipperUuid) || (detailInfo.tableData[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 v-if="detailInfo.tableData[scope.index].shipperUuid != userInfo.detail.uuid">{{ detailInfo.tableData[scope.index].shipper }}</div> -->
<div v-else>{{ detailInfo.tableData[scope.index].shipper }}</div>
</div>
<div v-else>{{ detailInfo.tableData[scope.index].shipperUuid ? detailInfo.tableData[scope.index].shipper : '未分配' }}</div>
<div v-else>{{ detailInfo.tableData[scope.index].shipperUuid ? detailInfo.tableData[scope.index].shipper :
'未分配' }}</div>
</div>
<div slot="cardNum" slot-scope="scope">
<div v-if="detailInfo.tableData[scope.index].entityCardFlag != 'Y' || (detailInfo.tableData[scope.index].shipperUuid && detailInfo.tableData[scope.index].shipperUuid != userInfo.detail.uuid)">-</div>
<div
v-if="detailInfo.tableData[scope.index].entityCardFlag != 'Y' || (detailInfo.tableData[scope.index].shipperUuid && detailInfo.tableData[scope.index].shipperUuid != userInfo.detail.uuid)">
-</div>
<div v-else>
<div v-if="deliveryCardList[scope.index] && deliveryCardList[scope.index].length">
+{{ deliveryCardList[scope.index].length }}
......@@ -38,10 +47,12 @@
<div class="form-content">
<el-form label-width="100px" :rules="dialogRules" :model="dialogData" ref="delivery-dialog-form">
<el-form-item label="承运公司:" prop="deliveryCompany">
<el-input placeholder="请输入承运物流公司" maxlength="20" v-model.trim="dialogData.deliveryCompany" class="dis-in-block" />
<el-input placeholder="请输入承运物流公司" maxlength="20" v-model.trim="dialogData.deliveryCompany"
class="dis-in-block" />
</el-form-item>
<el-form-item label="承运单号:" prop="deliveryNumber">
<el-input maxlength="50" placeholder="请输入承运物流单号" v-model.trim="dialogData.deliveryNumber" class="dis-in-block" @input="deliveryNumberInput" />
<el-input maxlength="50" placeholder="请输入承运物流单号" v-model.trim="dialogData.deliveryNumber"
class="dis-in-block" @input="deliveryNumberInput" />
</el-form-item>
<el-form-item label="发货时间:" prop="deliveryDate">
<el-date-picker class="dis-in-block" v-model="dialogData.deliveryDate" type="datetime" placeholder="选择日期时间">
......@@ -52,11 +63,13 @@
<div class="footer">
<el-button @click="handleDetailClose(false)">取消</el-button>
<el-button @click="submit" type="primary" v-preventReClick :loading="$store.state.d2admin.loading.value">确认</el-button>
<el-button @click="submit" type="primary" v-preventReClick
:loading="$store.state.d2admin.loading.value">确认</el-button>
</div>
</div>
</baseDialog>
<card-dialog v-if="cardVisible" :card-visible="cardVisible" :order-info="orderInfo" :selected-list="selectedCardList" @handleClose="handleCardDialog" @handleConfirm="handleCardConfirm"></card-dialog>
<card-dialog v-if="cardVisible" :card-visible="cardVisible" :order-info="orderInfo" :selected-list="selectedCardList"
@handleClose="handleCardDialog" @handleConfirm="handleCardConfirm"></card-dialog>
</div>
</template>
......@@ -198,6 +211,13 @@ export default {
detailInfo: {}
}
},
mounted() {
console.log(this.paramsObj.factoryType, 'this.paramsObj.factoryType')
if (this.paramsObj.factoryType) {
this.tableParams.tableColumns = this.tableParams.tableColumns.filter(item => item.prop != 'goodsTotalPrice')
console.log(this.tableParams.tableColumns, 'this.tableParams.tableColumns')
}
},
methods: {
handleDetailClose(isRefresh = false) {
this.$emit('editClose', isRefresh)
......@@ -330,7 +350,7 @@ export default {
font-size: 14px;
color: #666666;
> span {
>span {
margin-right: 20px;
margin-bottom: 10px;
}
......
<!-- 发货单详情弹窗 -->
<template>
<d2-dialog title="详细信息" :is-visible="detailVisible" width="1000px" :no-cancel="true" btn-ok-label="关闭"
@closeDialog="handleClose" @confirmDialog="handleClose">
<div class="stockMonthDailog">
<div class="detail-info orderCode">
<div>
订单号:
<span>{{ recordInfo.orderCode }}</span>
</div>
</div>
<div class="address-info" v-show="detailInfo[0]">
<span class="name">收货人:<span class="label">{{ detailInfo[0].contactName }}</span></span>
<span class="phone">电话:<span class="label">{{ detailInfo[0].contactPhone }}</span></span>
<span class="address">收货地址:<span class="label">{{ detailInfo[0].contactAddress }}</span></span>
</div>
<div v-for="(itemList, index) in detailInfo" :key="index">
<div class="detail-info">
<div>
发货单号:
<span>{{ itemList.deliveryNumber }}</span>
</div>
<div>
承运公司:
<span>{{ itemList.deliveryCompany }}</span>
</div>
<div>
发货时间:
<span>{{ itemList.deliveryDate }}</span>
</div>
</div>
<d2-table ref="recordTable" :table-data="itemList.deliveryDetailList" :table-params="tableParams"
:has-page="false">
</d2-table>
</div>
</div>
</d2-dialog>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
// import { purchaseOrderDeliveryDetail } from '@/api/purchaseShopping.js'
import { purchaseOrderDeliveryPage } from '@/api/purchaseShopping.js'
import { membraneTypeList } from '@/common/constants.js'
export default {
name: 'FactoryDeliveryDetailDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: membraneTypeList,
detailInfo: {},
searchFormSearch: {},
tableData: [],
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
// singleSelectUniqueKey: 'id',
tableOption: false,
tableColumns: [
{
label: '商品名称',
prop: 'upgradeGoodsName'
// width: 150
},
{
label: '商品编码',
prop: 'goodsCode'
// width: 150
},
{
label: '已发货数量',
prop: 'purchaseNumber',
// width: 110,
formatter: cellValue => {
return membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber}卷` : `${cellValue.purchaseNumber}件`
}
},
{
label: '发货卡号',
prop: 'purchaseNumber',
formatter: cellValue => {
return membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber}卷` : `${cellValue.purchaseNumber}件`
}
// width: '200px'
}
// {
// label: '入库数量',
// prop: 'increaseStockNum',
// // width: '200px'
// formatter: (cellValue) => {
// return (cellValue.increaseStockNum || cellValue.increaseStockNum == 0) ? parseFloat(cellValue.increaseStockNum).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
// }
// }, {
// label: '入库仓库',
// prop: 'yqMerchantName'
// // width: '150px'
// },
]
},
baseData: {
},
merchantDialogVisible: false
}
},
props: {
visible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => { }
}
},
computed: {
detailVisible: {
get() {
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
},
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 = { orderCode: deepClone(this.recordInfo.orderCode), currentPage: 1, pageSize: 1000 }
purchaseOrderDeliveryPage(params).then(res => {
console.log(res, 'res')
this.detailInfo = res.list
this.detailInfo.forEach(item => {
if (item.deliveryDate) {
item.deliveryDate = Util.dateFormate(item.deliveryDate, 'YYYY-MM-DD HH:mm')
}
const _deliveryDetailList = item.deliveryDetailList
console.log(_deliveryDetailList, '_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.deliveryDetailList.forEach(info => {
// info.goodsWarehousingList.forEach(item => {
// item.goodsType = info.goodsType
// })
// })
})
})
},
handleClose() {
// this.$emit('dialogClose')
this.detailVisible = false
}
}
}
</script>
<style lang="scss" scoped>
.stockMonthDailog {
// ::v-deep.el-dialog {
max-height: 60vh;
overflow: auto;
// }
}
.address-info {
display: flex;
box-sizing: border-box;
align-items: center;
// justify-content: space-between;
flex-wrap: wrap;
width: 100%;
// height: 36px;
// padding: 0 20px;
margin-top: 10px;
font-size: 14px;
color: #666666;
>span {
margin-right: 20px;
margin-bottom: 10px;
}
.label {
color: #333333;
}
.address {
// min-width: 500px;
}
}
.detail-info {
display: flex;
align-items: center;
justify-content: space-between;
color: #666666ff;
font-size: 14px;
margin-top: 16px;
span {
color: #333333ff;
}
.add-btn {
font-size: 14px;
color: #5850ff;
cursor: pointer;
}
}
.orderCode {
margin-top: 0;
}
.table-wrap {
border: 1px solid #e5e5e5;
padding: 16px;
box-sizing: border-box;
margin-top: 16px;
}
</style>
<template>
<baseDialog :is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose">
<div class="detail-content"
v-if="dialogShow">
<baseDialog :is-show.sync="dialogShow" :config="dialogConfig.setting" :dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose">
<div class="detail-content" v-if="dialogShow">
<div class="addressTitle">
<img src="../images/addressIcon.webp"
alt=""
class="icon">
<img src="../images/addressIcon.webp" alt="" class="icon">
<span class="title">{{ paramsObj.merchantName }}</span>
</div>
<div class="address-info">
......@@ -21,31 +16,23 @@
<span class="address">驳回原因:<span class="label">{{ detailInfo.rejectCause }}</span></span>
</div> -->
<div class="table-class">
<d2-table ref="purchaseOrderDetailTable"
:table-params="tableParams"
@refreshTable="refreshTable"
:table-data="detailInfo.tableData"
:table-total="detailInfo.tableTotal">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" @refreshTable="refreshTable"
:table-data="detailInfo.tableData" :table-total="detailInfo.tableTotal">
</d2-table>
</div>
<div class="examine-record"
v-if="detailInfo.auditDetaiList">
<div class="examine-record" v-if="detailInfo.auditDetaiList && !paramsObj.factoryType">
<div class="title">审核记录</div>
<div class="record-div">
<div class="record-div-d"
v-for="(item, index) in detailInfo.auditDetaiList"
:key="index">
<div class="record-div-d" v-for="(item, index) in detailInfo.auditDetaiList" :key="index">
<span class="dot"></span>
<span
class="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</span><span
class="span-txt-two">
<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>
<span class="span-txt-two">审核人:{{ item.reviewedBy }}</span>
<span class="span-txt-two">审核时间:{{ item.reviewedDateFormat }}</span>
<span class="span-txt-two"
v-if="[4,6,7].includes(item.status)">驳回原因:{{ item.rejectCause }}</span>
<span class="span-txt-two" v-if="[4, 6, 7].includes(item.status)">驳回原因:{{ item.rejectCause }}</span>
</div>
<!-- <div class="record-div-d"><span class="dot"></span><span
class="span-txt-one">运营审核</span><span class="span-txt-two">通过</span><span
......@@ -94,6 +81,7 @@ export default {
},
mounted() {
this.dynamicParams()
// this.getDetail()
},
data() {
return {
......@@ -214,6 +202,9 @@ export default {
}
)
}
if (this.paramsObj.factoryType) {
this.tableParams.tableColumns = this.tableParams.tableColumns.filter(item => item.prop != 'goodsTotalPrice')
}
},
handleDetailClose() {
......@@ -275,7 +266,7 @@ export default {
font-size: 14px;
color: #666666;
> span {
>span {
margin-right: 20px;
margin-bottom: 10px;
}
......
......@@ -50,8 +50,9 @@
</div>
</d2-table>
</div>
<orderDeatilDialog :visible.sync="detailVisible" v-if="detailVisible" :params-obj="paramsObj"></orderDeatilDialog>
<EditOrderDialog v-if="editVisible" :page="'factory'" :visible.sync="editVisible" :params-obj="dialogData" @editClose="editClose">
<orderDeatilDialog :visible.sync="detailVisible" v-if="detailVisible" :record-info="paramsObj"></orderDeatilDialog>
<EditOrderDialog v-if="editVisible" :page="'factory'" :visible.sync="editVisible" :params-obj="dialogData"
@editClose="editClose">
</EditOrderDialog>
<!-- :config="rejectConfig.setting" :dialog-config="rejectConfig.config" :config="rejectConfig.setting"-->
<baseDialog :is-show.sync="rejectVisible" :dialog-config="rejectConfig.config" @handleClick="handleRejectConfirm">
......@@ -80,11 +81,11 @@ import { deepClone } from '@/common/util'
import { defaultStatusOptions, defaultStatusOptionsForTable, defaultDeliveryStatusOptions, defaultPutStatusOptions, purchasingPatternOptions } from './constant'
import { mapActions, mapState } from 'vuex'
import { warehousedeliverPage, getMerchantList, purchaseOrderReject } from '@/api/purchaseShopping.js'
import orderDeatilDialog from './components/orderDetailDialog'
import orderDeatilDialog from './components/factoryDeliveryDetailDialog'
import EditOrderDialog from './components/EditOrderDialog'
// import { limitPrice } from '@/common/format'
export default {
name: 'PurchaseOrder',
name: 'FactoryPurchaseAndDelivery',
components: {
orderDeatilDialog,
EditOrderDialog
......@@ -154,24 +155,25 @@ export default {
label: '发货状态',
name: 'deliveryStatus',
type: 'select',
optionList: [
{
id: '',
label: '全部'
},
{
id: 1,
label: '未发货'
},
{
id: 2,
label: '已发货'
}
optionList:
[
// {
// id: '',
// label: '全部'
// },
// {
// id: 1,
// label: '未发货'
// },
// {
// id: 2,
// label: '已发货'
// }
],
],
optionId: 'id',
optionLabel: 'label'
// optionsName: 'defaultDeliveryStatusOptions'
optionLabel: 'label',
optionsName: 'defaultDeliveryStatusOptions'
}
// {
// label: '订单状态',
......@@ -273,7 +275,7 @@ export default {
label: '订单状态',
prop: 'status',
formatter: (cellValue) => {
return defaultStatusOptionsForTable.find(item => item.id == cellValue.status)?.label || '-'
return defaultStatusOptionsForTable.find(item => item.id == cellValue.status)?.label || '未发货'
},
className: (cellValue) => {
return {
......@@ -337,25 +339,25 @@ export default {
methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']),
// getBaseData(res) {
// const allOpt = {
// id: '',
// label: '全部'
// }
// this.baseData = {
// defaultStatusOptions: deepClone(defaultStatusOptions)
// // defaultDeliveryStatusOptions: deepClone(defaultDeliveryStatusOptions),
// // defaultPutStatusOptions: deepClone(defaultPutStatusOptions),
// // purchasingPatternOptions: deepClone(purchasingPatternOptions),
// // defaultStatusOptionsForTable: deepClone(defaultStatusOptionsForTable)
// }
// 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])
// }
// })
// },
getBaseData(res) {
const allOpt = {
id: '',
label: '全部'
}
this.baseData = {
// defaultStatusOptions: deepClone(defaultStatusOptions)
defaultDeliveryStatusOptions: deepClone(defaultDeliveryStatusOptions)
// defaultPutStatusOptions: deepClone(defaultPutStatusOptions),
// purchasingPatternOptions: deepClone(purchasingPatternOptions),
// defaultStatusOptionsForTable: deepClone(defaultStatusOptionsForTable)
}
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])
}
})
},
deliveryNumberInput(event, index) {
// if (!this.reg.priceReg.test(event)) {
// event = ''
......@@ -453,10 +455,11 @@ export default {
},
// 确认发货
handleDelivery(row) {
this.editVisible = true
this.dialogData.orderCode = row.orderCode
this.dialogData.merchantName = row.merchantName
this.$set(this.dialogData, 'factoryType', true)
this.$nextTick(() => {
this.dialogData.orderCode = row.orderCode
this.dialogData.merchantName = row.merchantName
this.editVisible = true
})
},
// 查看详情
......@@ -464,7 +467,8 @@ export default {
this.paramsObj = {
orderCode: row.orderCode,
merchantName: row.merchantName,
purchaseType: row.purchaseType
purchaseType: row.purchaseType,
factoryType: true
}
this.detailVisible = true
}
......
......@@ -245,8 +245,8 @@ export default {
} else {
const _current = userInfo.detail.accountType !== 7 ? await this.current() : '/onlineAccountList'
await this.initBaseData()
console.log(this.$route.query.redirect)
console.log(_current)
// console.log(this.$route.query.redirect)
// console.log(_current)
// return
this.$router.replace(this.$route.query.redirect || _current)
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!