Commit 2a506513 by 张立顺

Merge branch 'SAAS+V4.56.0-0908' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.56.0-0908
2 parents 2e954742 733f02aa
......@@ -58,77 +58,103 @@ export function billCompute(data) {
// 对账单测算-分页
export function billComputePage(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.computeByIncr.json'
// data.method = 'dj.api.smartcarlife.reconciliationBill.computeByIncr.json'
data.method =
"dj.api.smartcarlife.reconciliationBill.computeByIncr.filter.json"
return request(data, "post")
}
// 对账单编辑
export function editBill(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.updateByJson'
data.method = "dj.api.smartcarlife.reconciliationBill.updateByJson"
return request(data, "post")
}
// 对账单编辑-分页
export function editBillPage(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.updateByIncrByJson'
data.method = "dj.api.smartcarlife.reconciliationBill.updateByIncrByJson"
return request(data, "post")
}
export function billDetail(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.detail'
data.method = "dj.api.smartcarlife.reconciliationBill.detail"
return request(data, "post")
}
// 对账单详情-分页
export function billDetailPage(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.detail.withOrderPage'
data.method = "dj.api.smartcarlife.reconciliationBill.detail.withOrderPage"
return request(data, "post")
}
// 根据服务商商户号分页获取4S店列表
export function getShopList(data) {
data.method = 'dj.api.scenemerchantref.queryShopRefByPartnerShopPage'
data.method = "dj.api.scenemerchantref.queryShopRefByPartnerShopPage"
return request(data)
}
// 对账单确认
export function billConfirm(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.confirm'
data.method = "dj.api.smartcarlife.reconciliationBill.confirm"
return request(data, "post")
}
// 对账单取消
export function billCancel(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.cancel'
data.method = "dj.api.smartcarlife.reconciliationBill.cancel"
return request(data, "post")
}
// 对账单待确认内容确认
export function billConfirmChange(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.confirmChange'
data.method = "dj.api.smartcarlife.reconciliationBill.confirmChange"
return request(data, "post")
}
// 对账单待取消内容确认
export function billCancelChange(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.cancelChange'
data.method = "dj.api.smartcarlife.reconciliationBill.cancelChange"
return request(data, "post")
}
// 对账单待取消内容确认
export function tmplCheckField(data) {
data.method = 'dj.api.reconciliation.template.checkField'
data.method = "dj.api.reconciliation.template.checkField"
return request(data, "post")
}
// 生成应付单
export function createPaymentBill(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.jd.payment.bill'
data.method = "dj.api.smartcarlife.reconciliationBill.jd.payment.bill"
return request(data, "post")
}
// 生成应付单
export function createReceiptBill(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.jd.receipt'
data.method = "dj.api.smartcarlife.reconciliationBill.jd.receipt"
return request(data, "post")
}
// 根据4s店获取服务商列表
export function getServiceByShopList(data) {
data.method = "dj.api.scenemerchantref.queryServiceRefByShop"
return request(data, "post")
}
// 生成服务商对账单
export function createServiceBill(data) {
data.method = "dj.api.smartcarlife.reconciliationBill.partner.generate"
return request(data, "post")
}
// 获取退款订单-4s订单分页
export function getRefundOrderPage(data) {
data.method = "dj.api.smartcarlife.ordermanage.shop.merchant.order"
return request(data, "post")
}
// 合并门店退款订单到对账单
export function mergeRefundOrder(data) {
data.method = "dj.api.smartcarlife.reconciliationBill.merge.refund.order"
return request(data, "post")
}
......
......@@ -107,6 +107,11 @@ export function insertOrUpdatePrivacyAgreement(data) {
return request(data, "post")
}
// 技师查询
export function getRoleTechnician(data) {
data.method = `${path2}roleTechnician.list`
}
// 获取支付渠道列表
export function paymentChannelList(data) {
data.method = `${path2}paymentChannel.list`
......
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)
}
......@@ -1469,3 +1469,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: "已撤销" }
]
<!-- 通用表单弹窗组件 -->
<template>
<d2-dialog :title="dialogConfig.title" :is-visible="selectVisible" class="privacyDailog" :width="dialogWidth" :btn-ok-label="dialogConfig.okText" @closeDialog="handleClose" @confirmDialog="handleConfirm">
<glsx-combi-form class="edit-form-container" ref="editFormRef" :label-width="labelWidth" :default-width="defaultWidth" :is-block="isBlock" :form-ref="editChildRef" :form-obj="editData" :form-data="editFormData" :form-rules="formRules">
</glsx-combi-form>
</d2-dialog>
</template>
<script>
import { deepClone } from '@/common/util'
export default {
name: 'GlskFormDialog',
data() {
return {
isBlock: true,
editChildRef: 'editChildRef'
}
},
props: {
dialogWidth: {
type: String,
default: '480px'
},
labelWidth: {
type: String,
default: '100px'
},
defaultWidth: {
type: String,
default: '314px'
},
dialogConfig: {
type: Object,
default: () => {
return {
title: '提示',
okText: '确定'
}
}
},
selectVisible: {
type: Boolean,
default: false
},
formRules: {
type: Object,
default: () => ({})
},
editData: {
type: Object,
default: () => ({})
},
editFormData: {
type: Array,
default: () => []
},
baseData: {
type: Object,
default: () => ({})
}
},
mounted() {
this.getOptionsList('editFormData', false)
},
methods: {
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (['select', 'radio'].includes(item.type) && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
handleConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => {
if (valid) {
this.$emit('handleConfirm', this.editData)
}
})
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style>
.privacyDailog .el-dialog {
min-width: 700px;
}
</style>
import Vue from "vue"
import d2Container from "./d2-container"
import authButton from "./d2-auth/d2-auth-btn.js"
// 注意 有些组件使用异步加载会有影响
Vue.component("D2Container", d2Container)
Vue.component("D2Icon", () => import("./d2-icon"))
Vue.component("D2ElIcon", () => import("./d2-el-icon"))
Vue.component("D2IconSvg", () => import("./d2-icon-svg/index.vue"))
Vue.component("D2TableHeader", () => import("./d2-table-header/index.vue"))
Vue.component("D2Table", () => import("./d2-table/index.vue"))
Vue.component("D2Dialog", () => import("./d2-dialog/index.vue"))
Vue.component("D2Form", () => import("./d2-form/index.vue"))
Vue.component("D2Search", () => import("./d2-search/index.vue"))
Vue.component("RelateStoreDialog", () =>
import("./d2-form/relateStoreDialog.vue")
)
Vue.component("BaseDialog", () => import("./baseDialog/index.vue"))
Vue.component("GlsxCombiForm", () => import("./glsx-combi-form/index.vue"))
Vue.component("GLDialog", () => import("./GLDialog/index.vue"))
// Vue.component([authButton.name], authButton)
Vue.component(authButton.name, authButton)
import Vue from "vue"
import d2Container from "./d2-container"
import authButton from "./d2-auth/d2-auth-btn.js"
// 注意 有些组件使用异步加载会有影响
Vue.component("D2Container", d2Container)
Vue.component("D2Icon", () => import("./d2-icon"))
Vue.component("D2ElIcon", () => import("./d2-el-icon"))
Vue.component("D2IconSvg", () => import("./d2-icon-svg/index.vue"))
Vue.component("D2TableHeader", () => import("./d2-table-header/index.vue"))
Vue.component("D2Table", () => import("./d2-table/index.vue"))
Vue.component("D2Dialog", () => import("./d2-dialog/index.vue"))
Vue.component("D2Form", () => import("./d2-form/index.vue"))
Vue.component("D2Search", () => import("./d2-search/index.vue"))
Vue.component("RelateStoreDialog", () =>
import("./d2-form/relateStoreDialog.vue")
)
Vue.component("BaseDialog", () => import("./baseDialog/index.vue"))
Vue.component("GlsxCombiForm", () => import("./glsx-combi-form/index.vue"))
Vue.component("GLDialog", () => import("./GLDialog/index.vue"))
Vue.component("GlskFormDialog", () => import("./glsk-form-dialog/index.vue"))
// Vue.component([authButton.name], authButton)
Vue.component(authButton.name, authButton)
......@@ -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",
......
......@@ -521,6 +521,12 @@ export const routerName = {
parentId: "90511",
label: "转账记录",
handle: "handleTransferRecord"
},
{
authId: "9051114",
parentId: "90511",
label: "服务商对账单",
handle: "handleCreateServiceBill"
}
],
component: _import("financeManage/accountStateManage/index")
......
......@@ -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")
......
......@@ -34,13 +34,13 @@
<auth-button :data="scope.scope" :show-btn-ids="['9051105']" />
</span>
<!-- 确认变更 - 待确认 -->
<span v-if="scope.scope.reconciliationBillStatus == '2'" style="margin-right: 10px;">
<!-- <span v-if="scope.scope.reconciliationBillStatus == '2'" style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9051103']" />
</span>
</span> -->
<!-- 取消变更 - 待确认 -->
<span v-if="scope.scope.reconciliationBillStatus == '2'" style="margin-right: 10px;">
<!-- <span v-if="scope.scope.reconciliationBillStatus == '2'" style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9051104']" />
</span>
</span> -->
<!-- 查看 - 已对账 -->
<span v-if="scope.scope.reconciliationBillStatus == '3'" style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9051106']" />
......@@ -49,6 +49,10 @@
<span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9051107']" />
</span>
<!-- 服务商对账单 - 已对账 && 流量方对账单 && 未生成过服务商对账单 -->
<span v-if="scope.scope.reconciliationBillStatus == '3' && scope.scope.billType == '1' && !scope.scope.hasPartnerBill" style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9051114']" />
</span>
<!-- 生成应收单 -->
<span style="margin-right: 10px;" v-if="((!scope.scope.receivableBillIds) || (scope.scope.receivableBillIds.length == 0)) && scope.scope.reconciliationBillStatus == '3' && scope.scope.billType == '1'">
<auth-button :data="scope.scope" :show-btn-ids="['9051108']" />
......@@ -84,6 +88,9 @@
<edit-transfer v-if="editTransferVisible" :editTransferVisible="editTransferVisible" :info="merchantInfo" @handleConfirm="handleEditTransferConfirm" @dialogClose="handleEditTransferVisible"></edit-transfer>
<record-transfer v-if="recordTransferVisible" :recordTransferVisible="recordTransferVisible" :info="merchantInfo" @handleConfirm="handleTransferRecordConfirm" @dialogClose="handleTransferRecordVisible"></record-transfer>
<edit-pay-receive v-if="payReceiveVisible" :payReceiveVisible="payReceiveVisible" :info="info" @handleConfirm="handleEditConfirm" @dialogClose="handleEditVisible"></edit-pay-receive>
<glsk-form-dialog v-if="billSplitVisible" :selectVisible="billSplitVisible" :dialogConfig="billSplitDialogConfig" label-width="200px" :formRules="billSplitRules" :editData="billSplitEditData" :editFormData="billSplitEditFormData" :baseData="baseData" @handleClose="splitDialogVisible" @handleConfirm="handleSplitConfirm"></glsk-form-dialog>
<CreateServiceDialog :account-visible="accountVisible" v-if="accountVisible" :scene="7" :editForm="serviceInfo" @custTmpl="handleCustTmpl" @handleConfirm="handleServiceConfirm" @accountClose="createServiceVisible" />
<tmpl-drawer v-if="tmplDrawerVisible" :tmplDrawerVisible="tmplDrawerVisible" :type="tmplInfo.type" :tmplSelectList="tmplInfo.tmplSelectList" @handleConfirm="handleCustConfirm" @handleClose="handleCustVisible"></tmpl-drawer>
</div>
</template>
......@@ -99,8 +106,10 @@ import SelectMerDialog from "../components/SelectMerDialog"
import EditTransfer from "../components/EditTransfer"
import RecordTransfer from "../components/RecordTransfer"
import EditPayReceive from "../components/EditPayReceive"
import CreateServiceDialog from "../components/CreateServiceDialog"
import tmplDrawer from "../components/TmplDrawer"
export default {
name: 'accountStateManage',
name: 'AccountStateManage',
components: {
ChangeDetailDialog,
SystemBillDialog,
......@@ -108,7 +117,9 @@ export default {
SelectMerDialog,
EditTransfer,
RecordTransfer,
EditPayReceive
EditPayReceive,
CreateServiceDialog,
tmplDrawer
},
data() {
return {
......@@ -149,13 +160,11 @@ export default {
name: 'accountDate',
type: 'datePicker',
isClear: true
// pickerOptions: 'rangePickerOptions'
}, {
label: '创建时间',
name: 'createdDate',
type: 'datePicker',
isClear: true
// pickerOptions: 'rangePickerOptions'
}, {
label: '状态',
name: 'reconciliationBillStatus',
......@@ -255,10 +264,44 @@ export default {
baseData: {
billStatusList: billStatusList,
tmplTypeList: tmplTypeList,
sceneTypeList: sceneTypeList
sceneTypeList: sceneTypeList,
splitBillList: [{
confId: true,
confLabel: '拆分'
}, {
confId: false,
confLabel: '不拆分'
}]
},
billVisible: false,
billTmplInfo: []
billTmplInfo: [],
// 确认对账-拆分
billSplitVisible: false,
billSplitDialogConfig: {
title: '确认对账',
okText: '确定'
},
billSplitRules: {
splitBill: [{ required: true, message: '请选择是否拆分对账单', trigger: 'blur' }],
},
billSplitEditData: {},
billSplitEditFormData: [{
name: 'splitBill',
label: '是否按支付类型拆分对账单',
type: 'radio',
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'splitBillList',
optionList: [],
handleRadioChange: () => { }
}],
accountVisible: false,
serviceInfo: {},
tmplDrawerVisible: false,
tmplInfo: {
type: '',
tmplSelectList: [],
}
}
},
mounted() {
......@@ -354,29 +397,53 @@ export default {
handleEdit(row) {
const params = {
id: row.id,
orderCurrentPage: 1,
orderPageSize: 10
// orderCurrentPage: 1,
// orderPageSize: 10,
overwriteFiledJson: true
}
billDetailPage(params).then(res => {
this.billTmplInfo = deepClone(res)
this.handleBillVisible()
})
},
splitDialogVisible() {
this.billSplitVisible = !this.billSplitVisible
},
handleSplitConfirm() {
this.splitDialogVisible()
this.billApiConfirm(this.billSplitEditData)
},
handleBillConfirm(row) {
this.$confirm('是否确认对账?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const params = { id: row.id }
billConfirm(params).then(res => {
this.$message.success("操作成功")
this.handleReset()
})
// 流量方对账单 - 是否拆分弹窗
if (row.billType == '1') {
this.billSplitEditData = {
...row,
splitBill: false
}
this.splitDialogVisible()
} else {
this.billApiConfirm(row)
}
}).catch(() => { })
},
billApiConfirm(row) {
const params = { id: row.id }
if (row.billType == '1') {
params.splitBill = row.splitBill
}
billConfirm(params).then(res => {
this.$message.success("操作成功")
this.handleReset()
})
},
handleCancel(row) {
this.$confirm('是否取消对账?', '提示', {
confirmButtonText: '确定',
......@@ -449,8 +516,9 @@ export default {
handleDetail(row) {
const params = {
id: row.id,
orderCurrentPage: 1,
orderPageSize: 10
// orderCurrentPage: 1,
// orderPageSize: 10,
overwriteFiledJson: false
}
billDetailPage(params).then(res => {
this.billTmplInfo = deepClone(res)
......@@ -458,6 +526,43 @@ export default {
})
},
createServiceVisible() {
this.accountVisible = !this.accountVisible
},
// 服务商对账单
handleCreateServiceBill(row) {
this.serviceInfo = {
id: row.id,
sceneType: row.sceneType,
shopMerchantId: row.shopMerchantId
}
this.createServiceVisible()
},
handleServiceConfirm(obj) {
this.billTmplInfo = deepClone(obj.billTmplInfo)
this.createServiceVisible()
this.handleBillVisible()
},
handleCustVisible() {
this.tmplDrawerVisible = !this.tmplDrawerVisible
},
// 自定义模版字段
handleCustTmpl(val) {
console.log(val, 'val---')
this.tmplInfo.type = val.tmplType
this.tmplInfo.tmplSelectList = val.tmplSelectList || []
this.handleCustVisible()
},
handleCustConfirm(obj) {
this.handleCustVisible()
this.$EventBus.$emit('changeFieldIds', { fieldIds: obj.fieldIds })
},
// 生成应收
handleCreateReceiveBill(row) {
const params = {
......
......@@ -14,10 +14,10 @@ export const billStatusList = [
confId: "1",
confLabel: "待对账"
},
{
confId: "2",
confLabel: "待确认"
},
// {
// confId: "2",
// confLabel: "待确认"
// },
{
confId: "3",
confLabel: "已对账"
......
......@@ -18,9 +18,6 @@
</el-form-item>
<el-form-item v-if="infoForm.merchantType == '7'" label="账单类型:" prop="reportType">
<el-radio-group v-model="infoForm.reportType" @change="judgeTmpl">
<el-radio label="4">
服务商对账单
</el-radio>
<el-radio label="1">
普通对账单
</el-radio>
......@@ -54,10 +51,12 @@
<el-option v-for="item in baseData.reconStatusList" :key="item.confId" :label="item.confLabel" :value="item.confId" />
</el-select>
</el-form-item>
<el-form-item label="支付方式:" prop="payeeType">
<el-select v-model="infoForm.payeeType" style="width:400px">
<el-option v-for="item in baseData.payeeTypeList" :key="item.confId" :label="item.confLabel" :value="item.confId" />
</el-select>
<el-form-item v-if="isTmpl" label="套餐合并" prop="packageMerge">
<el-radio-group v-model="infoForm.packageMerge">
<el-radio v-for="(item, index) in baseData.packageMergeList" :label="item.confId" :key="index">
{{ item.confLabel }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="isTmpl" label="对账模版:" prop="templateId">
<el-select v-model="infoForm.templateId" style="width:400px" @change="handleTmplChange">
......@@ -152,7 +151,7 @@ export default {
reportType: '1',
shopMerchantId: '',
reconciliationStatus: 'all',
payeeType: 'all',
packageMerge: false,
templateId: '',
fieldsJson: '',
fieldsTxt: ''
......@@ -176,7 +175,7 @@ export default {
{ required: true, trigger: 'change', validator: validateLonlat }
],
reconciliationStatus: [{ required: true, message: '请选择对账状态', trigger: 'change' }],
payeeType: [{ required: true, message: '请选择支付方式', trigger: 'change' }],
packageMerge: [{ required: true, message: '请选择套餐合并', trigger: 'change' }],
templateId: [{ required: false, message: '请选择对账模式', trigger: 'change' }],
fieldsJson: [{ required: false, message: '请选择对账字段', trigger: 'change' }],
},
......@@ -193,16 +192,23 @@ export default {
confId: '2',
confLabel: '已对账'
}],
payeeTypeList: [{
confId: 'all',
confLabel: '全部'
}, {
confId: '0',
confLabel: '嘀加收款'
packageMergeList: [{
confId: true,
confLabel: '是'
}, {
confId: '1',
confLabel: '门店收款'
confId: false,
confLabel: '否'
}],
// payeeTypeList: [{
// confId: 'all',
// confLabel: '全部'
// }, {
// confId: '0',
// confLabel: '嘀加收款'
// }, {
// confId: '1',
// confLabel: '门店收款'
// }],
merchantList: [],
// 流量方对账单
trafficTemplateList: [],
......@@ -313,21 +319,21 @@ export default {
* 园区店 - 6 - 否
*/
judgeTmpl() {
this.isTmpl = this.infoForm.merchantType == '2' || (this.infoForm.merchantType == '7' && this.infoForm.reportType == '4');
this.isTmpl = this.infoForm.merchantType == '2'
this.merchantTypeStr = this.typeObj[this.infoForm.merchantType]
this.multipleLimit = (this.infoForm.merchantType == '7' && this.infoForm.reportType == '4') ? 1 : 10
this.infoForm.merchant = []
this.resetTmplData()
},
resetTmplData() {
this.infoForm.shopMerchantId = ''
this.infoForm.packageMerge = false
this.infoForm.templateId = ''
this.infoForm.fieldsJson = ''
this.infoForm.fieldsTxt = ''
this.infoForm.tmplType = ''
this.tmplSelectList = []
const ruleAttrList = ['templateId', 'fieldsJson']
const ruleAttrList = ['packageMerge', 'templateId', 'fieldsJson']
ruleAttrList.forEach(item => {
this.formRules[item][0].required = this.isTmpl
})
......@@ -480,12 +486,13 @@ export default {
params.sceneType = this.scene
// 对账状态
infoForm.reconciliationStatus == 'all' ? '' : (params.reconciliationStatus = infoForm.reconciliationStatus)
infoForm.payeeType == 'all' ? '' : (params.payeeType = infoForm.payeeType)
// infoForm.payeeType == 'all' ? '' : (params.payeeType = infoForm.payeeType)
if (infoForm.shopMerchantId) {
params.shopMerchantId = infoForm.shopMerchantId
params.shopMerchantName = this.baseData.shopMerchantList.find(item => item.merchantId == infoForm.shopMerchantId)?.merchantName
}
if (this.isTmpl) {
params.packageMerge = infoForm.packageMerge
params.templateId = infoForm.templateId == 'all' ? '' : infoForm.templateId
params.fieldsJson = infoForm.fieldsJson
}
......@@ -515,15 +522,7 @@ export default {
handleAddConfirm() {
this.$refs.accountForm.validate(valid => {
if (valid) {
if (this.infoForm.merchantType == '7' && this.infoForm.reportType == '4') {
if (this.infoForm.merchant.length == 1) {
this.dowloadApi()
} else {
this.$message.warning("仅支持单商户进行系统对账")
}
} else {
this.dowloadApi()
}
this.dowloadApi()
}
})
},
......
......@@ -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"
......
......@@ -173,6 +173,14 @@ export default {
{
confId: "撤销抵扣",
confLabel: "撤销抵扣"
},
{
confId: "购物抵扣",
confLabel: "购物抵扣"
},
{
confId: "售后返还",
confLabel: "售后返还"
}
]
},
......@@ -230,7 +238,7 @@ export default {
},
created() {
this.staffId = this.$route.query.staffId
},
methods: {
//新增抵扣
......@@ -372,7 +380,7 @@ export default {
confId: "错单抵扣",
confLabel: "错单抵扣"
}
]
]
}
this.getOptionsList()
})
......@@ -433,4 +441,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
......@@ -145,64 +145,79 @@ export default {
this.titleActiveIndex = 0
},
handleCheckedChange(val) {
console.log(val)
console.log(val, this.selected, 1111)
this.selected = val ? val : []
this.handleCourse()
},
handleCourse() {
this.selectObj = {
courseTotalDuration: 0,
count: 0
}
this.selectCourseList = this.courseList.filter((item) => {
const isSelected = this.selected.includes(item.courseId)
if (isSelected) {
// 使用 toFixed(2) 保留两位小数,防止浮点误差
this.selectObj.courseTotalDuration = parseFloat(
(
this.selectObj.courseTotalDuration + item.courseTotalDuration
).toFixed(2)
)
this.selectObj.count += 1
}
return isSelected
clearData() {
this.selectCourseList = this.selectCourseList.filter((item) =>
this.selected.includes(item.courseId)
)
},
filter(courseId) {
this.clearData()
return this.selectCourseList.find((val) => {
return val.courseId == courseId
})
this.$emit("handleCourse", this.selectCourseList)
},
// handleCourse() {
// this.selectObj = {
// courseTotalDuration: 0,
// count: 0
// }
// this.selectCourseList = this.courseList.filter((item) => {
// const isSelected = this.selected.includes(item.courseId)
// if (isSelected) {
// this.selectObj.courseTotalDuration += item.courseTotalDuration
// this.selectObj.count += 1
// this.selected.forEach((courseId) => {
// if (!this.filter(courseId)) {
// this.courseList.forEach((item) => {
// if (item.courseId == courseId) {
// this.selectCourseList.push(item)
// }
// })
// }
// return isSelected
// })
// this.$emit("handleCourse", this.selectCourseList)
// },
// delCourse(val) {
// this.selectObj = {
// courseTotalDuration: 0,
// count: 0
// }
// let currentIndex = this.selectCourseList.findIndex(
// (item) => item.courseId == val.courseId
// )
// let selectedIndex = this.selected.findIndex(
// (item) => item == val.courseId
// )
// this.selected.splice(selectedIndex, 1)
// this.selectCourseList.splice(currentIndex, 1)
// this.selectCourseList.forEach((item) => {
// this.selectObj.courseTotalDuration += item.courseTotalDuration
// this.selectObj.count += 1
// this.selectObj.count++
// })
// this.$emit("handleCourse", this.selectCourseList)
// },
handleCourse() {
this.selectObj = {
courseTotalDuration: 0,
count: 0
}
const courseMap = {} // 用于快速查找 courseId 对应的课程信息
this.courseList.forEach((item) => {
courseMap[item.courseId] = item
})
const newSelectCourseList = []
this.selected.forEach((courseId) => {
const existing = this.filter(courseId)
if (existing) {
newSelectCourseList.push(existing)
} else {
const course = courseMap[courseId]
if (course) {
newSelectCourseList.push(course)
}
}
})
// 更新 selectCourseList
this.selectCourseList = newSelectCourseList
// 统计信息
this.selectCourseList.forEach((item) => {
this.selectObj.courseTotalDuration += item.courseTotalDuration
this.selectObj.count++
})
this.$emit("handleCourse", this.selectCourseList)
},
delCourse(val) {
this.selectObj = {
courseTotalDuration: 0,
......
<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!