Commit b9dcd7fe by 前端

前店后厂部分功能代码提交

1 parent 31c6d1f1
......@@ -106,3 +106,9 @@ export function insertOrUpdatePrivacyAgreement(data) {
data.method = `${path2}privacyAgreement.insertOrUpdate`
return request(data, "post")
}
// 技师查询
export function getRoleTechnician(data) {
data.method = `${path2}roleTechnician.list`
return request(data, "post")
}
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 pathDj = "dj.api.smartcarlife."
// 待预约、已预约总数查询
export function getTotalCount(data) {
......@@ -13,3 +15,63 @@ export function getList(data) {
data.method = `${path}search`
return request(data)
}
// 预约记录列表查询
export function queryInviteRecord(data) {
data.method = `${pathInviteRecord}query`
return request(data)
}
// 预约记录总数查询
export function inviteRecordCount(data) {
data.method = `${pathInviteRecord}count`
return request(data)
}
// 门店下拉列表查询
export function getInviteMerchant(data) {
data.method = `${pathInviteRecord}merchant.page`
return request(data)
}
// 查询1.1场景登录权限下园区店信息
export function yqMerchantPage(data) {
data.method = `dj.api.sceneMerchantRef.shopMerchant.LoginPermissionYqMerchant.page`
return request(data)
}
// 工位设置查询
export function inviteStationSetGet(data) {
data.method = `${pathDj}inviteStationSet.get`
return request(data)
}
// 获取指定商户指定日期范围的邀约统计
export function inviteStatMerchantList(data) {
data.method = `dj.api.smartcarlife.inviteStat.merchant.list`
return request(data)
}
// 工位设置修改
export function inviteStationSetUpdate(data) {
data.method = `${pathDj}inviteStationSet.update`
return request(data)
}
// 修改备注
export function followRecordUpdate(data) {
data.method = `${pathInviteRecord}followRecord.update`
return request(data)
}
// 修改预约时间
export function dateUpdate(data) {
data.method = `${pathInviteRecord}invite.dateUpdate`
return request(data)
}
// 取消预约
export function cancelInvite(data) {
data.method = `${pathInviteRecord}cancelInvite`
return request(data)
}
......@@ -175,6 +175,12 @@ export function modifyRemark(data) {
/** 标记订单子订单详情查询 */
export function goodsSubOrder(data) {
data.method = 'dj.api.smartcarlife.goodsOrder.goodsSubOrder.list'
data.method = "dj.api.smartcarlife.goodsOrder.goodsSubOrder.list"
return request(data, "post")
}
\ No newline at end of file
}
/** 接车单、交车单上传记录保存 */
export function carUploadRecordAdd(data) {
data.method = `${path2}carUploadRecord.add`
return request(data, "post")
}
......@@ -136,3 +136,9 @@ export function stockReduceRecordCount(data) {
data.method = `${path}MerchantGoodsStockReduceRecord.count`
return request(data, RequestMethods.POST)
}
// 出库记录关联技师
export function technicianUpdate(data) {
data.method = `${path}MerchantGoodsStockReduceRecord.technician.update`
return request(data, RequestMethods.POST)
}
......@@ -1445,3 +1445,13 @@ export const pushStatusOpt = [
{ confId: 1, confValue: "成功" },
{ confId: 2, confValue: "失败" }
]
// 商品库-发卷宝-预约排班-预约状态
export const scheduling_inviteStatus = [
{ confId: 1, confValue: "待预约" },
{ confId: 2, confValue: "已预约" },
{ confId: 3, confValue: "取消预约" },
{ confId: 4, confValue: "超时未到店" },
{ confId: 5, confValue: "已施工" },
{ confId: 6, confValue: "已撤销" }
]
......@@ -292,9 +292,30 @@ export const routerName = {
label: "导出",
category: "Button",
handle: "handleExport"
},
{
authId: "9030606",
parentId: "90306",
label: "工位设置",
category: "Button",
type: "primary",
handle: "handleSet"
},
{
authId: "9030607",
parentId: "90306",
label: "预约时间",
handle: "handleReservation"
},
{
authId: "9030608",
parentId: "90306",
label: "备注",
handle: "handleRamrk"
}
],
component: _import("goods/coupons")
// component: _import("goods/coupons")
component: _import("goods/coupons/indexControl")
},
90312: {
path: "/packageManage",
......
......@@ -89,6 +89,12 @@ export const routerName = {
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9080302",
parentId: "90803",
label: "关联技师",
handle: "correlationTechnician"
}
],
component: _import("stockManage/outbound/outboundList")
......
......@@ -320,5 +320,8 @@ export default {
}
</script>
<style scoped>
<style lang="scss" scoped>
.coupons {
margin-top: 40px;
}
</style>
<template>
<div class="staffWarn">
<div class="header"
slot="header">
<el-tabs v-model="activeName">
<el-tab-pane label="发劵宝"
name="coupons" />
<el-tab-pane label="预约排班"
name="scheduling" />
</el-tabs>
<div>
<coupons v-if="activeName === 'coupons'" />
<scheduling v-if="activeName === 'scheduling'" />
</div>
</div>
</div>
</template>
<script>
import coupons from './index'
import scheduling from './scheduling'
export default {
name: 'StaffIndex',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
activeName: 'coupons',
recordInfo: {}
}
},
components: {
coupons,
scheduling
},
mounted() {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.staffWarn {
padding: 0 20px;
.header {
::v-deep .el-tabs__header {
margin: 0;
padding: 0 20px;
}
}
}
</style>
<!-- 备注 -->
<template>
<baseDialog :dialog-config="dialogConfig"
:is-show.sync="dialogShow"
class="accountDailog"
@handleClick="handleAddConfirm">
<div class="reject-dialog">
<glsx-combi-form class="edit-form-container"
ref="formRef"
label-width="120px"
default-width="350px"
:form-ref="rejectRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules"></glsx-combi-form>
</div>
</baseDialog>
</template>
<script>
import { followRecordUpdate } from '@api/invitation'
import { deepClone } from '@/common/util'
export default {
name: 'RemarkDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
infoForm: {
remark: ''
},
dialogConfig: {
title: '备注',
width: '600px'
},
rejectRef: 'rejectRef',
formRules: {
// remark: [{ required: true, message: '请输入驳回原因', trigger: 'blur' }]
},
editFormData: [{
label: '备注',
name: 'remark',
type: 'input',
maxlength: 15,
inputType: 'textarea',
showLimit: true,
rows: 4
}],
baseData: {
}
}
},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal })
}
}
},
mounted() {
console.log('paramsObj', this.paramsObj)
this.infoForm.remark = deepClone(this.paramsObj.remark)
},
methods: {
handleAddConfirm() {
this.$refs.formRef.$refs[this.rejectRef].validate(valid => {
if (valid) {
var params = {}
params.remark = this.infoForm.remark
params.inviteFollowRecordId = this.paramsObj.inviteFollowRecordId
followRecordUpdate(params).then(res => {
this.notice.okTips('操作成功')
this.dialogShow = true
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.reject-dialog {
margin-top: 20px;
}
</style>
<template>
<div>
<baseDialog :is-show.sync="dialogShow"
:dialog-config="dialogConfig.config"
@handleClick="handleAddConfirm"
class="detail-content-warn">
<div v-loading="loading">
<div class="form_div">
<div class="tipsDiv">
<div class="tipsText">
{{ paramsObj.customer.customerName + ' | ' + paramsObj.customer.customerPhone }}
</div>
</div>
<el-form label-width="100px"
:model="infoForm"
ref="editRef"
:rules="formRules"
:inline="true">
<el-form-item label="预约时间:"
prop="dateTime">
<el-date-picker v-model="infoForm.dateTime"
type="date"
class="default-width"
placeholder="选择日期"
value-format="yyyy-MM-dd"
@change="inviteStatMerchantList"
:picker-options="datePickerOptions">
</el-date-picker>
<el-select v-model="infoForm.times"
filterable
placeholder="请选择"
class="default-width timesSle">
<el-option v-for="(item, key) in timesOpt"
:key="key"
:label="item.confValue"
:value="item.confId"
:disabled="item.disabled">
</el-option>
</el-select>
<el-button type="text"
size="small"
class="timesSle"
v-if="paramsObj.inviteDate"
@click="cancelInvite">取消预约</el-button>
</el-form-item>
</el-form>
</div>
</div>
</baseDialog>
</div>
</template>
<script>
import { inviteStatMerchantList, dateUpdate, cancelInvite } from '@api/invitation'
import { Util, deepClone } from "@/common/util"
import {
actionOpt
} from "@/common/constants.js"
export default {
name: "ReservationDialog",
components: {},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit("dialogClose", { flag: val })
}
}
},
mounted() {
this.loading = false
console.log('this.paramsObj', this.paramsObj)
this.inviteDatePush()
},
data() {
var validateDateTime = {
validator: (rule, value, callback) => {
if (!value) {
return callback(new Error(`请选择日期`))
}
const times = this.infoForm.times
if (!times) {
return callback(new Error(`请选择时间段`))
}
callback() // 验证通过
},
trigger: "change"
}
return {
dialogConfig: {
config: {
title: "预约时间",
width: "600px"
}
},
infoForm: {
dateTime: '',
times: ''
},
editChildRef: 'editChildRef',
formRules: {
dateTime: [validateDateTime]
},
datePickerOptions: {
disabledDate: (time) => {
const today = new Date()
// 设置时间到当天的开始 (00:00:00.000),避免时分秒影响比较
today.setHours(0, 0, 0, 0)
// 计算一个月后的日期 (今天 + 30天)
const oneMonthLater = new Date(today)
oneMonthLater.setDate(today.getDate() + 30) // 粗略按30天算一个月
// 或者更精确地处理月份 (考虑不同月份天数差异)
// oneMonthLater.setMonth(today.getMonth() + 1);
// 禁用规则:
// 1. 禁用早于今天(包含今天00:00:00之前)的日期
// 2. 禁用晚于一个月后(包含一个月后23:59:59之后)的日期
return time.getTime() < today.getTime() || time.getTime() > oneMonthLater.getTime()
}
},
loading: true,
baseData: {
technicianList: []
},
timesOpt: [
{ confId: "09:00", confValue: "09:00", disabled: false },
{ confId: "10:30", confValue: "10:30", disabled: false },
{ confId: "13:00", confValue: "13:00", disabled: false },
{ confId: "14:30", confValue: "14:30", disabled: false },
{ confId: "16:00", confValue: "16:00", disabled: false }
]
}
},
methods: {
inviteDatePush() {
if (this.paramsObj.inviteDate) {
const dateTimeStr = Util.dateFormate(this.paramsObj.inviteDate, 'YYYY-MM-DD HH:mm:ss')
// 截取年月日(空格前)
this.infoForm.dateTime = dateTimeStr.split(' ')[0]
// 截取时分(去掉秒)
this.infoForm.times = dateTimeStr.split(' ')[1].substring(0, 5) // "09:00"
this.inviteStatMerchantList()
}
},
inviteStatMerchantList() {
var params = {}
params.merchantId = this.paramsObj.yqMerchantId
params.startDate = this.infoForm.dateTime
params.endDate = this.infoForm.dateTime
console.log('params', params)
inviteStatMerchantList(params).then((res) => {
const saturdayFlag = res[0].saturdayFlag
const sundayFlag = res[0].sundayFlag
const timeStats = res[0].timeStats
const day = new Date(this.infoForm.dateTime).getDay()
if (saturdayFlag === 'N' && day === 6) {
this.$message.warning('工位设置不允许周六施工,请选择其他时间')
this.infoForm.dateTime = ''
return
} else if (sundayFlag === 'N' && day === 0) {
this.$message.warning('工位设置不允许周日施工,请选择其他时间')
this.infoForm.dateTime = ''
return
}
timeStats.forEach(item => {
this.timesOpt.forEach(optItem => {
if (item.inviteTime === optItem.confValue) {
if (item.inviteNum < item.maxNum) {
optItem.disabled = false
} else {
optItem.disabled = true
}
}
})
})
console.log('this.timesOpt', this.timesOpt)
})
},
handleAddConfirm() {
this.$refs.editRef.validate((valid) => {
if (valid) {
var params = deepClone(this.infoForm)
params.id = this.paramsObj.id
params.inviteType = this.paramsObj.customerCoupon.couponType
params.inviteDateStr = params.dateTime + ' ' + params.times + ':00'
delete params.dateTime
delete params.times
dateUpdate(params).then(res => {
this.notice.okTips('操作成功')
this.dialogShow = true
})
}
})
},
cancelInvite() {
this.$confirm('请确认是否要执行当前操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
var params = {}
params.id = this.paramsObj.id
cancelInvite(params).then(res => {
this.notice.okTips('操作成功')
this.dialogShow = true
})
}).catch(err => {
console.log(err)
})
}
}
}
</script>
<style lang="scss" scoped>
.detail-content-warn {
.div-title {
width: 1040px;
height: 30px;
border-bottom: 1px solid #e5e5e5;
font-size: 16px;
font-weight: 600;
color: #333333;
margin: 10px 0 20px 0;
}
.el-icon-circle-close {
color: #ffffff;
}
.form_div {
color: #333333;
.tipsDiv {
height: 28px;
margin-bottom: 20px;
.tipsText {
font-size: 14px;
}
}
.el-form-item__content {
display: inline-block;
width: calc(100% - 150px);
line-height: 24px;
}
.el-form-item__label {
padding: 0;
line-height: 24px;
}
.el-form-item {
width: 100%;
margin-bottom: 20px;
}
.edit-sub-block {
// padding: 0 10px;
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
.itemDiv {
display: flex;
.halfItem {
width: 33%;
}
}
.onLineItem {
::v-deep .el-form-item__content {
max-width: 80%;
}
}
}
.edit-sub-block-two {
.el-form-item__label {
padding: 0;
}
.el-form-item {
// width: 300px;
margin: 0px;
}
}
.busi-info {
box-sizing: border-box;
width: 890px;
border-radius: 4px;
border: 1px solid #e5e5e5;
padding: 6px 0;
color: #333333;
font-size: 14px;
margin-bottom: 14px;
.info-row {
height: 20px;
line-height: 20px;
margin-bottom: 16px;
}
.info-row:last-child {
margin-bottom: 0;
}
.info-item {
display: inline-block;
width: 50%;
height: 20px;
line-height: 20px;
margin-bottom: 6px;
.item-label {
display: inline-block;
width: 150px;
color: #666666;
text-align: right;
}
}
}
}
.receiptBtn {
margin-left: 20px;
}
.imgCon {
text-align: center;
margin-bottom: 50px;
}
.imgSize {
width: 1040px;
}
.default-width {
width: 170px;
}
.timesSle {
padding-left: 10px;
}
}
</style>
<!-- 发券宝 - 店里列表 -->
<template>
<div class="coupons">
<d2-table ref="couponsTable" :has-num="false" :base-data="baseData" :sort-obj="sortObj"
:search-form="searchFormSearch" :head-search-form="searchForm" :table-params="tableParams"
:get-list-api="getListApi" :before-search-fn="beforeSearchFn" @handleTableHeadChange="handleTableHeadChange">
<template slot="auth-button" slot-scope="scope">
<auth-button :data="scope.scope" />
<d2-table ref="couponsTable"
:has-num="false"
:base-data="baseData"
:sort-obj="sortObj"
:search-form="searchFormSearch"
:head-search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
@handleTableHeadChange="handleTableHeadChange">
<template slot="auth-button"
slot-scope="scope">
<auth-button :show-btn-ids="['9030602', '9030603', '9030604']"
:data="scope.scope" />
</template>
</d2-table>
<edit-coupons-dialog :coupons-visible="couponsVisible" :coupon-info="couponInfo" @couponClose="couponClose" />
<edit-coupons-dialog :coupons-visible="couponsVisible"
:coupon-info="couponInfo"
@couponClose="couponClose" />
</div>
</template>
......
<template>
<div>
<baseDialog :is-show.sync="dialogShow"
:dialog-config="dialogConfig.config"
@handleClick="handleAddConfirm"
class="detail-content-warn">
<div v-loading="loading">
<div class="form_div">
<el-form label-width="200px"
:model="infoForm"
ref="editRef"
:rules="formRules"
:inline="true">
<el-form-item label="选择园区店:"
prop="yqMerchantId">
<el-select v-model="infoForm.yqMerchantId"
filterable
placeholder="请选择"
class="default-width"
@change="inviteStationSetGet">
<el-option v-for="(item, key) in baseData.yqMerchantList"
:key="key"
:label="item.merchantName"
:value="item.merchantId">
</el-option>
</el-select>
</el-form-item>
<div v-for="(item, key) in infoForm.workItem"
:key="key">
<el-form-item :label="item.label"
:prop="'workItem.' + key + '.maxCount'"
:rules="formRules.maxCount">
<el-input-number v-model="item.maxCount"
placeholder="输入数值"
:precision="0"
:step="1"
:min="0"
:max="10000"
class="numInput"></el-input-number>
<span class="unit">个</span>
</el-form-item>
</div>
<el-form-item label="周六施工">
<el-switch v-model="infoForm.saturdayFlag"
active-value="Y"
inactive-value="N">
</el-switch>
</el-form-item>
<el-form-item label="周日施工">
<el-switch v-model="infoForm.sundayFlag"
active-value="Y"
inactive-value="N">
</el-switch>
</el-form-item>
</el-form>
<div class="tipsDiv">
<div class="tipsText">
设置门店每日每个时段可接待的客户人数,
施工时段以1个半小时为准,请合理安排施工进度
</div>
</div>
</div>
</div>
</baseDialog>
</div>
</template>
<script>
import { Util, deepClone } from "@/common/util"
import { inviteStationSetGet, inviteStationSetUpdate, yqMerchantPage } from '@api/invitation'
import {
actionOpt
} from "@/common/constants.js"
export default {
name: "WorkSetDialog",
components: {},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit("dialogClose", { flag: val })
}
}
},
mounted() {
this.yqMerchantPage()
},
data() {
return {
dialogConfig: {
config: {
title: "工位设置",
width: "600px"
}
},
infoForm: {
yqMerchantId: '',
workItem: [{
label: '上午 09:00-10:30',
startTime: '09:00',
endTime: '10:30',
maxCount: 0
},
{
label: '上午 10:30-12:00',
startTime: '10:30',
endTime: '12:00',
maxCount: 0
},
{
label: '下午 13:00-14:30',
startTime: '13:00',
endTime: '14:30',
maxCount: 0
},
{
label: '下午 14:30-16:00',
startTime: '14:30',
endTime: '16:00',
maxCount: 0
},
{
label: '下午 16:00-17:30',
startTime: '16:00',
endTime: '17:30',
maxCount: 0
}
],
saturdayFlag: 'N',
sundayFlag: 'N'
},
editChildRef: 'editChildRef',
formRules: {
yqMerchantId: [
{ required: true, message: "请选择园区店", trigger: "change" }
],
maxCount: [
{ required: true, message: '请输入最大数量', trigger: 'blur' }
]
},
loading: true,
baseData: {
yqMerchantList: []
}
}
},
methods: {
inviteStationSetGet(yqMerchantId) {
inviteStationSetGet({ yqMerchantId: yqMerchantId }).then((res) => {
console.log('res', res)
if (res && res.length > 0) {
res.forEach(item => {
this.infoForm.workItem.forEach(workItem => {
if (item.startTime === workItem.startTime && item.endTime === workItem.endTime) {
workItem.maxCount = item.maxCount
}
})
this.infoForm.saturdayFlag = item.saturdayFlag
this.infoForm.sundayFlag = item.sundayFlag
})
}
})
},
yqMerchantPage() {
yqMerchantPage({ currentPage: 1, pageSize: 99999 }).then((res) => {
this.baseData.yqMerchantList = res.list
this.loading = false
})
},
changeInvoiceSubject(val) {
this.infoForm.invoiceSubjectName = this.options.find(item => item.companyCode === val).companyName
},
changeSwitchSubject(val) {
this.infoForm.switchSubjectName = this.options.find(item => item.companyCode === val).companyName
},
changeEmails(val) {
if (val) {
this.infoForm.warningEmailsShow = val
} else {
this.infoForm.warningEmailsShow = '__________'
}
},
handleAddConfirm() {
this.$refs.editRef.validate((valid) => {
if (valid) {
var params = deepClone(this.infoForm)
params.setList = params.workItem.map(item => {
const obj = {
startTime: item.startTime,
endTime: item.endTime,
maxCount: item.maxCount,
saturdayFlag: params.saturdayFlag,
sundayFlag: params.sundayFlag
}
return obj
})
delete params.workItem
delete params.saturdayFlag
delete params.sundayFlag
console.log('params', params)
inviteStationSetUpdate(params).then(res => {
this.notice.okTips('操作成功')
this.dialogShow = true
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.detail-content-warn {
.div-title {
width: 1040px;
height: 30px;
border-bottom: 1px solid #e5e5e5;
font-size: 16px;
font-weight: 600;
color: #333333;
margin: 10px 0 20px 0;
}
.el-icon-circle-close {
color: #ffffff;
}
.form_div {
color: #333333;
.tipsDiv {
display: flex;
justify-content: center; /* 水平居中 */
align-items: center; /* 垂直居中 */
// flex-direction: column;
// background: #f47f131a;
height: 28px;
margin-bottom: 25px;
.tipsText {
display: flex;
align-items: center; /* 垂直居中 */
// font-weight: 500;
font-size: 13px;
color: #888888;
}
.imgCla {
margin-right: 8px;
width: 20px;
height: 20px;
}
}
.el-form-item__content {
display: inline-block;
width: calc(100% - 150px);
line-height: 24px;
}
.el-form-item__label {
padding: 0;
line-height: 24px;
}
.el-form-item {
width: 100%;
margin-bottom: 20px;
}
.edit-sub-block {
// padding: 0 10px;
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
.itemDiv {
display: flex;
.halfItem {
width: 33%;
}
}
.onLineItem {
::v-deep .el-form-item__content {
max-width: 80%;
}
}
}
.edit-sub-block-two {
.el-form-item__label {
padding: 0;
}
.el-form-item {
// width: 300px;
margin: 0px;
}
}
.busi-info {
box-sizing: border-box;
width: 890px;
border-radius: 4px;
border: 1px solid #e5e5e5;
padding: 6px 0;
color: #333333;
font-size: 14px;
margin-bottom: 14px;
.info-row {
height: 20px;
line-height: 20px;
margin-bottom: 16px;
}
.info-row:last-child {
margin-bottom: 0;
}
.info-item {
display: inline-block;
width: 50%;
height: 20px;
line-height: 20px;
margin-bottom: 6px;
.item-label {
display: inline-block;
width: 150px;
color: #666666;
text-align: right;
}
}
}
}
.receiptBtn {
margin-left: 20px;
}
.imgCon {
text-align: center;
margin-bottom: 50px;
}
.imgSize {
width: 1040px;
}
.default-width {
width: 300px;
}
.numInput {
width: 150px;
}
.unit {
padding-left: 10px;
}
}
</style>
......@@ -24,7 +24,7 @@
placeholder="请选择"
class="default-width"
@change="changeInvoiceSubject"
:disabled="paramsObj">
:disabled="paramsObj ? true : false">
<el-option v-for="(item, key) in options"
:key="key"
:label="item.companyName"
......
<template>
<div>
<baseDialog :is-show.sync="dialogShow"
:dialog-config="dialogConfig.config"
@handleClick="handleAddConfirm"
class="detail-content-warn">
<div v-loading="loading">
<div class="form_div">
<div class="tipsDiv">
<div class="tipsText">
<img src="../images/icon-warning.png"
class="imgCla">首次登记出库将标记为出库时间,若产生物料多退少补请更正实际出库数量
</div>
</div>
<el-form label-width="160px"
:model="infoForm"
ref="editRef"
:rules="formRules"
:inline="true">
<el-form-item label="选择领料技师:"
prop="technician">
<el-select v-model="infoForm.technician"
filterable
placeholder="请选择"
class="default-width">
<el-option v-for="(item, key) in baseData.technicianList"
:key="key"
:label="item.staffName"
:value="item.staffPhone">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="出库商品:">
{{ paramsObj.upgradeGoodsName }}
</el-form-item>
<el-form-item label="实际出库数量:"
prop="reduceStockNum">
<el-input-number v-model="infoForm.reduceStockNum"
placeholder="输入数值"
:precision="2"
:step="0.01"
:min="0"
:max="999999.99"></el-input-number>
<span class="unit">{{ infoForm.unit }}</span>
</el-form-item>
<el-form-item label="备注:">
<el-input v-model="infoForm.remark"
type="textarea"
maxlength="50"
placeholder="请输入备注"
show-word-limit
:rows="4"
class="default-width" />
</el-form-item>
</el-form>
</div>
</div>
</baseDialog>
</div>
</template>
<script>
import { getRoleTechnician } from '@api/index'
import { technicianUpdate } from '@api/stockManage'
import { Util, deepClone } from "@/common/util"
import { baseConfig } from '@/main'
import {
actionOpt
} from "@/common/constants.js"
export default {
name: "CorrelationDialog",
components: {},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit("dialogClose", { flag: val })
}
}
},
mounted() {
this.getData()
this.getRoleTechnicianList()
},
data() {
return {
dialogConfig: {
config: {
title: "关联技师",
width: "600px"
}
},
infoForm: {
technician: '',
reduceStockNum: '',
remark: '',
unit: ''
},
editChildRef: 'editChildRef',
formRules: {
technician: [
{ required: true, message: "请选择领料技师", trigger: "change" }
],
reduceStockNum: [
{ required: true, message: '请输入0~999999的数字,支持小数2位', trigger: 'change' }
]
},
loading: true,
baseData: {
technicianList: []
},
membraneTypeList: baseConfig.membraneTypeList
}
},
methods: {
getData() {
this.infoForm.reduceStockNum = this.paramsObj.reduceStockNum
this.infoForm.remark = this.paramsObj.remark
this.infoForm.unit = this.membraneTypeList.includes(this.paramsObj.goodsType) ? '米' : '件'
},
// 查询领料技师
getRoleTechnicianList() {
const params = {}
// params.yqMerchantId = this.userInfo.merchant.merchantId
params.yqMerchantId = 44209813
getRoleTechnician(params).then(res => {
this.baseData.technicianList = res
this.loading = false
if (this.paramsObj.technicianPhone) {
this.infoForm.technician = this.paramsObj.technicianPhone
}
})
},
handleAddConfirm() {
this.$refs.editRef.validate((valid) => {
if (valid) {
var params = deepClone(this.infoForm)
params.id = this.paramsObj.id
params.technicianPhone = params.technician
params.technicianName = this.baseData.technicianList.find(item => item.staffPhone === params.technician)?.staffName
// 提交前清理末尾逗号
// params.warningEmails = params.warningEmails.trim().replace(/,+$/, '')
// // return console.log('params', params)
// if (this.paramsObj && this.paramsObj.id) {
// params.id = this.paramsObj.id
// updateRule(params).then(res => {
// this.notice.okTips('操作成功')
// this.dialogShow = true
// })
// } else {
technicianUpdate(params).then(res => {
this.notice.okTips('操作成功')
this.dialogShow = true
})
// }
}
})
}
}
}
</script>
<style lang="scss" scoped>
.detail-content-warn {
.div-title {
width: 1040px;
height: 30px;
border-bottom: 1px solid #e5e5e5;
font-size: 16px;
font-weight: 600;
color: #333333;
margin: 10px 0 20px 0;
}
.el-icon-circle-close {
color: #ffffff;
}
.form_div {
color: #333333;
.tipsDiv {
display: flex;
justify-content: center; /* 水平居中 */
align-items: center; /* 垂直居中 */
// flex-direction: column;
background: #f47f131a;
height: 28px;
margin-bottom: 25px;
.tipsText {
display: flex;
align-items: center; /* 垂直居中 */
// font-weight: 500;
font-size: 13px;
color: #ff8d1a;
}
.imgCla {
margin-right: 8px;
width: 20px;
height: 20px;
}
}
.el-form-item__content {
display: inline-block;
width: calc(100% - 150px);
line-height: 24px;
}
.el-form-item__label {
padding: 0;
line-height: 24px;
}
.el-form-item {
width: 100%;
margin-bottom: 20px;
}
.edit-sub-block {
// padding: 0 10px;
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
.itemDiv {
display: flex;
.halfItem {
width: 33%;
}
}
.onLineItem {
::v-deep .el-form-item__content {
max-width: 80%;
}
}
}
.edit-sub-block-two {
.el-form-item__label {
padding: 0;
}
.el-form-item {
// width: 300px;
margin: 0px;
}
}
.busi-info {
box-sizing: border-box;
width: 890px;
border-radius: 4px;
border: 1px solid #e5e5e5;
padding: 6px 0;
color: #333333;
font-size: 14px;
margin-bottom: 14px;
.info-row {
height: 20px;
line-height: 20px;
margin-bottom: 16px;
}
.info-row:last-child {
margin-bottom: 0;
}
.info-item {
display: inline-block;
width: 50%;
height: 20px;
line-height: 20px;
margin-bottom: 6px;
.item-label {
display: inline-block;
width: 150px;
color: #666666;
text-align: right;
}
}
}
}
.receiptBtn {
margin-left: 20px;
}
.imgCon {
text-align: center;
margin-bottom: 50px;
}
.imgSize {
width: 1040px;
}
.default-width {
width: 350px;
}
.unit {
padding-left: 10px;
}
}
</style>
......@@ -48,6 +48,11 @@
:data="scope.scope" />
</d2-table>
</div>
<!-- 关联技师 -->
<correlationDialog :visible.sync="corrVisible"
v-if="corrVisible"
:params-obj="recordInfo"
@dialogClose="closeCorrDialog" />
</d2-container>
</div>
</template>
......@@ -57,12 +62,14 @@ import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { getProductTypeBySceneId } from '@api/product'
import { getyqMerchantList, getMerchantGoodsStockReduceRecord, getServicemerchantrefList, stockReduceRecordCount } from '@api/stockManage'
import { getRoleTechnician } from '@api/index'
import { upgradeFlags } from '@/common/constants.js'
import { baseConfig } from '@/main'
import correlationDialog from './components/correlationDialog'
export default {
name: 'OutboundList',
components: {
correlationDialog
},
data() {
return {
......@@ -78,7 +85,8 @@ export default {
businessCode: '',
goodsSeries: '',
upgradeFlag: '',
filmRollNo: ''
filmRollNo: '',
technicianPhone: ''
},
searchFormSearch: {},
searchSelectObj: {
......@@ -178,12 +186,20 @@ export default {
}, {
label: '膜卷号',
addHtml: 'filmRollNo'
}, {
label: '领料技师',
name: 'technicianPhone',
type: 'select',
optionList: [],
optionId: 'staffPhone',
optionLabel: 'staffName',
optionsName: 'technicianList'
}],
getListApi: getMerchantGoodsStockReduceRecord,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: false,
tableOption: true,
tableColumns: [{
label: '出库时间',
prop: 'reduceDate',
......@@ -208,6 +224,10 @@ export default {
prop: 'goodsTypeName',
width: '250px'
}, {
label: '领料技师',
prop: 'technicianName',
width: '100px'
}, {
label: '出库数量',
prop: 'reduceStockNum',
formatter: (cellValue) => {
......@@ -259,6 +279,17 @@ export default {
formatter: cellValue => {
return cellValue.storeUsage || '-'
}
}, {
label: '操作人',
prop: 'updatedBy',
width: '100px'
}, {
label: '最后操作时间',
prop: 'updatedDate',
width: '150px',
formatter: (cellValue) => {
return cellValue.updatedDate ? Util.dateFormate(cellValue.updatedDate, 'YYYY-MM-DD HH:mm:ss') : ''
}
}
]
},
......@@ -280,9 +311,11 @@ export default {
productTypeList: [],
yqMerchantList: [],
merchantIdList: [],
technicianList: [],
upgradeFlags: upgradeFlags
},
statisticsData: {}
statisticsData: {},
corrVisible: false
}
},
computed: {
......@@ -304,8 +337,8 @@ export default {
this.baseData.storeUsageList = res
this.getOptionsList()
})
this.stockReduceRecordCount()
this.getRoleTechnicianList()
},
methods: {
......@@ -388,7 +421,8 @@ export default {
goodsType: '',
businessCode: '',
goodsSeries: '',
upgradeFlag: ''
upgradeFlag: '',
technicianPhone: ''
}
this.$refs.recordTable.refreshTable()
this.stockReduceRecordCount()
......@@ -407,8 +441,32 @@ export default {
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
}
},
// 查询领料技师
getRoleTechnicianList() {
const params = {}
// params.yqMerchantId = this.userInfo.merchant.merchantId
params.yqMerchantId = 44209813
getRoleTechnician(params).then(res => {
this.baseData.technicianList = res
this.getOptionsList()
})
},
// 关联技师
correlationTechnician(row) {
this.recordInfo = row
this.corrVisible = !this.corrVisible
},
closeCorrDialog(obj) {
console.log('obj', obj)
this.corrVisible = !this.corrVisible
if (obj.flag) {
this.$refs.recordTable.refreshTable(false, true)
}
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!