Commit 256e86ce by 张立顺

Merge branch 'develop' into 'dev_v4.23.0'

Develop

See merge request !205
2 parents cc82a3a7 61daac62
......@@ -159,6 +159,12 @@ export function operatorreviewView(data) {
return request(data)
}
// 仓库/工厂发货-查看
export function factoryView(data) {
data.method = 'dj.api.smarcarlife.warehousedeliver.detail'
return request(data)
}
// 商务审核分页查询
export function businessreviewPage(data) {
data.method = `${path}businessreview.page`
......
......@@ -20,7 +20,7 @@
<d2-table ref="purchaseOrderDetailTable" :height="'500'" :table-params="tableParams" :has-page="hasPage" :has-num="hasNum" :table-data="tableList">
<div slot="cardOne" slot-scope="scope">
<template v-if="cardList.length > (inputConfig.rowNum * scope.index)">
<el-input :class="{ 'border-red': cardList[inputConfig.rowNum * scope.index].errorType }" :placeholder="inputConfig.placeholder" v-model="cardList[3 * scope.index].cardNum" :maxlength="inputConfig.maxLen" clearable @change="e => handleInput(e, scope, inputConfig.rowNum * scope.index)"></el-input>
<el-input :class="{ 'border-red': cardList[inputConfig.rowNum * scope.index].errorType }" :placeholder="inputConfig.placeholder" v-model="cardList[3 * scope.index].cardNum" :maxlength="inputConfig.maxLen" clearable @input="e => handleInput(e, scope, inputConfig.rowNum * scope.index)"></el-input>
<el-tooltip v-if="cardList[inputConfig.rowNum * scope.index].errorType" class="item" effect="light" :content="errorTypeObj[cardList[inputConfig.rowNum * scope.index].errorType]" placement="top-start">
<i class="el-icon-warning"></i>
</el-tooltip>
......@@ -29,7 +29,7 @@
</div>
<div slot="cardTwo" slot-scope="scope">
<template v-if="cardList.length > (inputConfig.rowNum * scope.index + 1)">
<el-input :class="{ 'border-red': cardList[inputConfig.rowNum * scope.index + 1].errorType }" :placeholder="inputConfig.placeholder" v-model="cardList[3 * scope.index + 1].cardNum" :maxlength="inputConfig.maxLen" clearable @change="e => handleInput(e, scope, (inputConfig.rowNum * scope.index + 1))"></el-input>
<el-input :class="{ 'border-red': cardList[inputConfig.rowNum * scope.index + 1].errorType }" :placeholder="inputConfig.placeholder" v-model="cardList[3 * scope.index + 1].cardNum" :maxlength="inputConfig.maxLen" clearable @input="e => handleInput(e, scope, (inputConfig.rowNum * scope.index + 1))"></el-input>
<el-tooltip v-if="cardList[inputConfig.rowNum * scope.index + 1].errorType" class="item" effect="light" :content="errorTypeObj[cardList[inputConfig.rowNum * scope.index + 1].errorType]" placement="top-start">
<i class="el-icon-warning"></i>
</el-tooltip>
......@@ -38,7 +38,7 @@
</div>
<div slot="cardThree" slot-scope="scope">
<template v-if="cardList.length > (inputConfig.rowNum * scope.index + 2)">
<el-input :class="{ 'border-red': cardList[inputConfig.rowNum * scope.index + 2].errorType }" :placeholder="inputConfig.placeholder" v-model="cardList[3 * scope.index + 2].cardNum" :maxlength="inputConfig.maxLen" clearable @change="e => handleInput(e, scope, (inputConfig.rowNum * scope.index + 2))"></el-input>
<el-input :class="{ 'border-red': cardList[inputConfig.rowNum * scope.index + 2].errorType }" :placeholder="inputConfig.placeholder" v-model="cardList[3 * scope.index + 2].cardNum" :maxlength="inputConfig.maxLen" clearable @input="e => handleInput(e, scope, (inputConfig.rowNum * scope.index + 2))"></el-input>
<el-tooltip v-if="cardList[inputConfig.rowNum * scope.index + 2].errorType" class="item" effect="light" :content="errorTypeObj[cardList[inputConfig.rowNum * scope.index + 2].errorType]" placement="top-start">
<i class="el-icon-warning"></i>
</el-tooltip>
......@@ -89,7 +89,7 @@
<div class="flex">
<el-input style="width: 284px; margin-right: 8px;" placeholder="请选择" show-word-limit v-model.trim="exportData.fileName" readonly class="dis-in-block" />
<el-button class="import-btn" type="text">
<input type="file" id="fileUpload" class="import-input" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" @change="handleChooseFile($event)">
<input type="file" id="fileUpload" class="import-input" accept="application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" @change="handleChooseFile($event)">
选择
</el-button>
</div>
......@@ -127,8 +127,8 @@ export default {
default: () => []
},
cardMaxNum: {
type: Number,
default: 0
type: String,
default: '0'
}
},
data() {
......@@ -342,6 +342,13 @@ export default {
},
handleChooseFile(e) {
const size = e.target.files[0].size / 1024 / 1024
const type = e.target.files[0].type
var filetypes = ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]
if (!filetypes.includes(type)) {
document.getElementById('fileUpload').value = ''
this.notice.errorTips('请按模版要求上传导入文件')
return true
}
if (size < 9) {
this.$set(this.exportData, 'fileName', e.target.files[0].name)
// // 转码base64
......@@ -371,6 +378,7 @@ export default {
handleInput(val, scope, idx) {
this.cardList[idx].errorType = ''
this.cardList[idx].cardNum = val.replace(/[\W]/g, '')
},
handleClose() {
......@@ -397,7 +405,7 @@ export default {
return true
}
const _cardList = this.cardList.map(item => item.cardNum)
checkCard({ strList: _cardList }).then(res => {
checkCard({ dataString: JSON.stringify(_cardList) }).then(res => {
if (res && res.length == this.cardList.length) {
if (this.cardList.length > this.cardMaxNum) {
this.notice.errorTips('添加数量与发货数量不一致,请确认后重新保存')
......
......@@ -3,7 +3,11 @@
<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">
<div class="address-info" v-if="paramsObj.factoryType">
<!-- <img src="../images/addressIcon.webp" alt="" class="icon"> -->
<span class="title">订单号 {{ paramsObj.orderCode }}</span>
</div>
<div class="addressTitle" v-else>
<img src="../images/addressIcon.webp" alt="" class="icon">
<span class="title">{{ paramsObj.merchantName }}</span>
</div>
......@@ -314,7 +318,7 @@ export default {
}
}
// console.log(params)
purchaseOrderDelivery(params).then(res => {
purchaseOrderDelivery({ dataString: JSON.stringify(params) }).then(res => {
this.handleDetailClose(true)
this.notice.okTips()
}).catch(() => {
......@@ -388,4 +392,5 @@ export default {
.edit-order-dialog .el-input--medium.border-red .el-input__inner {
border: 1px solid #eb4e4e;
}</style>
}
</style>
......@@ -22,7 +22,7 @@
<div class="detail-info">
<div>
商品名称:
<span>{{ item.goodsName }}</span>
<span>{{ item.upgradeGoodsName }}</span>
</div>
<div>
发货数量:
......
<!-- 发货单详情弹窗 -->
<template>
<div>
<d2-dialog title="详细信息" :is-visible="detailVisible" width="1000px" :no-cancel="true" btn-ok-label="关闭"
@closeDialog="handleClose" @confirmDialog="handleClose">
<baseDialog title="详细信息" :is-show.sync="detailVisible" :config="dialogConfig.setting"
:dialog-config="dialogConfig.config" width="1050px" :no-cancel="true" btn-ok-label="关闭" @closeDialog="handleClose"
@confirmDialog="handleClose">
<div class="stockMonthDailog">
<div class="detail-info orderCode">
<div>
......@@ -33,29 +34,36 @@
<d2-table ref="recordTable" :table-data="itemList.deliveryDetailList" :table-params="tableParams"
:has-page="false">
<span slot="deliveryCard" slot-scope="scope">
<template v-if="scope.scope.deliveryCardList">
<template v-if="scope.scope.deliveryCardList && scope.scope.deliveryCardList.length > 1">
<!-- {{ scope.scope.deliveryCardList.length || 0 }} -->
<span>+{{ scope.scope.deliveryCardList.length }} </span>
<el-button mini type="text" @click="handleDeliveryCard(scope.scope.deliveryCardList)">查看</el-button>
</template>
<template v-else-if="scope.scope.deliveryCardList && scope.scope.deliveryCardList.length == 1">
<!-- {{ scope.scope.deliveryCardList.length || 0 }} -->
<span>{{ scope.scope.deliveryCardList[0] }}</span>
<!-- <el-button mini type="text" @click="handleDeliveryCard(scope.scope.deliveryCardList)">查看</el-button> -->
</template>
<template v-else>-</template>
</span>
</d2-table>
</div>
</div>
</d2-dialog>
<d2-dialog title="查看发货卡号" :is-visible="handleDeliveryCardVisible" width="500px" :no-cancel="true" btn-ok-label="关闭"
</baseDialog>
<baseDialog title="查看发货卡号" :config="carDialogConfig.setting" :dialog-config="carDialogConfig.config"
:is-show.sync="handleDeliveryCardVisible" width="500px" :no-cancel="true" btn-ok-label="关闭"
@closeDialog="handleDeliveryCardVisible = false" @confirmDialog="handleDeliveryCardVisible = false">
<d2-table class="deliveryCardCon" ref="recordTable" :table-data="deliveryCardList" :table-params="innerParams"
:has-page="false">
</d2-table>
</d2-dialog>
</baseDialog>
</div>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { purchaseOrderDeliveryPage } from '@/api/purchaseShopping.js'
import { factoryView } from '@/api/purchaseShopping.js'
import { membraneTypeList } from '@/common/constants.js'
export default {
......@@ -72,6 +80,30 @@ export default {
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: [
]
},
config: {
title: '详细信息',
width: '1050px'
}
},
carDialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: [
]
},
config: {
title: '查看发货卡号',
width: '500px'
}
},
userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: membraneTypeList,
detailInfo: '',
......@@ -88,10 +120,10 @@ export default {
},
{
label: '商品编码',
prop: 'goodsCode'
prop: 'type'
},
{
label: '已发货数量',
label: '发货数量',
prop: 'purchaseNumber',
formatter: cellValue => {
return membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber}卷` : `${cellValue.purchaseNumber}件`
......@@ -151,12 +183,12 @@ export default {
getDetail() {
var params = { orderCode: deepClone(this.recordInfo.orderCode), currentPage: 1, pageSize: 1000 }
purchaseOrderDeliveryPage(params).then(res => {
factoryView(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')
item.deliveryDate = Util.dateFormate(item.deliveryDate, 'YYYY-MM-DD HH:mm:ss')
}
const _deliveryDetailList = item.deliveryDetailList
console.log(_deliveryDetailList, '_deliveryDetailList')
......
<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">
......@@ -16,23 +21,31 @@
<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 && !paramsObj.factoryType">
<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
......@@ -70,7 +83,7 @@ export default {
dialogShow: {
get() {
if (this.visible) {
this.getDetail({ currentPage: 1, pageSize: 20 })
this.getDetail({ currentPage: 1, pageSize: 10 })
}
return this.visible
},
......@@ -266,7 +279,7 @@ export default {
font-size: 14px;
color: #666666;
>span {
> span {
margin-right: 20px;
margin-bottom: 10px;
}
......
......@@ -29,7 +29,7 @@
:table-data="tableData" :get-list-api="getListApi" :before-search-fn="beforeSearchFn">
<div slot="auth-button" slot-scope="scope">
<!-- 查看 -->
<span style="margin-right: 10px;">
<span style="margin-right: 10px;" v-if="scope.scope.deliveryStatus != 1">
<auth-button :data="scope.scope" :show-btn-ids="['9090701']" />
</span>
<!-- 确认发货 -->
......@@ -165,19 +165,14 @@ export default {
label: '发货状态',
prop: 'status',
formatter: (cellValue) => {
return defaultStatusOptionsForTable.find(item => item.id == cellValue.status)?.label || '未发货'
return defaultDeliveryStatusOptions.find(item => item.id == cellValue.deliveryStatus)?.label || '未发货'
},
className: (cellValue) => {
return {
1: 'yellowSpot',
// 2: 'greenSpot',
3: 'ashSpot',
4: 'redSpot',
5: 'yellowSpot',
6: 'greenSpot',
7: 'redSpot',
8: 'redSpot'
}[cellValue.status]
1: 'ashSpot',
2: 'greenSpot',
3: 'yellowSpot'
}[cellValue.deliveryStatus] || 'ashSpot'
}
}
]
......
......@@ -11,7 +11,7 @@
:search-form="searchForm"
:form-data="showFormData" />
<div class="up-btns">
<el-button :id="tableParams.btnId"
<el-button @click="handleSearch"
size="small"
type="primary">
查询
......@@ -247,8 +247,9 @@ export default {
},
// 统计
vdCardCount(merchantId) {
vdCardCount({}).then(res => {
vdCardCount() {
let _params = this.searchFormSearch
vdCardCount(_params).then(res => {
this.statisticsData = res || []
})
},
......@@ -276,6 +277,7 @@ export default {
handleSearch() {
this.$refs.recordTable.refreshTable()
this.vdCardCount()
},
handleReset() {
this.searchForm = {
......
......@@ -156,7 +156,8 @@ export default {
confId: '4',
confName: '门店'
}]
}
},
logining: false
}
},
created() {
......@@ -185,6 +186,8 @@ export default {
this.isMutiAccount && (this.isMutiAccount = false)
},
handleSelectAccount(idx) {
if (this.logining) return false
this.logining = true
var currentItem = this.accountInfo.accountList[idx]
var params = {
loginAccount: currentItem.loginAccout,
......@@ -224,6 +227,8 @@ export default {
this.$router.replace(this.$route.query.redirect || _current)
})
})
}).finally(() => {
this.logining = false
})
},
// 提交登录信息
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!