Commit d048d49b by 王琦琳

Merge branch 'wangql_dev_v4.22.0' into 'dev_v4.22.0'

提交部分功能代码

See merge request !181
2 parents 1b727bcf e117ad0e
...@@ -626,7 +626,13 @@ export const invouceType = [ ...@@ -626,7 +626,13 @@ export const invouceType = [
] ]
// 服务商管理 采购模式 // 服务商管理 采购模式
export const procureModeList = [ export const procureModeList = [
{ confId: 1, confName: '直营' }, { confId: 1, confName: "直营" },
{ confId: 2, confName: '批发' }, { confId: 2, confName: "批发" },
{ confId: 3, confName: '代销' } { confId: 3, confName: "代销" }
]
//开店审核 申请状态
export const applyStatus = [
{ confId: 1, confName: "待审核" },
{ confId: 2, confName: "已审核" },
{ confId: 3, confName: "已驳回" }
] ]
...@@ -580,5 +580,42 @@ export const routerName = { ...@@ -580,5 +580,42 @@ export const routerName = {
activePath: "/deviceManage" activePath: "/deviceManage"
}, },
component: _import("systemConfig/deviceManage/deviceHistory") component: _import("systemConfig/deviceManage/deviceHistory")
},
90618: {
path: "/openshopProcess",
name: "openshopProcess",
meta: {
title: "开店审核",
authId: "90618",
parentId: "906",
cache: false
},
auth: [
{
authId: "9061801",
parentId: "90618",
label: "审核",
ruleObj: {
attr: "status",
rule: {
1: "审核"
}
},
handle: "handleCheck"
},
{
authId: "9061802",
parentId: "90618",
label: "驳回",
ruleObj: {
attr: "status",
rule: {
1: "驳回"
}
},
handle: "handleReject"
}
],
component: _import("systemConfig/OpenshopProcess/index")
} }
} }
...@@ -28,6 +28,12 @@ ...@@ -28,6 +28,12 @@
:table-total="detailInfo.tableTotal"> :table-total="detailInfo.tableTotal">
</d2-table> </d2-table>
</div> </div>
<div class="examine-record">
<div class="title">审核记录</div>
<div>
<div><span><span class="dot"></span></span></div>
</div>
</div>
</div> </div>
</baseDialog> </baseDialog>
</template> </template>
...@@ -178,4 +184,30 @@ export default { ...@@ -178,4 +184,30 @@ export default {
min-width: 500px; min-width: 500px;
} }
} }
.examine-record {
width: 968px;
height: 157px;
background: #ffffff;
border: 1px solid #e5e5e5;
margin-top: 23px;
.title {
margin: 16px 20px;
width: 64px;
height: 22px;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 16px;
color: #333333;
text-align: center;
}
.dot {
width: 6px;
height: 6px;
background: #185efe;
border-radius: 6px;
display: inline-block;
}
}
</style> </style>
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import { defaultStatusOptions, defaultDeliveryStatusOptions, defaultPutStatusOptions } from './constant' import { defaultStatusOptions, defaultDeliveryStatusOptions, defaultPutStatusOptions, purchasingPatternOptions } from './constant'
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
import { getPurchaseOrderList, getMerchantList, purchaseOrderCancelOrCheck, purchaseOrderExport } from '@/api/purchaseShopping.js' import { getPurchaseOrderList, getMerchantList, purchaseOrderCancelOrCheck, purchaseOrderExport } from '@/api/purchaseShopping.js'
import orderDeatilDialog from './components/orderDetailDialog' import orderDeatilDialog from './components/orderDetailDialog'
...@@ -79,7 +79,8 @@ export default { ...@@ -79,7 +79,8 @@ export default {
// merchantId: '', // merchantId: '',
merchantName: '', merchantName: '',
sortType: 2, sortType: 2,
orderTimeStr: [] orderTimeStr: [],
purchasingPattern: ''
}, },
tableSearchForm: {}, tableSearchForm: {},
tableData: [], tableData: [],
...@@ -107,13 +108,13 @@ export default { ...@@ -107,13 +108,13 @@ export default {
// optionsName: 'merchantName' // optionsName: 'merchantName'
// }, // },
{ {
label: '下单门店', label: '下单商户',
name: 'merchantName', name: 'merchantName',
type: 'input', type: 'input',
isClear: true isClear: true
}, },
{ {
label: '订单状态', label: '状态',
name: 'status', name: 'status',
type: 'select', type: 'select',
optionList: [], optionList: [],
...@@ -129,6 +130,21 @@ export default { ...@@ -129,6 +130,21 @@ export default {
optionId: 'id', optionId: 'id',
optionLabel: 'label', optionLabel: 'label',
optionsName: 'defaultDeliveryStatusOptions' optionsName: 'defaultDeliveryStatusOptions'
},
{
label: '采购模式',
name: 'purchasingPattern',
type: 'select',
optionList: [],
optionId: 'id',
optionLabel: 'label',
optionsName: 'purchasingPatternOptions'
}, {
label: '发货主体',
name: 'sendOutMerchantName',
type: 'input',
isClear: true,
maxlength: 50
} }
], ],
getListApi: getPurchaseOrderList, getListApi: getPurchaseOrderList,
...@@ -174,6 +190,17 @@ export default { ...@@ -174,6 +190,17 @@ export default {
prop: 'contactAddress' prop: 'contactAddress'
}, },
{ {
label: '采购模式',
prop: 'purchasingPattern',
formatter: (cellValue) => {
return purchasingPatternOptions.find(item => item.id == cellValue.purchasingPattern)?.label || '-'
}
},
{
label: '发货主体',
prop: 'sendOutMerchantName'
},
{
label: '发货状态', label: '发货状态',
prop: 'deliveryStatus', prop: 'deliveryStatus',
formatter: (cellValue) => { formatter: (cellValue) => {
...@@ -187,7 +214,7 @@ export default { ...@@ -187,7 +214,7 @@ export default {
} }
}, },
{ {
label: '订单状态', label: '状态',
prop: 'status', prop: 'status',
formatter: (cellValue) => { formatter: (cellValue) => {
return defaultStatusOptions.find(item => item.id == cellValue.status).label || '-' return defaultStatusOptions.find(item => item.id == cellValue.status).label || '-'
...@@ -243,7 +270,8 @@ export default { ...@@ -243,7 +270,8 @@ export default {
this.baseData = { this.baseData = {
defaultStatusOptions: deepClone(defaultStatusOptions), defaultStatusOptions: deepClone(defaultStatusOptions),
defaultDeliveryStatusOptions: deepClone(defaultDeliveryStatusOptions), defaultDeliveryStatusOptions: deepClone(defaultDeliveryStatusOptions),
defaultPutStatusOptions: deepClone(defaultPutStatusOptions) defaultPutStatusOptions: deepClone(defaultPutStatusOptions),
purchasingPatternOptions: deepClone(purchasingPatternOptions)
} }
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName]) { if (item.type === 'select' && this.baseData[item.optionsName]) {
......
...@@ -153,6 +153,12 @@ export default { ...@@ -153,6 +153,12 @@ export default {
return (cellValue.warningValue || cellValue.warningValue == 0) ? parseFloat(cellValue.warningValue).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-' return (cellValue.warningValue || cellValue.warningValue == 0) ? parseFloat(cellValue.warningValue).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
} }
}, { }, {
label: '最高库存',
prop: 'warningValueMax',
formatter: (cellValue) => {
return (cellValue.warningValueMax || cellValue.warningValueMax == 0) ? parseFloat(cellValue.warningValueMax).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
}
}, {
label: '所属仓库', label: '所属仓库',
prop: 'yqMerchantName', prop: 'yqMerchantName',
width: '200px' width: '200px'
......
<!-- 发货单 -->
<template>
<div>
<d2-container>
<div class="header"
slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
labelWidth="100px"
:search-form="searchForm"
:form-data="showFormData" />
<div class="up-btns">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope" />
</d2-table>
</div>
<baseDialog v-if="rejectVisible"
:is-show.sync="rejectVisible"
:config="rejectConfig.setting"
:dialog-config="rejectConfig.config"
@closeDialog="handleRejectClose">
<div class="reject-dialog">
<el-form :rules="rejectRules"
:model="rejectData"
label-width="150px"
ref="delivery-dialog-form">
<el-form-item label="驳回原因:"
prop="rejectCause">
<el-input type="textarea"
placeholder="请输入驳回原因"
maxlength="50"
show-word-limit
v-model.trim="rejectData.rejectCause"
class="dis-in-block reject-input" />
</el-form-item>
</el-form>
</div>
<div class="footer">
<el-button @click="handleRejectClose">取消</el-button>
<el-button @click="handleRejectConfirm"
type="primary"
v-preventReClick
:loading="$store.state.d2admin.loading.value">确认</el-button>
</div>
</baseDialog>
</d2-container>
</div>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { getPurchaseOrderList } from '@/api/purchaseShopping.js'
import { applyStatus } from '@/common/constants.js'
export default {
name: 'OpenshopProcessIndex',
components: {
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
searchForm: {
deliveryNumber: '',
deliveryCompany: '',
deliveryDate: '',
orderCode: '',
merchantName: '',
putStatus: ''
},
searchFormSearch: {},
showFormData: [{
label: '商户名称',
name: 'deliveryNumber',
type: 'input',
maxlength: '20',
isClear: true
},
{
label: '所属服务商',
name: 'deliveryCompany',
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '申请状态',
name: 'putStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'applyStatus'
}],
getListApi: getPurchaseOrderList,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: true,
tableColumns: [{
label: '商户名称',
prop: 'deliveryNumber',
width: '200px'
}, {
label: '联系人',
prop: 'deliveryCompany',
width: '150px'
}, {
label: '联系电话',
prop: 'deliveryDate',
width: '150px'
}, {
label: '商户类型',
prop: 'orderCode',
width: '200px'
}, {
label: '所属服务中心',
prop: 'merchantName',
width: '150px'
}, {
label: '所属服务商',
prop: 'merchantName',
width: '150px'
}, {
label: '申请时间',
prop: 'orderTime',
width: '150px',
formatter: (cellValue) => {
return cellValue.orderTime ? Util.dateFormate(cellValue.orderTime, 'YYYY-MM-DD HH:mm:ss') : ''
}
}, {
label: '申请状态',
prop: 'putStatus',
formatter: (cellValue) => {
return this.baseData.applyStatus.find(item => item.confId === cellValue.putStatus)?.confName
},
className: (cellValue) => {
return {
1: 'yellowSpot',
2: 'greenSpot',
3: 'red'
}[cellValue.putStatus]
}
}, {
label: '审核人',
prop: 'merchantName',
width: '150px'
}, {
label: '审核时间',
prop: 'orderTime',
width: '150px',
formatter: (cellValue) => {
return cellValue.orderTime ? Util.dateFormate(cellValue.orderTime, 'YYYY-MM-DD HH:mm:ss') : ''
}
}
]
},
baseData: {
applyStatus: applyStatus,
},
detailVisible: false,
recordInfo: null,
rejectVisible: false,
rejectData: {},
// 驳回
rejectConfig: {
setting: {
showClose: true,
appendToBody: true,
btnList: [
]
},
config: {
title: '驳回提示',
width: '750px'
}
},
rejectRules: {
rejectCause: [{ required: true, message: '请输入驳回原因', trigger: 'blur' }]
},
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
this.getBaseData()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() {
this.getOptionsList()
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.deliveryDate) {
this.searchFormSearch.deliveryDateStart = Util.dateFormate(this.searchFormSearch.deliveryDate[0], 'YYYY-MM-DD 00:00:00')
this.searchFormSearch.deliveryDateEnd = Util.dateFormate(this.searchFormSearch.deliveryDate[1], 'YYYY-MM-DD 23:59:59')
delete this.searchFormSearch.deliveryDate
}
resolve()
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
const temp = {}
temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部'
this.baseData[item.optionsName].unshift(temp)
}
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
handleSearch() {
this.$refs.recordTable.refreshTable()
},
handleReset() {
this.searchForm = {
deliveryNumber: '',
deliveryCompany: '',
deliveryDate: '',
orderCode: '',
merchantName: '',
putStatus: ''
}
this.$refs.recordTable.refreshTable()
},
// 审核
handleCheck(row) {
this.$confirm(`审核通过后,系统会自动创建对应的商户;是否确定审核?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
purchaseOrderCancelOrCheck({
orderCode: row.orderCode,
operateType: 1
}).then(() => {
this.notice.okTips()
this.$refs.purchasementReviewTable.refreshTable()
}).catch(() => { })
})
},
// 驳回
handleRejectClose() {
this.rejectVisible = !this.rejectVisible
},
handleReject(row) {
this.rejectData.orderCode = row.orderCode
this.handleRejectClose()
},
handleRejectConfirm() {
this.$refs['delivery-dialog-form'].validate(valid => {
if (valid) {
purchaseOrderReject({ ...this.rejectData }).then(res => {
this.handleRejectClose()
this.notice.okTips()
this.$refs.purchaseAndDeliveryTable.refreshTable()
}).catch(() => {
this.handleRejectClose()
})
}
})
},
}
}
</script>
<style lang="scss" scoped>
.reject-dialog {
margin: 65px 0;
.reject-input .el-textarea__inner {
height: 79px;
width: 432px;
}
.el-textarea .el-input__count {
right: 90px;
bottom: -10px;
font-size: 12px;
color: #999999;
}
.tips {
color: #999999;
}
}
.footer {
display: flex;
justify-content: end;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!