Commit 6b3fa6b3 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 c80f1e8d 2a506513
......@@ -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")
}
......
<!-- 通用表单弹窗组件 -->
<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)
......@@ -521,6 +521,12 @@ export const routerName = {
parentId: "90511",
label: "转账记录",
handle: "handleTransferRecord"
},
{
authId: "9051114",
parentId: "90511",
label: "服务商对账单",
handle: "handleCreateServiceBill"
}
],
component: _import("financeManage/accountStateManage/index")
......
......@@ -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()
}
})
},
......
......@@ -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>
......@@ -12,10 +12,9 @@
<span class="phone">电话:<span class="label">{{ detailInfo.contactPhone }}</span></span>
<span class="address">收货地址:<span class="label">{{ detailInfo.contactAddress }}</span></span>
</div>
<div class="address-info"
v-if="detailInfo.purchaseOrderRemark">
<span class="address">备注:<span class="label">{{ detailInfo.purchaseOrderRemark }}</span></span>
</div>
<div class="address-info" v-if="detailInfo.purchaseOrderRemark">
<span class="address">备注:<span class="label">{{ detailInfo.purchaseOrderRemark }}</span></span>
</div>
<div class="table-class">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" :has-page="hasPage"
@refreshTable="refreshTable" :table-data="detailInfo.tableData" :table-total="detailInfo.tableTotal">
......@@ -34,6 +33,15 @@
</el-option>
</el-select>
</div>
<template slot="carName" slot-scope="scope">
<el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top">
<div slot="content">
<div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">{{ item.carTypeName }}</div>
</div>
<div>{{ scope.scope.suitCarTypeList | formatCar }}</div>
</el-tooltip>
<div v-else>--</div>
</template>
</d2-table>
</div>
<div class="footer">
......@@ -120,7 +128,11 @@ export default {
{
label: '规格',
prop: 'specificationData'
},
{
label: '适用车型',
addHtml: 'carName',
width: 200,
},
{
label: '系列',
......@@ -163,6 +175,11 @@ export default {
label: '发货方',
prop: '',
addHtml: 'nowPurNum'
},
{
label: '备注',
prop: 'remark',
width: 150
}
]
},
......@@ -170,6 +187,15 @@ export default {
detailInfo: {}
}
},
filters: {
formatCar(list) {
console.log(list, 'list')
let str = list.map(item => {
return item.carTypeName
}).join(',')
return str.length > 15 ? str.substring(0, 15) + '...' : str
}
},
mounted() {
this.getStaffList()
},
......
......@@ -48,6 +48,15 @@
<span style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{ '-' }}</span>
</div>
</template>
<template slot="carName" slot-scope="scope">
<el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top">
<div slot="content">
<div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">{{ item.carTypeName }}</div>
</div>
<div>{{ scope.scope.suitCarTypeList | formatCar }}</div>
</el-tooltip>
<div v-else>--</div>
</template>
</d2-table>
</div>
<div class="examine-record" v-if="detailInfo.auditDetaiList && !paramsObj.factoryType">
......@@ -118,6 +127,15 @@ export default {
}
}
},
filters: {
formatCar(list) {
console.log(list, 'list')
let str = list.map(item => {
return item.carTypeName
}).join(',')
return str.length > 15 ? str.substring(0, 15) + '...' : str
}
},
mounted() {
this.dynamicParams()
// this.getDetail()
......@@ -154,7 +172,11 @@ export default {
{
label: '规格',
prop: 'specificationData'
},
{
label: '适用车型',
addHtml: 'carName',
width: 200
},
{
label: '系列',
......@@ -188,6 +210,11 @@ export default {
formatter: (cellValue) => {
return "¥" + cellValue.goodsTotalPrice
}
},
{
label: '备注',
prop: 'remark',
width: 150
}
]
},
......
......@@ -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,
......
......@@ -411,7 +411,7 @@ export default {
initDjzhySubMerchant() {
// 初始化嘀加智慧云子商户
getDjzhySubMerchant({}).then((res) => {
// console.log(res, 'getDjzhySubMerchant')
console.log(res, 'getDjzhySubMerchant')
const { merchantId, merchantName } = res
this.DjzhySubMerchantObj = {
djzhySubMerchantId: merchantId,
......
......@@ -80,7 +80,7 @@
:key="initIdx">
<template v-if="ininItem.nodeType == 1">
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 1) }">{{ ininItem.expenseCategoryName
}}</div>
}}</div>
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 2) }">{{ ininItem.calculateMode == 1
? '按品类计算' :
ininItem.calculateMode == 2 ? '按整单计算' :
......@@ -92,10 +92,10 @@
}}
</div>
<div class="detail-i" v-for="num in 3" :key="num"> {{ '-' }} </div>
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 4) }">
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 10) }">
{{ ininItem.merchantName || '-' }}
</div>
<div class="detail-i more" :class="{ 'isRed': filterIsRed(ininItem, 4) }">
<div class="detail-i more" :class="{ 'isRed': filterIsRed(ininItem, 10) }">
{{ ininItem.merchantId || '-' }}
</div>
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 4) }">
......@@ -107,7 +107,7 @@
</template>
<template v-if="ininItem.nodeType == 2">
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 1) }">{{ ininItem.expenseCategoryName
}}</div>
}}</div>
<div class="detail-i" :class="{ 'isRed': !item.diffTypes.length && filterIsRed(ininItem, 2) }">{{
ininItem.calculateMode == 1 ? '按品类计算' :
ininItem.calculateMode == 2 ? '按整单计算' :
......@@ -139,12 +139,12 @@
</div>
<div class="detail-i more">
<div v-for="(childrenITem, num) in ininItem.children" :key="num" class="childrenItem"
:class="{ 'isRed': filterIsRed(childrenITem, 4) }"> {{
:class="{ 'isRed': filterIsRed(childrenITem, 10) }"> {{
childrenITem.merchantName || '-' }}</div>
</div>
<div class="detail-i more">
<div v-for="(childrenITem, num) in ininItem.children" :key="num" class="childrenItem"
:class="{ 'isRed': filterIsRed(childrenITem, 4) }"> {{
:class="{ 'isRed': filterIsRed(childrenITem, 10) }"> {{
childrenITem.merchantId || '-' }}</div>
</div>
<div class="detail-i more">
......@@ -169,7 +169,7 @@
:key="initIdx">
<template v-if="ininItem.nodeType == 1">
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 1) }">{{ ininItem.expenseCategoryName
}}</div>
}}</div>
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 2) }">{{ ininItem.calculateMode == 1
? '按品类计算' :
ininItem.calculateMode == 2 ? '按整单计算' :
......@@ -181,10 +181,10 @@
}}
</div>
<div class="detail-i" v-for="num in 3" :key="num"> {{ '-' }} </div>
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 4) }">
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 10) }">
{{ ininItem.merchantName || '-' }}
</div>
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 4) }">
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 10) }">
{{ ininItem.merchantId || '-' }}
</div>
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 4) }">
......@@ -196,7 +196,7 @@
</template>
<template v-if="ininItem.nodeType == 2">
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 1) }">{{ ininItem.expenseCategoryName
}}</div>
}}</div>
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 2) }">{{ ininItem.calculateMode == 1
? '按品类计算' :
ininItem.calculateMode == 2 ? '按整单计算' :
......@@ -228,12 +228,12 @@
</div>
<div class="detail-i more">
<div v-for="(childrenITem, num) in ininItem.children" :key="num" class="childrenItem"
:class="{ 'isRed': filterIsRed(childrenITem, 4) }"> {{
:class="{ 'isRed': filterIsRed(childrenITem, 10) }"> {{
childrenITem.merchantName || '-' }}</div>
</div>
<div class="detail-i more">
<div v-for="(childrenITem, num) in ininItem.children" :key="num" class="childrenItem"
:class="{ 'isRed': filterIsRed(childrenITem, 4) }"> {{
:class="{ 'isRed': filterIsRed(childrenITem, 10) }"> {{
childrenITem.merchantId || '-' }}</div>
</div>
<div class="detail-i more">
......@@ -270,10 +270,10 @@
}}
</div>
<div class="detail-i" v-for="num in 3" :key="num"> {{ '-' }} </div>
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 4, item) }">
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 10, item) }">
{{ ininItem.merchantName || '-' }}
</div>
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 4, item) }">
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 10, item) }">
{{ ininItem.merchantId || '-' }}
</div>
<div class="detail-i" :class="{ 'isRed': filterIsRed(ininItem, 4, item) }">
......@@ -317,12 +317,12 @@
</div>
<div class="detail-i more">
<div v-for="(childrenITem, num) in ininItem.children" :key="num" class="childrenItem"
:class="{ 'isRed': filterIsRed(childrenITem, 4, item) }"> {{
:class="{ 'isRed': filterIsRed(childrenITem, 10, item) }"> {{
childrenITem.merchantName || '-' }}</div>
</div>
<div class="detail-i more">
<div v-for="(childrenITem, num) in ininItem.children" :key="num" class="childrenItem"
:class="{ 'isRed': filterIsRed(childrenITem, 4, item) }"> {{
:class="{ 'isRed': filterIsRed(childrenITem, 10, item) }"> {{
childrenITem.merchantId || '-' }}</div>
</div>
<div class="detail-i more">
......@@ -467,7 +467,7 @@ export default {
}
if (item.isCost) { // 成本费用
let flag = this.otherCostList.find(v => v.text == item.expenseCategoryName)
return parentItem?.[flag.diffTypeEvent] && parentItem?.[flag.diffTypeEvent]?.some(v => v == num)
return parentItem?.[flag?.diffTypeEvent] && parentItem?.[flag?.diffTypeEvent]?.some(v => v == num)
}
return item.diffTypes && item.diffTypes.some(v => v == num)
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!