Commit c80f1e8d by 前端

版本功能代码提交

1 parent facdae94
...@@ -110,6 +110,7 @@ export function insertOrUpdatePrivacyAgreement(data) { ...@@ -110,6 +110,7 @@ export function insertOrUpdatePrivacyAgreement(data) {
// 技师查询 // 技师查询
export function getRoleTechnician(data) { export function getRoleTechnician(data) {
data.method = `${path2}roleTechnician.list` data.method = `${path2}roleTechnician.list`
return request(data, "post")
} }
// 获取支付渠道列表 // 获取支付渠道列表
......
...@@ -184,3 +184,9 @@ export function carUploadRecordAdd(data) { ...@@ -184,3 +184,9 @@ export function carUploadRecordAdd(data) {
data.method = `${path2}carUploadRecord.add` data.method = `${path2}carUploadRecord.add`
return request(data, "post") return request(data, "post")
} }
/** 接车单、交车单上传记录删除 */
export function carUploadRecordDelete(data) {
data.method = `${path2}carUploadRecord.delete`
return request(data, "post")
}
...@@ -51,8 +51,6 @@ ...@@ -51,8 +51,6 @@
import storeList from './storeList' import storeList from './storeList'
import couponsDetail from './couponsDetail' import couponsDetail from './couponsDetail'
import editCouponsDialog from './editCouponsDialog' import editCouponsDialog from './editCouponsDialog'
// import { exportListApi, exportDetailListApi } from '@api/coupons'
// import { asyncExportExcel } from '@api/sys.base'
import { getDistinctColum } from '@api/coupons' import { getDistinctColum } from '@api/coupons'
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import { BaseData, inviteStatusList } from '@/common/constants.js' import { BaseData, inviteStatusList } from '@/common/constants.js'
......
...@@ -53,9 +53,6 @@ ...@@ -53,9 +53,6 @@
<script> <script>
import { inviteStatMerchantList, dateUpdate, cancelInvite } from '@api/invitation' import { inviteStatMerchantList, dateUpdate, cancelInvite } from '@api/invitation'
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import {
actionOpt
} from "@/common/constants.js"
export default { export default {
name: "ReservationDialog", name: "ReservationDialog",
components: {}, components: {},
......
...@@ -100,8 +100,6 @@ import reservationDialog from './reservationDialog' ...@@ -100,8 +100,6 @@ import reservationDialog from './reservationDialog'
import remarkDialog from './remarkDialog' import remarkDialog from './remarkDialog'
import workSetDialog from './workSetDialog' import workSetDialog from './workSetDialog'
import { queryInviteRecord, inviteRecordCount, getInviteMerchant } from '@api/invitation' import { queryInviteRecord, inviteRecordCount, getInviteMerchant } from '@api/invitation'
import { getParkStore } from "@api/editCustomer"
import { getServiceStore } from "@api/order"
import { scheduling_inviteStatus } from '@/common/constants.js' import { scheduling_inviteStatus } from '@/common/constants.js'
export default { export default {
name: 'Scheduling', name: 'Scheduling',
...@@ -151,8 +149,8 @@ export default { ...@@ -151,8 +149,8 @@ export default {
label: "到店时间", label: "到店时间",
name: "toShopDate", name: "toShopDate",
type: "datePicker", type: "datePicker",
isClear: true, isClear: true
pickerOptions: "rangePickerOptions" // pickerOptions: "rangePickerOptions"
}, { }, {
label: '门店名称', label: '门店名称',
name: 'merchantId', name: 'merchantId',
...@@ -272,8 +270,6 @@ export default { ...@@ -272,8 +270,6 @@ export default {
async getBaseData() { async getBaseData() {
this.getInviteMerchant() this.getInviteMerchant()
// this.getParkStore()
// this.pointRule()
this.getOptionsList() this.getOptionsList()
}, },
...@@ -311,8 +307,8 @@ export default { ...@@ -311,8 +307,8 @@ export default {
delete params.inviteMode delete params.inviteMode
inviteRecordCount(params).then((res) => { inviteRecordCount(params).then((res) => {
this.tabPaneList[0].count = res.inviteCount this.tabPaneList[0].count = res.inviteCount
this.tabPaneList[1].count = res.notInvitedCount this.tabPaneList[1].count = res.hadInvitedCount
this.tabPaneList[2].count = res.hadInvitedCount this.tabPaneList[2].count = res.notInvitedCount
}) })
}, },
getInviteMerchant() { getInviteMerchant() {
...@@ -321,25 +317,6 @@ export default { ...@@ -321,25 +317,6 @@ export default {
this.getOptionsList() this.getOptionsList()
}) })
}, },
getParkStore() {
getParkStore({}).then((res) => {
res.forEach((item) => {
item.merchantId = item.merchantNo
})
this.baseData.storeIdList = res
this.getOptionsList()
})
},
getServiceStore(merchantIds) {
getServiceStore({
// yqMerchantId: merchantId
yqMerchantIds: merchantIds,
scene: 1
}).then((res) => {
this.baseData.parkServiceList = res || []
this.getOptionsList()
})
},
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
customerName: '', customerName: '',
...@@ -370,87 +347,6 @@ export default { ...@@ -370,87 +347,6 @@ export default {
}) })
}, },
// 模板下载
exportTemplate() {
var params = {}
params.method = 'dj.api.smartcarlife.resident.point.import.template.export.async'
const list = [
...this.dowloadList,
{
name: '驻店积分记录模板',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
handleBatchImport() {
this.fileVisible = !this.fileVisible
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
},
// 上传文件,转码为base64
importFile(e) {
const size = e.target.files[0].size / 1024 / 1024
if (size < 9) {
this.$set(this.fileForm, 'fileName', e.target.files[0].name)
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
this.fileInfo = e.target.files[0].name.split('.')[e.target.files[0].name.split('.')?.length - 1] + '@' + arrBase64[1]
document.getElementById('fileUpload').value = ''
}
} else {
this.notice.errorTips('上传文件不可超过9M')
}
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate(valid => {
if (valid) {
var params = {
file: this.fileInfo
}
pointImport(params).then(res => {
if (res) {
// 异步处理文件上传 把id传入处理轮询
// const list = [...this.updateList, {
// name: this.fileForm.fileName,
// ifSuccess: false,
// uuid: res,
// type: 'upload'
// }]
// this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips(res)
this.handleBatchImport()
this.$refs.recordListTable.refreshTable()
}
})
}
})
},
findAllPersonRelations(sourceType) {
const params = { sourceType: sourceType }
findAllPersonRelations(params).then((res) => {
if (sourceType == 1) { // 督导
this.baseData.supervisorOpt = res
} else if (sourceType == 2) { // 销售
this.baseData.saleOpt = res
}
this.getOptionsList()
})
},
handleExport() {
var params = this.searchFormSearch
pointExport(params).then((res) => {
res && downLoadFile(res)
})
},
handleRamrk(row) { handleRamrk(row) {
this.recordInfo = row this.recordInfo = row
this.remarkVisible = !this.remarkVisible this.remarkVisible = !this.remarkVisible
......
...@@ -66,11 +66,8 @@ ...@@ -66,11 +66,8 @@
</template> </template>
<script> <script>
import { Util, deepClone } from "@/common/util" import { deepClone } from "@/common/util"
import { inviteStationSetGet, inviteStationSetUpdate, yqMerchantPage } from '@api/invitation' import { inviteStationSetGet, inviteStationSetUpdate, yqMerchantPage } from '@api/invitation'
import {
actionOpt
} from "@/common/constants.js"
export default { export default {
name: "WorkSetDialog", name: "WorkSetDialog",
components: {}, components: {},
...@@ -182,20 +179,6 @@ export default { ...@@ -182,20 +179,6 @@ export default {
}) })
}, },
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() { handleAddConfirm() {
this.$refs.editRef.validate((valid) => { this.$refs.editRef.validate((valid) => {
if (valid) { if (valid) {
......
...@@ -36,17 +36,17 @@ ...@@ -36,17 +36,17 @@
<img class="signRefundIcon" <img class="signRefundIcon"
src="./images/sign.png" /> 标记为已开票 src="./images/sign.png" /> 标记为已开票
</el-button> </el-button>
</span>
<span v-if="[2,4].includes(detail.status) || detail.constructionFlag == 'Y'">
&nbsp;&nbsp;&nbsp;<el-button size="mini" &nbsp;&nbsp;&nbsp;<el-button size="mini"
v-if="[2,4].includes(detail.status)"
class="signRefundBtn" class="signRefundBtn"
@click="Invoicing(detail.id)"> @click="handleCarFileExport(0)">
<img class="signRefundIcon" <img class="signRefundIcon"
src="./images/print.png" /> 打印接车单 src="./images/print.png" /> 打印接车单
</el-button> </el-button>
&nbsp;&nbsp;&nbsp;<el-button size="mini" &nbsp;&nbsp;&nbsp;<el-button size="mini"
v-if="[2,4].includes(detail.status)"
class="signRefundBtn" class="signRefundBtn"
@click="Invoicing(detail.id)"> @click="handleCarFileExport(1)">
<img class="signRefundIcon" <img class="signRefundIcon"
src="./images/print.png" /> 打印交车单 src="./images/print.png" /> 打印交车单
</el-button> </el-button>
...@@ -143,20 +143,49 @@ ...@@ -143,20 +143,49 @@
</el-form-item> </el-form-item>
<el-form-item class="photoItem" <el-form-item class="photoItem"
label="接车单:"> label="接车单:">
<el-button type="text" <div v-if="!pickUpOrder">
class="timesSle" <el-button type="text"
@click="handleUpload('0')">上传接车单扫描件</el-button> @click="handleUpload('0')">上传接车单扫描件</el-button>
<!-- <div class="picItem"> </div>
<div v-else
class="picItem">
<img class="icon" <img class="icon"
src="./images/file-pdf.png" /> src="./images/file-pdf.png" />
<span class="label">PDF</span> <span class="label"
:title="pickUpOrder.fileName">
<el-button type="text"
@click="handleCarFileUpload(pickUpOrder)">{{ pickUpOrder.fileName ? (pickUpOrder.fileName.length > 5 ? (pickUpOrder.fileName.slice(0, 5) + '...') : pickUpOrder.fileName) : '' }}</el-button>
</span>
<span class="handle" <span class="handle"
@click="handleEnlargeFile(detail.payOrder.zyVoucherUrl)">预览 @click="handleCarFilePreview(pickUpOrder.fileUrl)">预览
</span> </span>
<span class="handle" <span class="handle"
@click="handleEnlargeFile(detail.payOrder.zyVoucherUrl)">删除 @click="handleCarFileDelete(pickUpOrder.id)">删除
</span> </span>
</div> --> </div>
</el-form-item>
<el-form-item class="photoItem"
label="交车单:">
<div v-if="!deliveryNote">
<el-button type="text"
@click="handleUpload('1')">上传交车单扫描件</el-button>
</div>
<div v-else
class="picItem">
<img class="icon"
src="./images/file-pdf.png" />
<span class="label"
:title="deliveryNote.fileName">
<el-button type="text"
@click="handleCarFileUpload(deliveryNote)">{{ deliveryNote.fileName ? (deliveryNote.fileName.length > 5 ? (deliveryNote.fileName.slice(0, 5) + '...') : deliveryNote.fileName) : '' }}</el-button>
</span>
<span class="handle"
@click="handleCarFilePreview(deliveryNote.fileUrl)">预览
</span>
<span class="handle"
@click="handleCarFileDelete(deliveryNote.id)">删除
</span>
</div>
</el-form-item> </el-form-item>
<el-form-item class="remarkItem" <el-form-item class="remarkItem"
label="备注:"> label="备注:">
...@@ -457,7 +486,7 @@ ...@@ -457,7 +486,7 @@
<input type="file" <input type="file"
id="fileUpload" id="fileUpload"
class="import-input" class="import-input"
accept=".xls,.xlsx,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" accept="application/pdf"
@change="importFile($event)"> @change="importFile($event)">
</el-button> </el-button>
</el-col> </el-col>
...@@ -470,14 +499,14 @@ ...@@ -470,14 +499,14 @@
<script> <script>
import refundDetail from "./components/refundDetail.vue" import refundDetail from "./components/refundDetail.vue"
import { mapActions } from "vuex" import { mapActions, mapState } from "vuex"
// import signRefundDialog from './signRefundDialog' // import signRefundDialog from './signRefundDialog'
import remarkDialog from "./remarkDialog" import remarkDialog from "./remarkDialog"
import technicianDialog from "./components/technicianDialog" import technicianDialog from "./components/technicianDialog"
import { deepClone } from "@/common/util" import { deepClone, downLoadFile } from "@/common/util"
import { payType, BaseData, invoiceTypeOpt, invalidFlagOpt } from "@/common/constants.js" import { payType, BaseData, invoiceTypeOpt, invalidFlagOpt } from "@/common/constants.js"
import dayjs from "dayjs" import dayjs from "dayjs"
import { goodsOrderDetail, markAsInvoiced, carUploadRecordAdd } from "@api/order" import { goodsOrderDetail, markAsInvoiced, carUploadRecordAdd, carUploadRecordDelete } from "@api/order"
import newSignRefundDialog from "./components/newSignRefundDialog" import newSignRefundDialog from "./components/newSignRefundDialog"
import alyOss from '@/common/oss.js' import alyOss from '@/common/oss.js'
export default { export default {
...@@ -562,10 +591,15 @@ export default { ...@@ -562,10 +591,15 @@ export default {
fileRules: { fileRules: {
fileName: [{ required: true, message: '请上传文件', trigger: 'change' }] fileName: [{ required: true, message: '请上传文件', trigger: 'change' }]
}, },
carFileType: "" // 0接车单1交车单 carFileType: "", // 0接车单1交车单
pickUpOrder: null, // 接车单信息
deliveryNote: null // 交车单信息
} }
}, },
computed: { computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
}),
specialAccout() { specialAccout() {
return this.userInfo?.loginAccount?.loginAccout == "18123663366" return this.userInfo?.loginAccount?.loginAccout == "18123663366"
} }
...@@ -586,6 +620,7 @@ export default { ...@@ -586,6 +620,7 @@ export default {
methods: { methods: {
...mapActions({ close: "d2admin/page/close" }), ...mapActions({ close: "d2admin/page/close" }),
...mapActions("d2admin/base", ["get"]), ...mapActions("d2admin/base", ["get"]),
...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() { async getBaseData() {
this.positionTypeList = await this.get(BaseData.positionTypeList) this.positionTypeList = await this.get(BaseData.positionTypeList)
}, },
...@@ -834,6 +869,16 @@ export default { ...@@ -834,6 +869,16 @@ export default {
vptInvoiceInfo.invoiceKindShow = this.invoiceTypeOpt.find(item => item.confId === vptInvoiceInfo.invoiceKind)?.confValue || '-' vptInvoiceInfo.invoiceKindShow = this.invoiceTypeOpt.find(item => item.confId === vptInvoiceInfo.invoiceKind)?.confValue || '-'
vptInvoiceInfo.invalidFlagShow = this.invalidFlagOpt.find(item => item.confId === vptInvoiceInfo.invalidFlag)?.confValue || '-' vptInvoiceInfo.invalidFlagShow = this.invalidFlagOpt.find(item => item.confId === vptInvoiceInfo.invalidFlag)?.confValue || '-'
} }
const carFiles = this.detail.carUploadRecordList
if (carFiles && carFiles.length > 0) {
carFiles.forEach(item => {
if (item.fileType == 0) { // 接车单
this.pickUpOrder = item
} else if (item.fileType == 1) { // 交车单
this.deliveryNote = item
}
})
}
}) })
}, },
...@@ -910,11 +955,9 @@ export default { ...@@ -910,11 +955,9 @@ export default {
fileType: this.carFileType fileType: this.carFileType
} }
carUploadRecordAdd(params).then(res => { carUploadRecordAdd(params).then(res => {
console.log('res', res) this.notice.okTips('上传成功')
if (res && res.data && res.data.length > 0) { this.handleImport()
this.notice.okTips('上传成功') this.getGoodsOrderDetail()
this.handleImport()
}
}) })
}, },
(err) => { (err) => {
...@@ -926,6 +969,94 @@ export default { ...@@ -926,6 +969,94 @@ export default {
) )
} }
}) })
},
handleCarFileUpload(obj) {
// console.log('url', url)
// url && downLoadFile(url)
this.downloadPDF(obj)
},
handleCarFilePreview(url) {
window.open(url)
},
handleCarFileDelete(id) {
this.$confirm('请确认是否要执行当前操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
var params = {}
params.id = id
carUploadRecordDelete(params).then(res => {
this.notice.okTips('操作成功')
this.pickUpOrder = null
this.deliveryNote = null
this.getGoodsOrderDetail()
})
}).catch(err => {
console.log(err)
})
},
handleCarFileExport(fileType) {
var params = {}
params.orderCode = this.detail.orderCode
params.fileType = fileType
params.method = 'dj.api.smartcarlife.carUploadRecord.export.Async'
const list = [
...this.dowloadList,
{
name: fileType == 0 ? '接车单' : '交车单',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
async downloadPDF(obj) {
const pdfUrl = obj.fileUrl // 你的 PDF URL
const fileName = obj.fileName // 你想要的文件名
try {
const response = await fetch(pdfUrl, {
// 如果 PDF 需要登录/Token,可以在这里加 headers
// headers: {
// 'Authorization': 'Bearer your-token-here'
// }
})
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`)
}
// 将响应转为 Blob(二进制数据)
const blob = await response.blob()
// 创建一个指向该 Blob 的 URL
const url = window.URL.createObjectURL(blob)
// 创建一个临时的 a 标签用于下载
const a = document.createElement('a')
a.href = url
a.download = fileName // 指定下载的文件名
a.style.display = 'none'
// 将 a 标签添加到页面并触发点击
document.body.appendChild(a)
a.click()
// 清理:移除 a 标签,释放 Blob URL
document.body.removeChild(a)
window.URL.revokeObjectURL(url)
} catch (error) {
console.error('下载失败:', error)
alert('下载失败,请检查网络或 URL 是否正确')
}
} }
} }
} }
......
...@@ -96,6 +96,7 @@ export default { ...@@ -96,6 +96,7 @@ export default {
}, },
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info,
dialogConfig: { dialogConfig: {
config: { config: {
title: "关联技师", title: "关联技师",
...@@ -135,8 +136,7 @@ export default { ...@@ -135,8 +136,7 @@ export default {
// 查询领料技师 // 查询领料技师
getRoleTechnicianList() { getRoleTechnicianList() {
const params = {} const params = {}
// params.yqMerchantId = this.userInfo.merchant.merchantId params.yqMerchantId = this.userInfo.merchant.merchantId
params.yqMerchantId = 44209813
getRoleTechnician(params).then(res => { getRoleTechnician(params).then(res => {
this.baseData.technicianList = res this.baseData.technicianList = res
this.loading = false this.loading = false
......
...@@ -446,8 +446,7 @@ export default { ...@@ -446,8 +446,7 @@ export default {
// 查询领料技师 // 查询领料技师
getRoleTechnicianList() { getRoleTechnicianList() {
const params = {} const params = {}
// params.yqMerchantId = this.userInfo.merchant.merchantId params.yqMerchantId = this.userInfo.merchant.merchantId
params.yqMerchantId = 44209813
getRoleTechnician(params).then(res => { getRoleTechnician(params).then(res => {
this.baseData.technicianList = res this.baseData.technicianList = res
this.getOptionsList() this.getOptionsList()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!