Commit eb1a9cf4 by 李伟康

```

feat(invitation): 增加跟进记录功能并优化预约流程

- 新增 `followRecordListUpdate` 接口用于更新跟进记录
- 优化预约弹窗,新增流量有效性选择项
- 修改备注弹窗为跟进记录弹窗,支持列表展示和编辑
- 调整相关接口函数名及参数格式,统一代码风格
- 更新路由标签及按钮权限配置,适配新功能

refactor(stockManage): 退货管理模块字段及接口调整

- 将“check”相关命名替换为“refund”,统一语义
- 替换接口方法 `stockCheckPage` 为 `stockRefundPage`
- 更新退货类型展示逻辑,增加不良退货与呆滞退货分类
- 调整时间筛选参数格式,兼容新接口要求

feat(stockManage): 入库类型新增退料入库和自采入库选项

- 修改入库类型枚举值,细化入库场景分类
- 区分采购入库为商城采购入库,提升业务准确性

feat(stockManage): 出库类型新增退货出库选项

- 补充出库类型配置,支持退货出库业务场景

style(router): 更新路由标签文本,统一为"跟进记录"

- 将原“备注”标签修改为“跟进记录”,保持功能一致性
```
1 parent 349260d2
import request from "./request" import request from "./request"
const path = "dj.api.inviteRecord." const path = "dj.api.inviteRecord."
const pathInviteRecord = "dj.api.smartcarlife.inviteRecord." const pathInviteRecord = "dj.api.smartcarlife.inviteRecord."
const pathDj = "dj.api.smartcarlife." const pathDj = "dj.api.smartcarlife."
// 待预约、已预约总数查询 // 待预约、已预约总数查询
export function getTotalCount(data) { export function getTotalCount (data) {
data.method = `${path}count` data.method = `${path}count`
return request(data) return request(data)
} }
// 待预约、已预约总数查询 // 待预约、已预约总数查询
export function getList(data) { export function getList (data) {
data.method = `${path}search` data.method = `${path}search`
return request(data) return request(data)
} }
// 预约记录列表查询 // 预约记录列表查询
export function queryInviteRecord(data) { export function queryInviteRecord (data) {
data.method = `${pathInviteRecord}query` data.method = `${pathInviteRecord}query`
return request(data) return request(data)
} }
// 预约记录总数查询 // 预约记录总数查询
export function inviteRecordCount(data) { export function inviteRecordCount (data) {
data.method = `${pathInviteRecord}count` data.method = `${pathInviteRecord}count`
return request(data) return request(data)
} }
// 门店下拉列表查询 // 门店下拉列表查询
export function getInviteMerchant(data) { export function getInviteMerchant (data) {
data.method = `${pathInviteRecord}merchant.page` data.method = `${pathInviteRecord}merchant.page`
return request(data) return request(data)
} }
// 查询1.1场景登录权限下园区店信息 // 查询1.1场景登录权限下园区店信息
export function yqMerchantPage(data) { export function yqMerchantPage (data) {
data.method = `dj.api.sceneMerchantRef.shopMerchant.LoginPermissionYqMerchant.page` data.method = `dj.api.sceneMerchantRef.shopMerchant.LoginPermissionYqMerchant.page`
return request(data) return request(data)
} }
// 工位设置查询 // 工位设置查询
export function inviteStationSetGet(data) { export function inviteStationSetGet (data) {
data.method = `${pathDj}inviteStationSet.get` data.method = `${pathDj}inviteStationSet.get`
return request(data) return request(data)
} }
// 获取指定商户指定日期范围的邀约统计 // 获取指定商户指定日期范围的邀约统计
export function inviteStatMerchantList(data) { export function inviteStatMerchantList (data) {
data.method = `dj.api.smartcarlife.inviteStat.merchant.list` data.method = `dj.api.smartcarlife.inviteStat.merchant.list`
return request(data) return request(data)
} }
// 工位设置修改 // 工位设置修改
export function inviteStationSetUpdate(data) { export function inviteStationSetUpdate (data) {
data.method = `${pathDj}inviteStationSet.update` data.method = `${pathDj}inviteStationSet.update`
return request(data) return request(data)
} }
// 修改备注 // 修改备注
export function followRecordUpdate(data) { export function followRecordUpdate (data) {
data.method = `${pathInviteRecord}followRecord.update` data.method = `${pathInviteRecord}followRecord.update`
return request(data) return request(data)
} }
// 修改预约时间 // 修改预约时间
export function dateUpdate(data) { export function dateUpdate (data) {
data.method = `${pathInviteRecord}invite.dateUpdate` data.method = `${pathInviteRecord}invite.dateUpdate`
return request(data) return request(data)
} }
// 取消预约 // 取消预约
export function cancelInvite(data) { export function cancelInvite (data) {
data.method = `${pathInviteRecord}cancelInvite` data.method = `${pathInviteRecord}cancelInvite`
return request(data) return request(data)
} }
/**
* 跟进记录
*/
export function followRecordListUpdate (data) {
data.method = 'dj.api.smartcarlife.invite.followRecord.update'
return request(data, "post", [], "", 'boutique')
}
\ No newline at end of file \ No newline at end of file
...@@ -142,3 +142,15 @@ export function technicianUpdate(data) { ...@@ -142,3 +142,15 @@ export function technicianUpdate(data) {
data.method = `${path}MerchantGoodsStockReduceRecord.technician.update` data.method = `${path}MerchantGoodsStockReduceRecord.technician.update`
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 分页查询退货单列表
export function stockRefundPage(data) {
data.method = 'dj.smartcarlife.api.stock.refund.page'
return request(data, RequestMethods.POST)
}
// 分页查询退货单详细信息
export function stockRefundDetailPage(data) {
data.method = 'dj.smartcarlife.api.stock.refund.detail.page'
return request(data, RequestMethods.POST)
}
\ No newline at end of file \ No newline at end of file
...@@ -310,7 +310,7 @@ export const routerName = { ...@@ -310,7 +310,7 @@ export const routerName = {
{ {
authId: "9030608", authId: "9030608",
parentId: "90306", parentId: "90306",
label: "备注", label: "跟进记录",
handle: "handleRamrk" handle: "handleRamrk"
} }
], ],
......
<!-- 备注 --> <!-- 跟进记录 -->
<template> <template>
<baseDialog :dialog-config="dialogConfig" <baseDialog
:dialog-config="dialogConfig"
:is-show.sync="dialogShow" :is-show.sync="dialogShow"
class="accountDailog" class="accountDailog"
@handleClick="handleAddConfirm"> @handleClick="handleAddConfirm"
>
<div class="reject-dialog"> <div class="reject-dialog">
<glsx-combi-form class="edit-form-container" <d2-table
ref="formRef" :table-params="tableParams"
label-width="120px" :tableData="infoForm.remarks"
default-width="350px" :hasPage="false"
:form-ref="rejectRef" >
:form-obj="infoForm" <template
:form-data="editFormData" slot="ramark"
:form-rules="formRules"></glsx-combi-form> slot-scope="scope"
>
<template v-if="isEdit && scope.index == 0">
<el-input
v-model="scope.scope.remark"
type="text"
placeholder="请输入内容"
maxlength="15"
size="small"
></el-input>
</template>
<template v-else>
{{ scope.scope.remark || '-'}}
</template>
</template>
<template
slot="auth-button"
slot-scope="scope"
>
<template v-if="scope.index == 0">
<template v-if="isEdit">
<el-button
type="text"
size="mini"
@click="isEdit = false"
>
保存
</el-button>
<el-button
type="text"
size="mini"
@click="cancel"
>
取消
</el-button>
</template>
<template v-else>
<el-button
type="text"
size="mini"
@click="handleRamrk(scope.scope.remark)"
>
编辑备注
</el-button>
</template>
</template>
<template v-else>
-
</template>
</template>
</d2-table>
</div> </div>
</baseDialog> </baseDialog>
</template> </template>
...@@ -20,34 +72,57 @@ ...@@ -20,34 +72,57 @@
<script> <script>
import { followRecordUpdate } from '@api/invitation' import { followRecordUpdate } from '@api/invitation'
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import dayjs from "dayjs"
export default { export default {
name: 'RemarkDialog', name: 'RemarkDialog',
data() { data () {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
infoForm: { infoForm: {
remark: '' remarks: ''
}, },
dialogConfig: { dialogConfig: {
title: '备注', title: '跟进记录',
width: '600px' width: '720px'
}, },
rejectRef: 'rejectRef', originData: '',
formRules: { isEdit: false,
// remark: [{ required: true, message: '请输入驳回原因', trigger: 'blur' }] tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableOption: {
width: '80px'
}, },
editFormData: [{
label: '备注',
name: 'remark',
type: 'input',
maxlength: 15,
inputType: 'textarea',
showLimit: true,
rows: 4
}],
baseData: {
tableColumns: [
{
label: '跟进时间',
formatter: (cellValue) => {
return dayjs(cellValue.updatedDate).format("YYYY-MM-DD HH:mm:ss")
},
width: '182',
}, {
label: '跟进人',
prop: "userName",
width: '80',
}, {
label: '事件',
width: '80',
formatter: (cellValue) => {
return {
1: "车主领券",
2: "车主预约",
3: "预约时间",
4: "修改时间",
5: "取消预约",
}[cellValue.eventType] || '-'
} }
}, {
label: '备注',
prop: 'remark',
addHtml: 'ramark'
}
]
},
} }
}, },
...@@ -63,36 +138,44 @@ export default { ...@@ -63,36 +138,44 @@ export default {
}, },
computed: { computed: {
dialogShow: { dialogShow: {
get() { get () {
return this.visible return this.visible
}, },
set(newVal) { set (newVal) {
this.$emit('dialogClose', { flag: newVal }) this.$emit('dialogClose', { flag: newVal })
} }
} }
}, },
mounted() { mounted () {
console.log('paramsObj', this.paramsObj) this.isEdit = false
this.infoForm.remark = deepClone(this.paramsObj.remark) this.originData = ''
this.infoForm.remarks = deepClone(this.paramsObj.remarks)
}, },
methods: { methods: {
handleRamrk (e) {
handleAddConfirm() { this.originData = e
this.$refs.formRef.$refs[this.rejectRef].validate(valid => { this.isEdit = true
if (valid) { },
var params = {} cancel () {
params.remark = this.infoForm.remark this.isEdit = false
params.inviteFollowRecordId = this.paramsObj.inviteFollowRecordId this.infoForm.remarks[0].remark = this.originData
},
handleAddConfirm () {
console.log(this.infoForm.remarks)
let { remark } = this.infoForm.remarks[0],
{inviteFollowRecordId} = this.paramsObj,
params = {
remark,
inviteFollowRecordId
}
followRecordUpdate(params).then(res => { followRecordUpdate(params).then(res => {
this.notice.okTips('操作成功') this.notice.okTips('操作成功')
this.dialogShow = true this.dialogShow = true
}) })
} }
})
}
} }
} }
</script> </script>
......
<template> <template>
<div> <div>
<baseDialog :is-show.sync="dialogShow" :dialog-config="dialogConfig.config" @handleClick="handleAddConfirm" <baseDialog
class="detail-content-warn"> :is-show.sync="dialogShow"
:dialog-config="dialogConfig.config"
@handleClick="handleAddConfirm"
class="detail-content-warn"
>
<div v-loading="loading"> <div v-loading="loading">
<div class="form_div"> <div class="form_div">
<div class="tipsDiv"> <div class="tipsDiv">
...@@ -9,26 +13,77 @@ ...@@ -9,26 +13,77 @@
{{ paramsObj.customer.customerName + ' | ' + paramsObj.customer.customerPhone }} {{ paramsObj.customer.customerName + ' | ' + paramsObj.customer.customerPhone }}
</div> </div>
</div> </div>
<el-form label-width="100px" :model="infoForm" ref="editRef" :rules="formRules"> <el-form
<el-form-item label="预约时间:" required> label-width="120px"
:model="infoForm"
ref="editRef"
:rules="formRules"
>
<el-form-item
label="流量有效性:"
required
>
<el-form-item prop="times">
<el-select
v-model="infoForm.trafficEffectiveness"
placeholder="请选择"
class="select-width"
>
<el-option
v-for="(item, key) in trafficEffectivenessOpt"
:key="key"
:label="item.confValue"
:value="item.confId"
:disabled="item.disabled"
>
</el-option>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label="预约时间:"
required
>
<el-col :span="10"> <el-col :span="10">
<el-form-item prop="dateTime"> <el-form-item prop="dateTime">
<el-date-picker v-model="infoForm.dateTime" :clearable="false" type="date" class="default-width" <el-date-picker
placeholder="选择日期" value-format="yyyy-MM-dd" @change="inviteStatMerchantList(true)" v-model="infoForm.dateTime"
:picker-options="datePickerOptions"> :clearable="false"
type="date"
class="default-width"
placeholder="选择日期"
value-format="yyyy-MM-dd"
@change="inviteStatMerchantList(true)"
:picker-options="datePickerOptions"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="1"></el-col> <el-col :span="1"></el-col>
<el-col :span="13"> <el-col :span="13">
<el-form-item prop="times"> <el-form-item prop="times">
<el-select v-model="infoForm.times" filterable placeholder="请选择" class="default-width"> <el-select
<el-option v-for="(item, key) in timesOpt" :key="key" :label="item.confValue" :value="item.confId" v-model="infoForm.times"
:disabled="item.disabled"> filterable
placeholder="请选择"
class="default-width"
>
<el-option
v-for="(item, key) in timesOpt"
:key="key"
:label="item.confValue"
:value="item.confId"
:disabled="item.disabled"
>
</el-option> </el-option>
</el-select> </el-select>
<el-button type="text" size="small" class="timesSle" v-if="paramsObj.inviteDate" <el-button
@click="cancelInvite">取消预约</el-button> type="text"
size="small"
class="timesSle"
v-if="paramsObj.inviteDate"
@click="cancelInvite"
>取消预约</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form-item> </el-form-item>
...@@ -57,20 +112,20 @@ export default { ...@@ -57,20 +112,20 @@ export default {
}, },
computed: { computed: {
dialogShow: { dialogShow: {
get() { get () {
return this.visible return this.visible
}, },
set(val) { set (val) {
this.$emit("dialogClose", { flag: val }) this.$emit("dialogClose", { flag: val })
} }
} }
}, },
mounted() { mounted () {
this.loading = false this.loading = false
console.log('this.paramsObj', this.paramsObj) console.log('this.paramsObj', this.paramsObj)
this.inviteDatePush() this.inviteDatePush()
}, },
data() { data () {
// var validateDateTime = { // var validateDateTime = {
// validator: (rule, value, callback) => { // validator: (rule, value, callback) => {
// if (!value) { // if (!value) {
...@@ -107,6 +162,7 @@ export default { ...@@ -107,6 +162,7 @@ export default {
{ required: true, message: '请选择时间段', trigger: 'change' } { required: true, message: '请选择时间段', trigger: 'change' }
] ]
}, },
datePickerOptions: { datePickerOptions: {
disabledDate: (time) => { disabledDate: (time) => {
const today = new Date() const today = new Date()
...@@ -135,12 +191,16 @@ export default { ...@@ -135,12 +191,16 @@ export default {
{ confId: "13:00", confValue: "13:00", disabled: false }, { confId: "13:00", confValue: "13:00", disabled: false },
{ confId: "14:30", confValue: "14:30", disabled: false }, { confId: "14:30", confValue: "14:30", disabled: false },
{ confId: "16:00", confValue: "16:00", disabled: false } { confId: "16:00", confValue: "16:00", disabled: false }
] ],
trafficEffectivenessOpt: [
{ confId: "1", confValue: "有效客户"},
{ confId: "2", confValue: "无效客户"},
],
} }
}, },
methods: { methods: {
inviteDatePush() { inviteDatePush () {
if (this.paramsObj.inviteDate) { if (this.paramsObj.inviteDate) {
const dateTimeStr = Util.dateFormate(this.paramsObj.inviteDate, 'YYYY-MM-DD HH:mm:ss') const dateTimeStr = Util.dateFormate(this.paramsObj.inviteDate, 'YYYY-MM-DD HH:mm:ss')
// 截取年月日(空格前) // 截取年月日(空格前)
...@@ -152,7 +212,7 @@ export default { ...@@ -152,7 +212,7 @@ export default {
} }
}, },
inviteStatMerchantList(flag) { inviteStatMerchantList (flag) {
if (flag) { if (flag) {
this.infoForm.times = '' this.infoForm.times = ''
} }
...@@ -191,7 +251,7 @@ export default { ...@@ -191,7 +251,7 @@ export default {
}) })
}, },
handleAddConfirm() { handleAddConfirm () {
this.$refs.editRef.validate((valid) => { this.$refs.editRef.validate((valid) => {
if (valid) { if (valid) {
var params = deepClone(this.infoForm) var params = deepClone(this.infoForm)
...@@ -214,7 +274,7 @@ export default { ...@@ -214,7 +274,7 @@ export default {
}) })
}, },
cancelInvite() { cancelInvite () {
this.$confirm('请确认是否要执行当前操作?', '提示', { this.$confirm('请确认是否要执行当前操作?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -269,7 +329,9 @@ export default { ...@@ -269,7 +329,9 @@ export default {
.default-width { .default-width {
width: 170px; width: 170px;
} }
.select-width{
width: calc(100% - 87px);
}
.timesSle { .timesSle {
padding-left: 10px; padding-left: 10px;
} }
......
<!-- 预约排班 --> <!-- 预约排班 -->
<template> <template>
<d2-container class="points-record"> <d2-container class="points-record">
<div class="header" <div
slot="header"> class="header"
<d2-search ref="showSearch" slot="header"
>
<d2-search
ref="showSearch"
class="show-search" class="show-search"
:search-form="searchForm" :search-form="searchForm"
:form-data="showFormData" :form-data="showFormData"
label-width="100px" /> label-width="100px"
/>
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" <el-button
:id="tableParams.btnId"
size="small" size="small"
type="primary"> type="primary"
>
查询 查询
</el-button> </el-button>
<el-button size="small" <el-button
@click="handleReset"> size="small"
@click="handleReset"
>
重置 重置
</el-button> </el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<div class="header-flex"> <div class="header-flex">
<el-tabs v-model="activeName" <el-tabs
v-model="activeName"
type="card" type="card"
@tab-click="handleClick"> @tab-click="handleClick"
<el-tab-pane v-for="(item, index) in tabPaneList" >
<el-tab-pane
v-for="(item, index) in tabPaneList"
:label="item.label + '(' + item.count + ')'" :label="item.label + '(' + item.count + ')'"
:name="item.name" :name="item.name"
:key="index"> :key="index"
>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div> <div>
<auth-button category="Button" <auth-button
:show-btn-ids="['9030606']" /> category="Button"
:show-btn-ids="['9030606']"
/>
</div> </div>
</div> </div>
<d2-table ref="recordListTable" <d2-table
ref="recordListTable"
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
:get-list-api="getListApi" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn"
<div slot="merchantBrandHtml" >
slot-scope="scope"> <div
slot="merchantBrandHtml"
slot-scope="scope"
>
<template v-if=" <template v-if="
scope.scope.merchantBrand && scope.scope.merchantBrand.split(',').length > 1 scope.scope.merchantBrand && scope.scope.merchantBrand.split(',').length > 1
"> ">
<span>{{ scope.scope.merchantBrand.split(',').slice(0, 1).join("") }}</span> <span>{{ scope.scope.merchantBrand.split(',').slice(0, 1).join("") }}</span>
<el-popover placement="top" <el-popover
placement="top"
width="fit-content" width="fit-content"
trigger="hover"> trigger="hover"
>
<div :class="{ scrollHeight: scope.scope.merchantBrand.split(',').length >= 10 }"> <div :class="{ scrollHeight: scope.scope.merchantBrand.split(',').length >= 10 }">
<div v-for="(item, index) in scope.scope.merchantBrand.split(',')" <div
:key="index"> v-for="(item, index) in scope.scope.merchantBrand.split(',')"
:key="index"
>
{{ item }} {{ item }}
</div> </div>
</div> </div>
<span class="more-info" <span
slot="reference">...({{ scope.scope.merchantBrand.split(',').length }})</span> class="more-info"
slot="reference"
>...({{ scope.scope.merchantBrand.split(',').length }})</span>
</el-popover> </el-popover>
</template> </template>
<template v-else> <template v-else>
...@@ -67,20 +91,28 @@ ...@@ -67,20 +91,28 @@
<span v-else>{{ scope.scope.merchantBrand.split(',').join("") }}</span> <span v-else>{{ scope.scope.merchantBrand.split(',').join("") }}</span>
</template> </template>
</div> </div>
<template slot="auth-button" <template
slot-scope="scope"> slot="auth-button"
slot-scope="scope"
>
<!-- <auth-button :show-btn-ids="['9030607', '9030608']" <!-- <auth-button :show-btn-ids="['9030607', '9030608']"
:data="scope.scope" /> --> :data="scope.scope" /> -->
<!-- 预约时间 --> <!-- 预约时间 -->
<span style="margin-right: 10px;" <span
v-if="[1,2,3,5].includes(scope.scope.inviteStatus)"> style="margin-right: 10px;"
<auth-button :data="scope.scope" v-if="[1,2,3,5].includes(scope.scope.inviteStatus)"
:show-btn-ids="['9030607']" /> >
<auth-button
:data="scope.scope"
:show-btn-ids="['9030607']"
/>
</span> </span>
<!-- 备注 --> <!-- 跟进记录 -->
<span style="margin-right: 10px;"> <span style="margin-right: 10px;">
<auth-button :data="scope.scope" <auth-button
:show-btn-ids="['9030608']" /> :data="scope.scope"
:show-btn-ids="['9030608']"
/>
</span> </span>
</template> </template>
...@@ -88,20 +120,26 @@ ...@@ -88,20 +120,26 @@
</div> </div>
<!-- 工单设置 --> <!-- 工单设置 -->
<workSetDialog :visible="workSetVisible" <workSetDialog
:visible="workSetVisible"
v-if="workSetVisible" v-if="workSetVisible"
:params-obj="recordInfo" :params-obj="recordInfo"
@dialogClose="workSetDialogClose" /> @dialogClose="workSetDialogClose"
/>
<!-- 预约时间 --> <!-- 预约时间 -->
<reservation-dialog :visible="reservationVisible" <reservation-dialog
:visible="reservationVisible"
v-if="reservationVisible" v-if="reservationVisible"
:params-obj="recordInfo" :params-obj="recordInfo"
@dialogClose="reservationDialogClose" /> @dialogClose="reservationDialogClose"
/>
<!-- 备注 --> <!-- 备注 -->
<remark-dialog :visible="remarkVisible" <remark-dialog
:visible="remarkVisible"
v-if="remarkVisible" v-if="remarkVisible"
:params-obj="recordInfo" :params-obj="recordInfo"
@dialogClose="remarkDialogClose" /> @dialogClose="remarkDialogClose"
/>
</d2-container> </d2-container>
</template> </template>
...@@ -117,7 +155,7 @@ export default { ...@@ -117,7 +155,7 @@ export default {
name: 'Scheduling', name: 'Scheduling',
props: { props: {
}, },
data() { data () {
return { return {
tabPaneList: [ tabPaneList: [
{ {
...@@ -142,7 +180,8 @@ export default { ...@@ -142,7 +180,8 @@ export default {
couponDate: '', couponDate: '',
toShopDate: '', toShopDate: '',
merchantId: '', merchantId: '',
inviteMode: '' inviteMode: '',
trafficEffectiveness: '0'
}, },
searchFormSearch: {}, searchFormSearch: {},
showFormData: [{ showFormData: [{
...@@ -172,13 +211,38 @@ export default { ...@@ -172,13 +211,38 @@ export default {
optionId: "merchantId", optionId: "merchantId",
optionLabel: "merchantName", optionLabel: "merchantName",
optionsName: "merchantList" optionsName: "merchantList"
},
{
label: '流量有效性',
name: 'trafficEffectiveness',
type: 'select',
isClear: true,
optionList: [
{
value: '0',
name: '全部'
},
{
value: '1',
name: '有效客户'
},
{
value: '2',
name: '无效客户'
},
],
optionId: 'value',
optionLabel: 'name',
}], }],
getListApi: queryInviteRecord, getListApi: queryInviteRecord,
// 表格参数 // 表格参数
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: 'list',
tableOption: true, tableOption: {
width: '160px'
},
tableColumns: [ tableColumns: [
{ {
label: '领劵时间', label: '领劵时间',
...@@ -228,6 +292,13 @@ export default { ...@@ -228,6 +292,13 @@ export default {
}[cellValue.inviteStatus] }[cellValue.inviteStatus]
} }
}, { }, {
label: '流量有效性',
prop: 'staffName',
width: '100',
formatter: (cellValue) => {
return cellValue.trafficEffectiveness
}
}, {
label: '到店时间', label: '到店时间',
prop: 'inviteDate', prop: 'inviteDate',
width: '150', width: '150',
...@@ -270,7 +341,7 @@ export default { ...@@ -270,7 +341,7 @@ export default {
updateList: (state) => state.d2admin.user.updateList updateList: (state) => state.d2admin.user.updateList
}) })
}, },
mounted() { mounted () {
this.getBaseData() this.getBaseData()
}, },
...@@ -281,12 +352,12 @@ export default { ...@@ -281,12 +352,12 @@ export default {
}), }),
...mapActions('d2admin/user', ['actionSetDownloadList']), ...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() { async getBaseData () {
this.getInviteMerchant() this.getInviteMerchant()
this.getOptionsList() this.getOptionsList()
}, },
beforeSearchFn() { beforeSearchFn () {
return new Promise(resolve => { return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.couponDate) { if (this.searchFormSearch.couponDate) {
...@@ -307,7 +378,7 @@ export default { ...@@ -307,7 +378,7 @@ export default {
resolve() resolve()
}) })
}, },
handleClick() { handleClick () {
if (this.activeName !== "0") { if (this.activeName !== "0") {
this.searchForm.inviteMode = this.activeName this.searchForm.inviteMode = this.activeName
} else { } else {
...@@ -315,7 +386,7 @@ export default { ...@@ -315,7 +386,7 @@ export default {
} }
this.$refs.recordListTable.refreshTable() this.$refs.recordListTable.refreshTable()
}, },
inviteRecordCount() { inviteRecordCount () {
const params = deepClone(this.searchFormSearch) const params = deepClone(this.searchFormSearch)
delete params.inviteMode delete params.inviteMode
inviteRecordCount(params).then((res) => { inviteRecordCount(params).then((res) => {
...@@ -324,13 +395,13 @@ export default { ...@@ -324,13 +395,13 @@ export default {
this.tabPaneList[2].count = res.notInvitedCount || 0 this.tabPaneList[2].count = res.notInvitedCount || 0
}) })
}, },
getInviteMerchant() { getInviteMerchant () {
getInviteMerchant({ currentPage: 1, pageSize: 99999 }).then((res) => { getInviteMerchant({ currentPage: 1, pageSize: 99999 }).then((res) => {
this.baseData.merchantList = res.list this.baseData.merchantList = res.list
this.getOptionsList() this.getOptionsList()
}) })
}, },
handleReset() { handleReset () {
this.searchForm = { this.searchForm = {
customerName: '', customerName: '',
couponDate: '', couponDate: '',
...@@ -340,7 +411,7 @@ export default { ...@@ -340,7 +411,7 @@ export default {
} }
this.$refs.recordListTable.refreshTable() this.$refs.recordListTable.refreshTable()
}, },
getOptionsList() { getOptionsList () {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === 'select') { if (item.type === 'select') {
if ( if (
...@@ -360,24 +431,24 @@ export default { ...@@ -360,24 +431,24 @@ export default {
}) })
}, },
handleRamrk(row) { handleRamrk (row) {
this.recordInfo = row this.recordInfo = row
this.remarkVisible = !this.remarkVisible this.remarkVisible = !this.remarkVisible
}, },
remarkDialogClose(obj) { remarkDialogClose (obj) {
this.remarkVisible = !this.remarkVisible this.remarkVisible = !this.remarkVisible
if (obj.flag) { if (obj.flag) {
this.$refs.recordListTable.refreshTable() this.$refs.recordListTable.refreshTable()
} }
}, },
handleReservation(row) { handleReservation (row) {
this.recordInfo = row this.recordInfo = row
this.reservationVisible = !this.reservationVisible this.reservationVisible = !this.reservationVisible
}, },
reservationDialogClose(obj) { reservationDialogClose (obj) {
console.log('aaa') console.log('aaa')
this.reservationVisible = !this.reservationVisible this.reservationVisible = !this.reservationVisible
if (obj.flag) { if (obj.flag) {
...@@ -385,11 +456,11 @@ export default { ...@@ -385,11 +456,11 @@ export default {
} }
}, },
handleSet() { handleSet () {
this.workSetVisible = !this.workSetVisible this.workSetVisible = !this.workSetVisible
}, },
workSetDialogClose(obj) { workSetDialogClose (obj) {
this.workSetVisible = !this.workSetVisible this.workSetVisible = !this.workSetVisible
if (obj.flag) { if (obj.flag) {
this.$refs.recordListTable.refreshTable() this.$refs.recordListTable.refreshTable()
......
...@@ -307,7 +307,7 @@ export default { ...@@ -307,7 +307,7 @@ export default {
eventTypeList: [ eventTypeList: [
{ {
confId: '1', confId: '1',
confLabel: '订单出库' confLabel: '领料出库'
}, },
{ {
confId: '2', confId: '2',
...@@ -316,6 +316,10 @@ export default { ...@@ -316,6 +316,10 @@ export default {
{ {
confId: '3', confId: '3',
confLabel: '调拨出库' confLabel: '调拨出库'
},
{
confId: '4',
confLabel: '退货出库'
} }
], ],
productTypeList: [], productTypeList: [],
......
...@@ -2,7 +2,11 @@ ...@@ -2,7 +2,11 @@
<template> <template>
<div> <div>
<d2-container> <d2-container>
<div class="header" slot="header" style="padding: 10px 20px"> <div
class="header"
slot="header"
style="padding: 10px 20px"
>
<d2-search <d2-search
ref="showSearch" ref="showSearch"
class="show-search" class="show-search"
...@@ -10,10 +14,17 @@ ...@@ -10,10 +14,17 @@
:form-data="showFormData" :form-data="showFormData"
/> />
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary"> <el-button
:id="tableParams.btnId"
size="small"
type="primary"
>
查询 查询
</el-button> </el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button> <el-button
size="small"
@click="handleReset"
> 重置 </el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
...@@ -23,7 +34,10 @@ ...@@ -23,7 +34,10 @@
<auth-button category="Button" <auth-button category="Button"
:show-btn-ids="['9080401']" /> :show-btn-ids="['9080401']" />
</span> --> </span> -->
<auth-button category="Button" :show-btn-ids="['9080402']" /> <auth-button
category="Button"
:show-btn-ids="['9080801']"
/>
</d2-table-header> </d2-table-header>
<d2-table <d2-table
ref="recordTable" ref="recordTable"
...@@ -32,7 +46,11 @@ ...@@ -32,7 +46,11 @@
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn" :before-search-fn="beforeSearchFn"
> >
<div slot="img" slot-scope="scope" v-if="scope.scope.voucherPic"> <div
slot="img"
slot-scope="scope"
v-if="scope.scope.voucherPic"
>
<img <img
class="pro-img" class="pro-img"
:src="scope.scope.voucherPic" :src="scope.scope.voucherPic"
...@@ -55,8 +73,15 @@ ...@@ -55,8 +73,15 @@
@dialogClose="dialogClose" @dialogClose="dialogClose"
/> />
<!-- 预览图片 --> <!-- 预览图片 -->
<el-dialog :visible="imgVisible" :before-close="handleCloseImg"> <el-dialog
<img width="100%" :src="previewImgUrl" alt="图片" /> :visible="imgVisible"
:before-close="handleCloseImg"
>
<img
width="100%"
:src="previewImgUrl"
alt="图片"
/>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -67,7 +92,7 @@ import { mapActions, mapState } from "vuex" ...@@ -67,7 +92,7 @@ import { mapActions, mapState } from "vuex"
import { getProductTypeBySceneId } from "@api/product" import { getProductTypeBySceneId } from "@api/product"
import { import {
getyqMerchantList, getyqMerchantList,
stockCheckPage, stockRefundPage,
getServicemerchantrefList getServicemerchantrefList
} from "@api/stockManage" } from "@api/stockManage"
import returnDetailDialog from "./returnDetailDialog" import returnDetailDialog from "./returnDetailDialog"
...@@ -76,12 +101,12 @@ export default { ...@@ -76,12 +101,12 @@ export default {
components: { components: {
returnDetailDialog returnDetailDialog
}, },
data() { data () {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
searchForm: { searchForm: {
checkTime: "", refundTime: "",
checkCode: "", refundCode: "",
yqMerchantId: "", yqMerchantId: "",
merchantId: "" merchantId: ""
}, },
...@@ -95,14 +120,14 @@ export default { ...@@ -95,14 +120,14 @@ export default {
showFormData: [ showFormData: [
{ {
label: "退货单号", label: "退货单号",
name: "checkCode", name: "refundCode",
type: "input", type: "input",
maxlength: "20", maxlength: "20",
isClear: true isClear: true
}, },
{ {
label: "退货时间", label: "退货时间",
name: "checkTime", name: "refundTime",
type: "datePicker", type: "datePicker",
isClear: true, isClear: true,
pickerOptions: "rangePickerOptions" pickerOptions: "rangePickerOptions"
...@@ -134,7 +159,7 @@ export default { ...@@ -134,7 +159,7 @@ export default {
optionsName: "merchantIdList" optionsName: "merchantIdList"
} }
], ],
getListApi: stockCheckPage, getListApi: stockRefundPage,
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list", listName: "list",
...@@ -142,27 +167,33 @@ export default { ...@@ -142,27 +167,33 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: "退货单号", label: "退货单号",
prop: "checkCode", prop: "refundCode",
width: "200px" width: "200px"
}, },
{ {
label: "退货时间", label: "退货时间",
prop: "checkTime", prop: "refundTime",
width: "150px", width: "150px",
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.checkTime return cellValue.refundTime
? Util.dateFormate(cellValue.checkTime, "YYYY-MM-DD HH:mm:ss") ? Util.dateFormate(cellValue.refundTime, "YYYY-MM-DD HH:mm:ss")
: "" : ""
} }
}, },
{ {
label: "退货人", label: "退货人",
prop: "operator", prop: "createdBy",
width: "150px" width: "150px"
}, },
{ {
label: "退货类型", label: "退货类型",
prop: "operator", prop: "refundType",
formatter: (cellValue) => {
return {
1: '不良退货',
2: '呆滞退货'
}[cellValue.refundType]
},
width: "150px" width: "150px"
}, },
{ {
...@@ -202,7 +233,7 @@ export default { ...@@ -202,7 +233,7 @@ export default {
dowloadList: (state) => state.d2admin.user.dowloadList dowloadList: (state) => state.d2admin.user.dowloadList
}) })
}, },
mounted() { mounted () {
// this.getBaseData() // this.getBaseData()
// 获取全部类目 // 获取全部类目
getProductTypeBySceneId({ sceneType: "" }).then((res) => { getProductTypeBySceneId({ sceneType: "" }).then((res) => {
...@@ -228,24 +259,24 @@ export default { ...@@ -228,24 +259,24 @@ export default {
// this.getOptionsList() // this.getOptionsList()
// }, // },
beforeSearchFn() { beforeSearchFn () {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.checkTime) { if (this.searchFormSearch.refundTime) {
this.searchFormSearch.checkTimeStart = Util.dateFormate( this.searchFormSearch.refundTimeStart = Util.dateFormate(
this.searchFormSearch.checkTime[0], this.searchFormSearch.refundTime[0],
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD HH:mm:ss"
) )
this.searchFormSearch.checkTimeEnd = this.searchFormSearch.refundTimeEnd =
Util.dateFormate(this.searchFormSearch.checkTime[1], "YYYY-MM-DD") + Util.dateFormate(this.searchFormSearch.refundTime[1], "YYYY-MM-DD") +
" 23:59:59" " 23:59:59"
} }
delete this.searchFormSearch.checkTime delete this.searchFormSearch.refundTime
resolve() resolve()
}) })
}, },
getOptionsList() { getOptionsList () {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === "select") { if (item.type === "select") {
if ( if (
...@@ -269,7 +300,7 @@ export default { ...@@ -269,7 +300,7 @@ export default {
}, },
// 获取仓库门店 // 获取仓库门店
getServicemerchantrefList(merchantId) { getServicemerchantrefList (merchantId) {
getServicemerchantrefList({ getServicemerchantrefList({
yqMerchantId: merchantId yqMerchantId: merchantId
}).then((res) => { }).then((res) => {
...@@ -288,10 +319,10 @@ export default { ...@@ -288,10 +319,10 @@ export default {
// handleSearch() { // handleSearch() {
// this.$refs.recordTable.refreshTable() // this.$refs.recordTable.refreshTable()
// }, // },
handleReset() { handleReset () {
this.searchForm = { this.searchForm = {
checkTime: "", refundTime: "",
checkCode: "", refundCode: "",
yqMerchantId: "", yqMerchantId: "",
merchantId: "" merchantId: ""
} }
...@@ -300,14 +331,10 @@ export default { ...@@ -300,14 +331,10 @@ export default {
this.$refs.recordTable.refreshTable() this.$refs.recordTable.refreshTable()
}, },
gotoAdd() {
// this.close({ tagName: '/orderList' })
this.$router.push({ name: "addInventory" })
},
handleExport() { handleExport () {
var params = this.searchFormSearch var params = this.searchFormSearch
params.method = "dj.smartcarlife.api.stock.check.export.async" params.method = "dj.smartcarlife.api.stock.refund.export"
const list = [ const list = [
...this.dowloadList, ...this.dowloadList,
{ {
...@@ -321,23 +348,23 @@ export default { ...@@ -321,23 +348,23 @@ export default {
}, },
// 查看 // 查看
look(row) { look (row) {
this.recordInfo = row this.recordInfo = row
this.inventoryDetailVisible = true this.inventoryDetailVisible = true
}, },
dialogClose(flag) { dialogClose (flag) {
this.inventoryDetailVisible = !this.inventoryDetailVisible this.inventoryDetailVisible = !this.inventoryDetailVisible
}, },
handleEnlargeImg(url) { handleEnlargeImg (url) {
if (url) { if (url) {
this.previewImgUrl = url this.previewImgUrl = url
this.imgVisible = !this.imgVisible this.imgVisible = !this.imgVisible
} }
}, },
handleCloseImg() { handleCloseImg () {
this.imgVisible = !this.imgVisible this.imgVisible = !this.imgVisible
} }
} }
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
import { stockCheckDetailPage } from '@api/stockManage' import { stockRefundDetailPage } from '@api/stockManage'
import { baseConfig } from '@/main' import { baseConfig } from '@/main'
export default { export default {
name: 'InventoryDetailDialog', name: 'InventoryDetailDialog',
...@@ -45,20 +45,19 @@ export default { ...@@ -45,20 +45,19 @@ export default {
membraneTypeList: baseConfig.membraneTypeList, membraneTypeList: baseConfig.membraneTypeList,
countObj: {}, countObj: {},
searchForm: { searchForm: {
id: '' refundCode: ''
}, },
searchFormSearch: {}, searchFormSearch: {},
searchSelectObj: {}, searchSelectObj: {},
showFormData: [], showFormData: [],
getListApi: stockCheckDetailPage, getListApi: stockRefundDetailPage,
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: 'list',
// singleSelectUniqueKey: 'id',
tableOption: false, tableOption: false,
tableColumns: [{ tableColumns: [{
label: '商品名称', label: '商品名称',
prop: 'goodsName' prop: 'upgradeGoodsName'
// width: '200px' // width: '200px'
}, { }, {
label: '规格', label: '规格',
...@@ -66,11 +65,11 @@ export default { ...@@ -66,11 +65,11 @@ export default {
width: '160px' width: '160px'
},{ },{
label: '商品编码', label: '商品编码',
prop: 'productCode', prop: 'type',
width: '250px' width: '250px'
}, { }, {
label: '系列', label: '系列',
prop: 'sourceMaterialName' prop: 'goodsName'
}, { }, {
label: '所属分类', label: '所属分类',
prop: 'goodsTypeName' prop: 'goodsTypeName'
...@@ -125,7 +124,7 @@ export default { ...@@ -125,7 +124,7 @@ export default {
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
this.searchForm.id = this.recordInfo.id this.searchForm.refundCode = this.recordInfo.refundCode
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
resolve() resolve()
}) })
......
...@@ -267,7 +267,7 @@ export default { ...@@ -267,7 +267,7 @@ export default {
storageTypeList: [ storageTypeList: [
{ {
confId: '1', confId: '1',
confLabel: '采购入库' confLabel: '商城采购入库'
}, },
{ {
confId: '2', confId: '2',
...@@ -279,7 +279,11 @@ export default { ...@@ -279,7 +279,11 @@ export default {
}, },
{ {
confId: '4', confId: '4',
confLabel: '订单入库' confLabel: '退料入库'
},
{
confId: '5',
confLabel: '自采入库'
} }
], ],
productTypeList: [], productTypeList: [],
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!