Commit 3b2e1fa2 by 前端

Merge branch 'SAAS+V4.56.2' into 'SAAS+V5.0.0'

上线合并

See merge request !496
2 parents 049f034c 80bcd89f
...@@ -401,9 +401,12 @@ export default { ...@@ -401,9 +401,12 @@ export default {
// orderPageSize: 10, // orderPageSize: 10,
overwriteFiledJson: true overwriteFiledJson: true
} }
this.loading = true
billDetailPage(params).then(res => { billDetailPage(params).then(res => {
this.billTmplInfo = deepClone(res) this.billTmplInfo = deepClone(res)
this.handleBillVisible() this.handleBillVisible()
}).finally(() => {
this.loading = false
}) })
}, },
splitDialogVisible() { splitDialogVisible() {
...@@ -520,9 +523,12 @@ export default { ...@@ -520,9 +523,12 @@ export default {
// orderPageSize: 10, // orderPageSize: 10,
overwriteFiledJson: false overwriteFiledJson: false
} }
this.loading = true
billDetailPage(params).then(res => { billDetailPage(params).then(res => {
this.billTmplInfo = deepClone(res) this.billTmplInfo = deepClone(res)
this.handleChangeDetailVisible() this.handleChangeDetailVisible()
}).finally(() => {
this.loading = false
}) })
}, },
......
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
<el-table-column align="center" width="60px" label="序号" type="index" :index=" <el-table-column align="center" width="60px" label="序号" type="index" :index="
(index) => (index) =>
index + index +
((page.currentPage ((page.pageNum
? page.currentPage ? page.pageNum
: page.currentPage) - : page.pageNum) -
1) * page.pageSize + 1 1) * page.pageSize + 1
" /> " />
<el-table-column label="订单编号" prop="orderCode" align="center"></el-table-column> <el-table-column label="订单编号" prop="orderCode" align="center"></el-table-column>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination background @current-change="jumpPage" :current-page.sync="page.currentPage" :page-size="page.pageSize" layout="total, prev, pager, next" :total="tableTotal" /> <el-pagination background @current-change="jumpPage" :current-page.sync="page.pageNum" :page-size="page.pageSize" layout="total, prev, pager, next" :total="tableTotal" />
<div class="selected_box" v-if="selectedData.length"> <div class="selected_box" v-if="selectedData.length">
<span>已选订单:</span> <span>已选订单:</span>
<el-tooltip class="item" :content="formatSelected(selectedData, 'all')" placement="right"> <el-tooltip class="item" :content="formatSelected(selectedData, 'all')" placement="right">
...@@ -123,15 +123,6 @@ export default { ...@@ -123,15 +123,6 @@ export default {
isClear: true, isClear: true,
pickerOptions: 'rangePickerOptions' pickerOptions: 'rangePickerOptions'
}, { }, {
label: '支付方式',
name: 'payType',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'searchPayTypeList'
}, {
label: '商品名称', label: '商品名称',
name: 'orderGoodsName', name: 'orderGoodsName',
type: 'input', type: 'input',
...@@ -142,7 +133,7 @@ export default { ...@@ -142,7 +133,7 @@ export default {
tableTotal: 0, tableTotal: 0,
page: { page: {
pageSize: 10, pageSize: 10,
currentPage: 1 pageNum: 1
}, },
baseData: { baseData: {
searchPayTypeList: deepClone(payTypeList) searchPayTypeList: deepClone(payTypeList)
...@@ -240,9 +231,11 @@ export default { ...@@ -240,9 +231,11 @@ export default {
}, },
// 输入框输入限制 // 输入框输入限制
handleInput(e, index, row) { handleInput(e, index, row) {
let newValue = e.replace(/[^\d.]/g, '') var max = Math.abs(row.totalPrice)
var min = -max
let newValue = e
let oldValue = this.tableData[index].oldshopDivisionMoneyInput let oldValue = this.tableData[index].oldshopDivisionMoneyInput
this.$set(this.tableData[index], 'shopDivisionMoneyInput', limitPrice(newValue, oldValue, 6, 2)) this.$set(this.tableData[index], 'shopDivisionMoneyInput', limitPrice(newValue, oldValue, 20, 2, min, max, 'priceReg_negative_input'))
this.$set(this.tableData[index], 'oldshopDivisionMoneyInput', this.tableData[index].shopDivisionMoneyInput) this.$set(this.tableData[index], 'oldshopDivisionMoneyInput', this.tableData[index].shopDivisionMoneyInput)
const selIndex = this.selectedData?.findIndex(val => val.orderCode == row.orderCode) const selIndex = this.selectedData?.findIndex(val => val.orderCode == row.orderCode)
if (selIndex > -1) { if (selIndex > -1) {
...@@ -288,7 +281,7 @@ export default { ...@@ -288,7 +281,7 @@ export default {
ymerchantId: this.infoForm?.yqMerchantId, // 对账园区店 ymerchantId: this.infoForm?.yqMerchantId, // 对账园区店
merchantId: this.infoForm?.shopMerchantId, // 对账流量方 merchantId: this.infoForm?.shopMerchantId, // 对账流量方
...searchFormSearch, ...searchFormSearch,
currentPage: this.page.currentPage, pageNum: this.page.pageNum,
pageSize: this.page.pageSize, pageSize: this.page.pageSize,
// filterTransferAccounts: true, // 固定传参 // filterTransferAccounts: true, // 固定传参
// shopTrafficMoneyFlag: 'Y', // 固定传参 // shopTrafficMoneyFlag: 'Y', // 固定传参
...@@ -296,7 +289,7 @@ export default { ...@@ -296,7 +289,7 @@ export default {
} }
}, },
jumpPage(page) { jumpPage(page) {
this.page.currentPage = page this.page.pageNum = page
this.getOrderList() this.getOrderList()
}, },
handleSearch() { handleSearch() {
...@@ -311,7 +304,7 @@ export default { ...@@ -311,7 +304,7 @@ export default {
payType: '', payType: '',
orderGoodsName: '' orderGoodsName: ''
} }
this.page.currentPage = 1 this.page.pageNum = 1
this.handleSearch() this.handleSearch()
}, },
......
<template> <template>
<div class="dynamic-table-container"> <div class="dynamic-table-container">
{{configObj.title}}调整:<el-button type="default" v-if="isEdit" @click="addRow"> <span class="title">{{configObj.title}}调整:</span><el-button type="default" style="padding: 8px 20px;" v-if="isEdit" @click="addRow">
添加事由 添加事由
</el-button> </el-button>
<el-form :model="dynamicForm" ref="dynamicForm"> <el-form :model="dynamicForm" ref="dynamicForm">
<el-table :data="tableData" border style="width: 100%; margin-top: 20px"> <el-table :data="tableData" border style="width: 100%; margin-top: 20px !important;">
<el-table-column prop="index" label="序号" width="80" align="center"> <el-table-column prop="index" label="序号" width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + 1 }} {{ scope.$index + 1 }}
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<el-table-column label="操作" width="120" align="center" v-if="isEdit"> <el-table-column label="操作" width="120" align="center" v-if="isEdit">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="danger" @click="deleteRow(scope.$index)" icon="el-icon-delete"></el-button> <el-button size="mini" type="text" @click="deleteRow(scope.$index)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -121,11 +121,12 @@ export default { ...@@ -121,11 +121,12 @@ export default {
deleteRow(index) { deleteRow(index) {
this.tableData.splice(index, 1); this.tableData.splice(index, 1);
this.tableOldData = deepClone(this.tableData) this.tableOldData = deepClone(this.tableData)
this.$emit('handleInputBlur')
}, },
handleInput(rowIdx, attr) { handleInput(rowIdx, attr) {
const val = this.tableData[rowIdx][attr] const val = this.tableData[rowIdx][attr]
const oldVal = this.tableOldData[rowIdx][attr] const oldVal = this.tableOldData[rowIdx][attr]
this.tableData[rowIdx][attr] = limitPrice(val, oldVal, 9, 2, '', '', 'priceReg_negative') this.tableData[rowIdx][attr] = limitPrice(val, oldVal, 7, 2, '', '', 'priceReg_negative')
this.tableOldData[rowIdx][attr] = this.tableData[rowIdx][attr] this.tableOldData[rowIdx][attr] = this.tableData[rowIdx][attr]
}, },
handleInputBlur() { handleInputBlur() {
...@@ -144,12 +145,19 @@ export default { ...@@ -144,12 +145,19 @@ export default {
} }
</script> </script>
<style scoped> <style lang="scss">
.dynamic-table-container { .dynamic-table-container {
padding: 20px; box-sizing: border-box;
} padding: 20px 20px 0 20px;
.title {
font-size: 14px;
}
.el-table--medium td {
padding: 4px 16px !important;
}
.el-form-item { .el-form-item {
margin-bottom: 0; margin-bottom: 0;
}
} }
</style> </style>
<template> <template>
<div> <div>
<d2-dialog title="系统对账单" :is-visible="billVisible" class="privacyDailog" width="80%" btnOkLabel="返回" :noCancel="noCancel" @closeDialog="handleClose" @confirmDialog="handleClose"> <el-drawer title="系统对账单" :visible.sync="billVisible" size="100%" class="bill-drawer" :before-close="handleClose">
<div slot="title" class="drawer-title">系统对账单</div>
<div class="privacyDrawer">
<div class="flex"> <div class="flex">
<div>{{dateStr}}销售对账单</div> <div>{{dateStr}}销售对账单</div>
<div>适用对象:{{billTmplInfo.billMerchantName}}</div> <div>适用对象:{{billTmplInfo.billMerchantName}}</div>
</div> </div>
<el-table v-loading="loading" :data="tableList" style="width: 100%" ref="billMutiTable" show-summary :summary-method="getSummaries" :span-method="arraySpanMethod"> <el-table v-loading="loading" :data="tableList" style="width: 100%" height="652px" ref="billMutiTable" show-summary :summary-method="getSummaries" :span-method="arraySpanMethod">
<el-table-column v-for="(item, idx) in tableHeader" :key="idx" :label="item.moduleName"> <el-table-column v-for="(item, idx) in tableHeader" :key="idx" :label="item.moduleName">
<el-table-column v-for="(subItem, subIdx) in item.items" :key="subIdx" :prop="subItem.fieldCode" :label="subItem.fieldName" :width="subItem.width || '120px'"> <el-table-column v-for="(subItem, subIdx) in item.items" :key="subIdx" :prop="subItem.fieldCode" :label="subItem.fieldName" :width="subItem.width || '120px'">
<div class="tb-header-cell" slot="header"> <div class="tb-header-cell" slot="header">
...@@ -16,11 +18,14 @@ ...@@ -16,11 +18,14 @@
{{scope.row[subItem.extInfo.source || 'ORDER'][subItem.txtObj.selectField] ? (scope.row[subItem.extInfo.source || 'ORDER'][subItem.txtObj.selectField] + (scope.row[subItem.extInfo.source || 'ORDER'][subItem.txtObj.inputField] + '')) : '-'}} {{scope.row[subItem.extInfo.source || 'ORDER'][subItem.txtObj.selectField] ? (scope.row[subItem.extInfo.source || 'ORDER'][subItem.txtObj.selectField] + (scope.row[subItem.extInfo.source || 'ORDER'][subItem.txtObj.inputField] + '')) : '-'}}
</div> </div>
<!-- 普通文本显示 --> <!-- 普通文本显示 -->
<div v-else> <div v-else class="flex-center">
<div v-if="subItem.fieldCode == 'orderCode' && scope.row.ORDER.sourceType != 1" class="refund-txt">退</div> <div v-if="subItem.fieldCode == 'orderCode'" class="flex-center" style="margin-left: 12px;">
<span v-if="subItem.fieldCode == 'tradeNo'" :class="scope.row.ORDER.payVoucherList && scope.row.ORDER.payVoucherList.length ? 'txt-blue': '' "> <img v-if="scope.row.ORDER.sourceType != 1" class="refund-img" src="@/assets/retrun.png">
<el-image v-if="scope.row.ORDER.payVoucherList && scope.row.ORDER.payVoucherList.length" style="width: 20px; height: 20px" :src="scope.row.ORDER.payVoucherList[0].payVoucher" :preview-src-list="srcList" @click="handleReviewImg(scope.row)"></el-image> <div>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</div>
{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</span> </div>
<span v-else-if="subItem.fieldCode == 'tradeNo'" :class="['trade-no', scope.row.ORDER.payVoucherList && scope.row.ORDER.payVoucherList.length ? 'txt-blue': '' ]" @click="handleReviewImg(scope.row)">
{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}
</span>
<span v-else-if="scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] === 0">0</span> <span v-else-if="scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] === 0">0</span>
<span v-else>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</span> <span v-else>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</span>
</div> </div>
...@@ -30,18 +35,25 @@ ...@@ -30,18 +35,25 @@
</el-table> </el-table>
<!-- <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page.pageNum" :page-size="page.pageSize" :total="page.total" :page-sizes="[10, 20, 30, 40]" layout="sizes,total,->,prev,pager,next,jumper"> <!-- <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page.pageNum" :page-size="page.pageSize" :total="page.total" :page-sizes="[10, 20, 30, 40]" layout="sizes,total,->,prev,pager,next,jumper">
</el-pagination> --> </el-pagination> -->
<DynamicAddTable v-if="billTypeStr == 'traffic'" ref="dynamicReceiveAdd" :configObj="{'title': '应收'}" :receivableAdjustments="receivableAdjustments" @handleInputBlur="billCompute" :isEdit="isEdit"></DynamicAddTable> <DynamicAddTable v-if="billTypeStr == 'traffic'" ref="dynamicReceiveAdd" :configObj="{'title': '应收'}" :adjustments="receivableAdjustments" @handleInputBlur="billCompute" :isEdit="isEdit"></DynamicAddTable>
<DynamicAddTable ref="dynamicAdd" :adjustments="payableAdjustments" @handleInputBlur="billCompute" :isEdit="isEdit"></DynamicAddTable> <DynamicAddTable ref="dynamicAdd" :adjustments="payableAdjustments" @handleInputBlur="billCompute" :isEdit="isEdit"></DynamicAddTable>
</div>
<div class="footer">
<div class="total-box"> <div class="total-box">
<div>订单总数:{{ totalOrderCount }}</div> <div>订单总数:{{ totalOrderCount }}</div>
<div>总产值:{{ totalAmount }}</div> <div>总产值:{{ totalAmount }}元</div>
<div v-if="billTypeStr == 'traffic'">应收总额:{{ totalReceivable }}元</div> <div v-if="billTypeStr == 'traffic'">应收总额:{{ totalReceivable }}元</div>
<div>应付总额:{{ totalPayable }}元</div> <div>应付总额:{{ totalPayable }}元</div>
<div>线上分账总额:{{ totalSplitPaidAmount }}</div> <div v-if="billTypeStr == 'traffic'">线上分账总额:{{ totalSplitPaidAmount }}元</div>
<div>线下已付总额:{{ totalOfflinePaidAmount }}</div> <div v-if="billTypeStr == 'traffic'">线下已付总额:{{ totalOfflinePaidAmount }}元</div>
<div v-if="billTypeStr == 'traffic'">线下对账总额:{{ totalOfflineReconciliation }}元</div> <div v-if="billTypeStr == 'traffic'">线下对账总额:{{ totalOfflineReconciliation }}元</div>
</div> </div>
</d2-dialog> <div class="btn-box">
<el-button class="btn" @click="handleClose">返回</el-button>
</div>
</div>
</el-drawer>
<el-image-viewer style="z-index: 9999;" v-if="imgVisible" :on-close="closeImgViewer" :url-list="imgList" :initial-index="initialIndex" />
</div> </div>
</template> </template>
...@@ -64,13 +76,18 @@ export default { ...@@ -64,13 +76,18 @@ export default {
} }
}, },
components: { components: {
DynamicAddTable DynamicAddTable,
"el-image-viewer": () =>
import("element-ui/packages/image/src/image-viewer")
}, },
data() { data() {
return { return {
loading: false, loading: false,
noCancel: true, noCancel: true,
isEdit: false, isEdit: false,
imgVisible: false,
initialIndex: 0,
imgList: [],
billTypeStr: 'traffic', billTypeStr: 'traffic',
dateStr: '', dateStr: '',
tmplFieldsList: [], tmplFieldsList: [],
...@@ -121,14 +138,6 @@ export default { ...@@ -121,14 +138,6 @@ export default {
optionLabel: 'confLabel', optionLabel: 'confLabel',
optionsName: 'reconcileStatusList', optionsName: 'reconcileStatusList',
}, { }, {
name: '备注',
source: 'ORDER',
attr: 'coverReceiverType',
type: 'select',
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'coverReceiverTypeList',
}, {
name: '订单时间', name: '订单时间',
source: 'ORDER', source: 'ORDER',
attr: 'orderTime', attr: 'orderTime',
...@@ -208,14 +217,6 @@ export default { ...@@ -208,14 +217,6 @@ export default {
optionLabel: 'confLabel', optionLabel: 'confLabel',
optionsName: 'payTypeList', optionsName: 'payTypeList',
}, { }, {
name: '备注',
source: 'ORDER',
attr: 'coverReceiverType',
type: 'select',
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'coverReceiverTypeList',
}, {
name: '订单时间', name: '订单时间',
source: 'ORDER', source: 'ORDER',
attr: 'orderTime', attr: 'orderTime',
...@@ -362,8 +363,7 @@ export default { ...@@ -362,8 +363,7 @@ export default {
suffix: '元' suffix: '元'
}] }]
}, },
defaultWidth: '180px', defaultWidth: '180px'
srcList: []
} }
}, },
mounted() { mounted() {
...@@ -560,11 +560,18 @@ export default { ...@@ -560,11 +560,18 @@ export default {
this.modifyDelete(orderCode) this.modifyDelete(orderCode)
}, },
closeImgViewer() {
this.imgVisible = false
},
handleReviewImg(row) { handleReviewImg(row) {
this.srcList = [] this.imgList = []
row.ORDER.payVoucherList.forEach(item => { row.ORDER.payVoucherList.forEach(item => {
this.srcList.push(item.payVoucher) this.imgList.push(item.payVoucher)
}) })
if (!this.imgList.length) {
return true
}
this.imgVisible = !this.imgVisible
}, },
billCompute() { billCompute() {
...@@ -587,6 +594,7 @@ export default { ...@@ -587,6 +594,7 @@ export default {
this.totalPayable = res.totalPayable this.totalPayable = res.totalPayable
this.totalPayable = res.totalPayable this.totalPayable = res.totalPayable
this.totalSplitPaidAmount = res.totalSplitPaidAmount this.totalSplitPaidAmount = res.totalSplitPaidAmount
this.totalOfflinePaidAmount = res.totalOfflinePaidAmount
this.totalOfflineReconciliation = res.totalOfflineReconciliation this.totalOfflineReconciliation = res.totalOfflineReconciliation
this.orderTotalStat = res.orderTotalStat this.orderTotalStat = res.orderTotalStat
this.page.pageNum = res.orderPage?.pageNum || 1 this.page.pageNum = res.orderPage?.pageNum || 1
...@@ -611,10 +619,62 @@ export default { ...@@ -611,10 +619,62 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep.bill-drawer {
.el-drawer__header {
padding: 0;
margin: 0;
border-bottom: 1px solid #e5e5e5;
}
.drawer-title {
height: 26px;
line-height: 26px;
color: #333333;
font-size: 18px;
padding: 17px 20px;
font-weight: bold;
}
}
.privacyDrawer {
box-sizing: border-box;
padding: 20px;
overflow: scroll;
height: auto;
max-height: calc(100vh - 148px);
}
.flex { .flex {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.tmpl-box {
display: flex;
}
.fields-txt {
width: 305px;
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
margin-right: 8px;
}
.flex-center {
display: flex;
align-items: center;
}
.refund-img {
display: inline-block;
box-sizing: border-box;
width: 16px;
height: 16px;
line-height: 16px;
// font-size: 8px;
// padding: 2px;
border-radius: 3px;
color: #ffffff;
margin: 0 2px 0 0;
// background: linear-gradient(#ff8496 0%, #ff4e61 100%);
}
.el-form-item__error { .el-form-item__error {
color: #f56c6c; color: #f56c6c;
font-size: 12px; font-size: 12px;
...@@ -631,20 +691,6 @@ export default { ...@@ -631,20 +691,6 @@ export default {
} }
} }
.refund-txt {
display: inline-block;
box-sizing: border-box;
width: 16px;
height: 16px;
line-height: 16px;
font-size: 8px;
padding: 2px;
border-radius: 3px;
color: #ffffff;
margin: 0 8px 0 20px;
background: linear-gradient(#ff8496 0%, #ff4e61 100%);
}
.select-input-container { .select-input-container {
position: relative; position: relative;
...@@ -680,17 +726,29 @@ export default { ...@@ -680,17 +726,29 @@ export default {
top: 8px; top: 8px;
// transition: all 0.3s; // transition: all 0.3s;
} }
::v-deep input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
::v-deep input::-webkit-outer-spin-button {
-webkit-appearance: none !important;
}
/*设置number类型的input外观*/
::v-deep input[type="number"] {
-moz-appearance: textfield;
padding: 0 8px;
}
.tb-header-cell { .tb-header-cell {
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
white-space: nowrap; // white-space: nowrap;
display: inline-block; /* 或者 inline */ display: inline-block; /* 或者 inline */
} }
.tb-cell { .tb-cell {
padding: 14px; padding: 0px 6px;
text-align: center; text-align: center;
} }
::v-deep .el-table .cell { ::v-deep .el-table .cell {
padding: 0px 6px !important;
text-align: center; text-align: center;
} }
::v-deep .el-table__footer-wrapper tbody td { ::v-deep .el-table__footer-wrapper tbody td {
...@@ -700,11 +758,15 @@ export default { ...@@ -700,11 +758,15 @@ export default {
.total-box { .total-box {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
width: calc(100% - 200px);
div { div {
flex: 1; width: 25%;
padding: 2px 0;
// flex: 1;
} }
} }
.batch-box { .batch-box {
text-align: center;
margin: 10px 36px; margin: 10px 36px;
} }
.red-txt { .red-txt {
...@@ -716,4 +778,38 @@ export default { ...@@ -716,4 +778,38 @@ export default {
cursor: pointer; cursor: pointer;
color: #2a58ad; color: #2a58ad;
} }
.trade-no {
position: relative;
}
.pay-voucher-img {
position: absolute;
top: 0;
left: 0;
width: 83px;
height: 50px;
opacity: 1;
}
.footer {
position: absolute;
bottom: 0;
right: 0;
box-sizing: border-box;
width: 100%;
height: 84px;
display: flex;
justify-content: space-between;
align-items: center;
// text-align: right;
padding: 0 30px;
background: #ffffff;
.btn-box {
background: #ffffff;
width: 200px;
text-align: right;
}
.btn {
height: 32px;
padding: 8px 20px;
}
}
</style> </style>
<template> <template>
<div> <div>
<el-drawer title="系统对账单" :visible.sync="billVisible" size="100%" :before-close="handleClose"> <el-drawer :visible.sync="billVisible" size="100%" class="bill-drawer" :before-close="handleClose">
<div slot="title" class="drawer-title">系统对账单</div>
<div class="privacyDrawer"> <div class="privacyDrawer">
<div class="flex"> <div class="flex">
<div> <div>
...@@ -9,12 +10,12 @@ ...@@ -9,12 +10,12 @@
</div> </div>
<!-- <div>适用对象:{{billTmplInfo.billMerchantName}}</div> --> <!-- <div>适用对象:{{billTmplInfo.billMerchantName}}</div> -->
<el-form ref="accountForm" :model="infoForm" :rules="formRules" label-width="120px" class="flex"> <el-form ref="accountForm" :model="infoForm" :rules="formRules" label-width="120px" class="flex">
<el-form-item label="对账模版:" prop="templateId"> <el-form-item label="对账模版:" prop="templateId" style="margin-bottom: 10px;">
<el-select v-model="infoForm.templateId" style="width:120px" @change="handleTmplChange"> <el-select v-model="infoForm.templateId" style="width:240px" @change="handleTmplChange">
<el-option v-for="item in baseData[billTypeStr + 'TemplateList']" :key="item.id" :label="item.templateName" :value="item.id" /> <el-option v-for="item in baseData[billTypeStr + 'TemplateList']" :key="item.id" :label="item.templateName" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="fieldsJson" label-width="8px"> <el-form-item prop="fieldsJson" label-width="8px" style="margin-bottom: 10px;">
<div class="tmpl-box"> <div class="tmpl-box">
<el-tooltip v-show="infoForm.fieldsTxt" effect="dark" placement="top" :content="infoForm.fieldsTxt"> <el-tooltip v-show="infoForm.fieldsTxt" effect="dark" placement="top" :content="infoForm.fieldsTxt">
<span class="fields-txt">{{infoForm.fieldsTxt}}</span> <span class="fields-txt">{{infoForm.fieldsTxt}}</span>
...@@ -25,22 +26,23 @@ ...@@ -25,22 +26,23 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<el-table v-loading="loading" :data="tableList" style="width: 100%" height="452px" ref="billMutiTable" show-summary :summary-method="getSummaries" :span-method="arraySpanMethod" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="tableList" style="width: 100%" height="652px" ref="billMutiTable" show-summary :summary-method="getSummaries" :span-method="arraySpanMethod" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></el-table-column>
<el-table-column :fixed="[0].includes(idx)" v-for="(item, idx) in tableHeader" :key="idx" :label="item.moduleName"> <el-table-column v-for="(item, idx) in tableHeader" :key="idx" :label="item.moduleName">
<el-table-column v-for="(subItem, subIdx) in item.items" :key="subIdx" :prop="subItem.fieldCode" :label="subItem.fieldName" :width="subItem.width || '120px'"> <el-table-column v-for="(subItem, subIdx) in item.items" :key="subIdx" :prop="subItem.fieldCode" :label="subItem.fieldName" :width="subItem.width || '120px'">
<div class="tb-header-cell" slot="header" slot-scope="scope"> <div class="tb-header-cell" slot="header" slot-scope="scope">
<span>{{subItem.fieldName}}</span> <span>{{subItem.fieldName}}</span>
<img v-if="judgeImgShow(scope)" src="@/assets/icon-edit.png" style="cursor: pointer;margin-left: 5px;width: 16px;height: 16px; vertical-align: middle;" @click="handleBatch(scope)" /> <img v-if="judgeImgShow(scope)" src="@/assets/icon-edit2.png" style="cursor: pointer;margin-left: 5px;width: 16px;height: 16px; vertical-align: middle;" @click="handleBatch(scope)" />
<img v-if="judgeFilterImgShow(scope).show && judgeFilterImgShow(scope).icon =='icon-filter'" src="@/assets/icon-filter.png" style="cursor: pointer;margin-left: 5px;width: 16px;height: 16px;vertical-align: middle;" @click="handleOpenSearch(scope)" /> <img v-if="judgeFilterImgShow(scope).show && judgeFilterImgShow(scope).icon =='icon-filter'" src="@/assets/icon-filter.png" style="cursor: pointer;margin-left: 5px;width: 16px;height: 16px;vertical-align: middle;" @click="handleOpenSearch(scope)" />
<img v-if="judgeFilterImgShow(scope).show && judgeFilterImgShow(scope).icon =='icon-filter-check'" src="@/assets/icon-filter-check.png" style="cursor: pointer;margin-left: 5px;width: 16px;height: 16px;vertical-align: middle;" @click="handleOpenSearch(scope)" /> <img v-if="judgeFilterImgShow(scope).show && judgeFilterImgShow(scope).icon =='icon-filter-check'" src="@/assets/icon-filter-check.png" style="cursor: pointer;margin-left: 5px;width: 16px;height: 16px;vertical-align: middle;" @click="handleOpenSearch(scope)" />
</div> </div>
<div class="tb-cell" slot-scope="scope"> <div class="tb-cell" slot-scope="scope">
<!-- 输入框 --> <!-- 输入框 -->
<template v-if="subItem.editType == 'input'"> <template v-if="subItem.editType == 'input'">
<el-input :style="{ 'width': subItem.extInfo.width || '110px' }" :placeholder="item.placeholder || '请输入'" v-bind="subItem.attrs ? subItem.attrs : {}" v-on="subItem.listeners ? subItem.listeners : {}" :prefix-icon="subItem.prefixIcon" :disabled="judgeDisable(scope.$index, subItem.extInfo.source || 'ORDER', subItem)" v-model.trim="scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode]" :maxlength="subItem.maxlength" :type="subItem.inputType || 'text'" @input="(e) => handleInputDown(e, scope.$index, subItem.extInfo.source || 'ORDER', subItem)" @blur="modifyAdd(scope.$index, subItem.extInfo.source || 'ORDER', subItem.fieldCode, subItem)" :class="{ 'is-error': hasError(scope.$index, subItem.extInfo.source || 'ORDER', subItem.fieldCode) }"> <span v-if="judgeDisable(scope.$index, subItem.extInfo.source || 'ORDER', subItem) && ['partnerFeeCalculateCoefficient'].includes(subItem.fieldCode)">-</span>
<span v-if="subItem.editObj.prepend" slot="prepend">{{ subItem.editObj.prepend }}</span> <el-input v-else :style="{ 'width': subItem.extInfo.width || '110px' }" :placeholder="item.placeholder || '请输入'" v-bind="subItem.attrs ? subItem.attrs : {}" v-on="subItem.listeners ? subItem.listeners : {}" :prefix-icon="subItem.prefixIcon" :disabled="judgeDisable(scope.$index, subItem.extInfo.source || 'ORDER', subItem)" v-model.trim="scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode]" :maxlength="subItem.maxlength" :type="subItem.inputType || 'text'" @input="(e) => handleInputDown(e, scope.$index, subItem.extInfo.source || 'ORDER', subItem)" @blur="modifyAdd(scope.$index, subItem.extInfo.source || 'ORDER', subItem.fieldCode, subItem)" :class="{ 'is-error': hasError(scope.$index, subItem.extInfo.source || 'ORDER', subItem.fieldCode) }">
<span v-if="subItem.editObj.append" slot="suffix">{{ subItem.append }}</span> <span v-if="subItem.editObj.prepend" slot="prepend" style="font-size: 12px;">{{ subItem.editObj.prepend }}</span>
<span v-if="subItem.editObj.append" slot="suffix" style="font-size: 12px;">{{ subItem.append }}</span>
</el-input> </el-input>
<div v-if="hasError(scope.$index, subItem.extInfo.source || 'ORDER', subItem.fieldCode)" class="el-form-item__error"> <div v-if="hasError(scope.$index, subItem.extInfo.source || 'ORDER', subItem.fieldCode)" class="el-form-item__error">
{{ getErrorMessage(scope.$index, subItem.extInfo.source || 'ORDER', subItem.fieldCode) }} {{ getErrorMessage(scope.$index, subItem.extInfo.source || 'ORDER', subItem.fieldCode) }}
...@@ -59,7 +61,8 @@ ...@@ -59,7 +61,8 @@
<!-- 选择输入组合框 --> <!-- 选择输入组合框 -->
<div v-else-if="subItem.editType == 'selectInput'"> <div v-else-if="subItem.editType == 'selectInput'">
<div class="select-input-container"> <div class="select-input-container">
<el-input placeholder="请输入" v-model.trim="scope.row[subItem.extInfo.source || 'ORDER'][subItem.editObj.inputField]" :type="subItem.editObj.inputType || 'text'" class="input-with-select" :disabled="judgeDisable(scope.$index, subItem.extInfo.source || 'ORDER', subItem)" @blur="modifyAdd(scope.$index, subItem.extInfo.source || 'ORDER', subItem.fieldCode, subItem)" :class="{ 'is-error': hasError(scope.$index, subItem.extInfo.source || 'ORDER', subItem.editObj.inputField) }"> <span v-if="judgeDisable(scope.$index, subItem.extInfo.source || 'ORDER', subItem)">-</span>
<el-input v-else placeholder="请输入" v-model.trim="scope.row[subItem.extInfo.source || 'ORDER'][subItem.editObj.inputField]" :type="subItem.editObj.inputType || 'text'" class="input-with-select" :disabled="judgeDisable(scope.$index, subItem.extInfo.source || 'ORDER', subItem)" @input="handleSelectInputChange(scope.$index, subItem, false)" @blur="modifyAdd(scope.$index, subItem.extInfo.source || 'ORDER', subItem.fieldCode, subItem)" :class="{ 'is-error': hasError(scope.$index, subItem.extInfo.source || 'ORDER', subItem.editObj.inputField) }">
<el-select v-model="scope.row[subItem.extInfo.source || 'ORDER'][subItem.editObj.selectField]" style="width: 90px" :popper-append-to-body="false" slot="prepend" placeholder="请选择" :disabled="judgeDisable(scope.$index, subItem.extInfo.source || 'ORDER', subItem)" @change="handleSelectInputChange(scope.$index, subItem)" :class="{ 'is-error': hasError(scope.$index, subItem.extInfo.source || 'ORDER', subItem.editObj.selectField) }"> <el-select v-model="scope.row[subItem.extInfo.source || 'ORDER'][subItem.editObj.selectField]" style="width: 90px" :popper-append-to-body="false" slot="prepend" placeholder="请选择" :disabled="judgeDisable(scope.$index, subItem.extInfo.source || 'ORDER', subItem)" @change="handleSelectInputChange(scope.$index, subItem)" :class="{ 'is-error': hasError(scope.$index, subItem.extInfo.source || 'ORDER', subItem.editObj.selectField) }">
<el-option v-for="(k, kIdx) in subItem.editObj.optionList" :key="kIdx" :label="k[subItem.editObj.optionLabel]" :value="k[subItem.editObj.optionId]" /> <el-option v-for="(k, kIdx) in subItem.editObj.optionList" :key="kIdx" :label="k[subItem.editObj.optionLabel]" :value="k[subItem.editObj.optionId]" />
</el-select> </el-select>
...@@ -76,26 +79,24 @@ ...@@ -76,26 +79,24 @@
</div> </div>
</div> </div>
<div v-else-if="subItem.txtType == 'selectInput'"> <div v-else-if="subItem.txtType == 'selectInput'">
<!-- {{subItem.extInfo.source || 'ORDER'}}{{subItem.fieldCode}} -->
{{scope.row[subItem.extInfo.source || 'ORDER'][subItem.txtObj.selectField] ? (scope.row[subItem.extInfo.source || 'ORDER'][subItem.txtObj.selectField] + (scope.row[subItem.extInfo.source || 'ORDER'][subItem.txtObj.inputField] + '')) : '-'}} {{scope.row[subItem.extInfo.source || 'ORDER'][subItem.txtObj.selectField] ? (scope.row[subItem.extInfo.source || 'ORDER'][subItem.txtObj.selectField] + (scope.row[subItem.extInfo.source || 'ORDER'][subItem.txtObj.inputField] + '')) : '-'}}
</div> </div>
<!-- 普通文本显示 --> <!-- 普通文本显示 -->
<div v-else class="flex-center"> <div v-else class="flex-center">
<!-- {{subItem.extInfo.source || 'ORDER'}}{{subItem.fieldCode}} --> <div v-if="subItem.fieldCode == 'orderCode'" class="flex-center">
<div v-if="subItem.fieldCode == 'orderCode' && scope.row.ORDER.sourceType != 1"> <img v-if="scope.row.ORDER.sourceType != 1" class="refund-img" src="@/assets/retrun.png">
<div class="refund-txt">退</div>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }} <div>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</div>
</div> </div>
<span v-else-if="subItem.fieldCode == 'tradeNo'" :class="['trade-no', scope.row.ORDER.payVoucherList && scope.row.ORDER.payVoucherList.length ? 'txt-blue': '' ]" @click="handleReviewImg(scope.row)"> <div v-else-if="subItem.fieldCode == 'tradeNo'" :class="['trade-no', scope.row.ORDER.payVoucherList && scope.row.ORDER.payVoucherList.length ? 'txt-blue': '' ]" @click="handleReviewImg(scope.row)">
<el-image v-if="scope.row.ORDER.payVoucherList && scope.row.ORDER.payVoucherList.length && isShowPayVoucher != 0" class="pay-voucher-img" :src="scope.row.ORDER.payVoucherList[0].payVoucher" :preview-src-list="srcList" @preview-close="handlePreviewClose"></el-image>
{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }} {{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}
</span> </div>
<span v-else-if="scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] === 0">0</span> <div v-else-if="scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] === 0">0</div>
<span v-else>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</span> <div v-else>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</div>
</div> </div>
</div> </div>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作" :width=" billTypeStr == 'traffic' ? '50px' : ''">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" @click="handleDelete(scope.$index, scope.row)">删除</el-button> <el-button size="mini" type="text" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
</template> </template>
...@@ -106,23 +107,25 @@ ...@@ -106,23 +107,25 @@
<DynamicAddTable v-if="billTypeStr == 'traffic'" ref="dynamicReceiveAdd" :configObj="{'title': '应收'}" :adjustments="receivableAdjustments" @handleInputBlur="billCompute"></DynamicAddTable> <DynamicAddTable v-if="billTypeStr == 'traffic'" ref="dynamicReceiveAdd" :configObj="{'title': '应收'}" :adjustments="receivableAdjustments" @handleInputBlur="billCompute"></DynamicAddTable>
<DynamicAddTable ref="dynamicAdd" :adjustments="payableAdjustments" @handleInputBlur="billCompute"></DynamicAddTable> <DynamicAddTable ref="dynamicAdd" :adjustments="payableAdjustments" @handleInputBlur="billCompute"></DynamicAddTable>
</div> </div>
<div class="footer">
<div class="total-box"> <div class="total-box">
<div>订单总数:{{ totalOrderCount }}</div> <div>订单总数:{{ totalOrderCount }}</div>
<div>总产值:{{ totalAmount }}</div> <div>总产值:{{ totalAmount }}元</div>
<div v-if="billTypeStr == 'traffic'">应收总额:{{ totalReceivable }}元</div> <div v-if="billTypeStr == 'traffic'">应收总额:{{ totalReceivable }}元</div>
<div>应付总额:{{ totalPayable }}元</div> <div>应付总额:{{ totalPayable }}元</div>
<div>线上分账总额:{{ totalSplitPaidAmount }}</div> <div v-if="billTypeStr == 'traffic'">线上分账总额:{{ totalSplitPaidAmount }}元</div>
<div>线下已付总额:{{ totalOfflinePaidAmount }}</div> <div v-if="billTypeStr == 'traffic'">线下已付总额:{{ totalOfflinePaidAmount }}元</div>
<div v-if="billTypeStr == 'traffic'">线下对账总额:{{ totalOfflineReconciliation }}元</div> <div v-if="billTypeStr == 'traffic'">线下对账总额:{{ totalOfflineReconciliation }}元</div>
</div> </div>
<div class="footer"> <div class="btn-box">
<el-button @click="handleClose">取消</el-button> <el-button class="btn" @click="handleClose">取消</el-button>
<el-button type="primary" :loading="loading" @click="handleConfirm">确定</el-button> <el-button class="btn" type="primary" :loading="loading" @click="handleConfirm">确定</el-button>
</div>
</div> </div>
</el-drawer> </el-drawer>
<!-- 批量輸入 --> <!-- 批量輸入 -->
<d2-dialog :title="headObj.fieldCode == 'payType' ? '备注' : ('批量设置' + headObj.fieldName)" :is-visible="batchVisible" class="privacyDailog" width="480px" @closeDialog="handleBatchClose" @confirmDialog="handleBatchConfirm"> <d2-dialog v-if="batchVisible" :title="headObj.fieldCode == 'payType' ? '备注' : ('批量设置' + headObj.fieldName)" :is-visible="batchVisible" class="privacyDailog" width="480px" @closeDialog="handleBatchClose" @confirmDialog="handleBatchConfirm">
<div class="batch-box"> <div class="batch-box">
<!-- 输入框 --> <!-- 输入框 -->
<template v-if="headObj.editType == 'input'"> <template v-if="headObj.editType == 'input'">
...@@ -135,7 +138,7 @@ ...@@ -135,7 +138,7 @@
<!-- 选择框 --> <!-- 选择框 -->
<div v-else-if="headObj.editType == 'select'"> <div v-else-if="headObj.editType == 'select'">
<el-select style="width: 200px" v-model="batchForm[headObj.fieldCode]" placeholder="请选择" no-data-text="无数据" :class="{ 'is-error': dialogErrors[headObj.fieldCode] }" @change="batchValidateForm"> <el-select style="width: 400px" v-model="batchForm[headObj.fieldCode]" placeholder="请选择" no-data-text="无数据" :class="{ 'is-error': dialogErrors[headObj.fieldCode] }" @change="batchValidateForm">
<el-option v-for="k in baseData[headObj.editObj.optionsName]" :key="k[headObj.editObj.optionId]" :label="k[headObj.editObj.optionLabel]" :value="k[headObj.editObj.optionId]"></el-option> <el-option v-for="k in baseData[headObj.editObj.optionsName]" :key="k[headObj.editObj.optionId]" :label="k[headObj.editObj.optionLabel]" :value="k[headObj.editObj.optionId]"></el-option>
</el-select> </el-select>
<div v-if="dialogErrors[headObj.fieldCode]" class="el-form-item__error">{{ dialogErrors[headObj.fieldCode] }}</div> <div v-if="dialogErrors[headObj.fieldCode]" class="el-form-item__error">{{ dialogErrors[headObj.fieldCode] }}</div>
...@@ -144,8 +147,8 @@ ...@@ -144,8 +147,8 @@
<!-- 选择输入组合框 --> <!-- 选择输入组合框 -->
<div v-else-if="headObj.editType === 'selectInput'"> <div v-else-if="headObj.editType === 'selectInput'">
<div class="select-input-container"> <div class="select-input-container">
<el-input placeholder="请输入" v-model.trim="batchForm[headObj.editObj.inputField]" class="input-with-select" :class="{ 'is-error': dialogErrors[headObj.editObj.inputField] }" @blur="batchValidateForm"> <el-input placeholder="请输入" v-model.trim="batchForm[headObj.editObj.inputField]" class="input-with-select" :class="{ 'is-error': dialogErrors[headObj.editObj.inputField] }" :type="headObj.editObj.inputType || 'text'" @blur="batchValidateForm">
<el-select v-model="batchForm[headObj.editObj.selectField]" style="width: 80px" :popper-append-to-body="false" slot="prepend" placeholder="请选择" :class="{ 'is-error': dialogErrors[headObj.editObj.selectField] }" @change="batchValidateForm"> <el-select v-model="batchForm[headObj.editObj.selectField]" style="width: 200px" :popper-append-to-body="false" slot="prepend" placeholder="请选择" :class="{ 'is-error': dialogErrors[headObj.editObj.selectField] }" @change="batchValidateForm">
<el-option v-for="(k, kIdx) in headObj.editObj.optionList" :key="kIdx" :label="k[headObj.editObj.optionLabel]" :value="k[headObj.editObj.optionId]" /> <el-option v-for="(k, kIdx) in headObj.editObj.optionList" :key="kIdx" :label="k[headObj.editObj.optionLabel]" :value="k[headObj.editObj.optionId]" />
</el-select> </el-select>
<span v-if="headObj.editObj.suffixFn" slot="suffix"> <span v-if="headObj.editObj.suffixFn" slot="suffix">
...@@ -164,7 +167,7 @@ ...@@ -164,7 +167,7 @@
<tmpl-drawer v-if="tmplDrawerVisible" :tmplDrawerVisible="tmplDrawerVisible" :type="tmplInfo.type" :tmplSelectList="tmplInfo.tmplSelectList" @handleConfirm="handleCustConfirm" @handleClose="handleCustVisible"></tmpl-drawer> <tmpl-drawer v-if="tmplDrawerVisible" :tmplDrawerVisible="tmplDrawerVisible" :type="tmplInfo.type" :tmplSelectList="tmplInfo.tmplSelectList" @handleConfirm="handleCustConfirm" @handleClose="handleCustVisible"></tmpl-drawer>
<choose-refund-order-dialog v-if="chooseVisible" :chooseVisible="chooseVisible" :infoForm="refundInfo" @chooseOrderConfirm="chooseOrderConfirm" @dialogClose="changeChooseVisible"></choose-refund-order-dialog> <choose-refund-order-dialog v-if="chooseVisible" :chooseVisible="chooseVisible" :infoForm="refundInfo" @chooseOrderConfirm="chooseOrderConfirm" @dialogClose="changeChooseVisible"></choose-refund-order-dialog>
<glsk-form-dialog v-if="searchVisible" :selectVisible="searchVisible" :dialogConfig="searchDialogConfig" label-width="200px" :formRules="searchRules" :editData="searchForm" :editFormData="searchEditFormData" :baseData="baseData" @handleClose="searchDialogVisible" @handleConfirm="handleSearchConfirm"></glsk-form-dialog> <glsk-form-dialog v-if="searchVisible" :selectVisible="searchVisible" :dialogConfig="searchDialogConfig" label-width="200px" :formRules="searchRules" :editData="searchForm" :editFormData="searchEditFormData" :baseData="baseData" @handleClose="searchDialogVisible" @handleConfirm="handleSearchConfirm"></glsk-form-dialog>
<el-image-viewer style="z-index: 9999;" v-if="imgVisible" :on-close="closeImgViewer" :url-list="imgList" :initial-index="initialIndex" />
</div> </div>
</template> </template>
...@@ -192,12 +195,16 @@ export default { ...@@ -192,12 +195,16 @@ export default {
components: { components: {
DynamicAddTable, DynamicAddTable,
tmplDrawer, tmplDrawer,
ChooseRefundOrderDialog ChooseRefundOrderDialog,
"el-image-viewer": () =>
import("element-ui/packages/image/src/image-viewer")
}, },
data() { data() {
return { return {
loading: false, loading: false,
isShowPayVoucher: false, imgVisible: false,
initialIndex: 0,
imgList: [],
billTypeStr: 'traffic', billTypeStr: 'traffic',
dateStr: '', dateStr: '',
tmplFieldsList: [], tmplFieldsList: [],
...@@ -471,7 +478,7 @@ export default { ...@@ -471,7 +478,7 @@ export default {
totalOfflineReconciliation: 0, totalOfflineReconciliation: 0,
editObj: { editObj: {
select: { select: {
attrList: ['payType', 'platformMerchantId', 'payType'], attrList: ['payType', 'platformMerchantId'],
defaultConf: { defaultConf: {
payType: { payType: {
optionId: 'confId', optionId: 'confId',
...@@ -484,6 +491,7 @@ export default { ...@@ -484,6 +491,7 @@ export default {
optionId: 'merchantId', optionId: 'merchantId',
optionLabel: 'merchantName', optionLabel: 'merchantName',
optionsName: 'PlatformMerchantList', optionsName: 'PlatformMerchantList',
batchName: 'platformMerchantName',
fn: (val, listIdx, obj) => { fn: (val, listIdx, obj) => {
const source = obj.extInfo.source || 'ORDER' const source = obj.extInfo.source || 'ORDER'
this.tableList[listIdx][source].platformMerchantName = this.tableList[listIdx][source].platformMerchantName =
...@@ -503,9 +511,9 @@ export default { ...@@ -503,9 +511,9 @@ export default {
const totalPaymentObj = this.tmplFieldsList.find(item => item.fieldCode == 'totalPaymentAmount') const totalPaymentObj = this.tmplFieldsList.find(item => item.fieldCode == 'totalPaymentAmount')
var errorTxt = '' var errorTxt = ''
const min = 0 const min = 0
const max = this.tableList[rowIndex][totalPaymentObj.extInfo.source].totalPaymentAmount || '0' const max = Math.abs(this.tableList[rowIndex][totalPaymentObj.extInfo.source].totalPaymentAmount || 0).toFixed(2)
if (value > max || value < min) { if (value > max || value < min) {
errorTxt = `请输入大于${min}且小于${max}的数字` errorTxt = `请输入${min}-${max}的数字`
} else if (value !== null && value !== undefined && value !== '') { } else if (value !== null && value !== undefined && value !== '') {
const decimalPart = String(value).split('.')[1] const decimalPart = String(value).split('.')[1]
if (decimalPart && decimalPart.length > 2) { if (decimalPart && decimalPart.length > 2) {
...@@ -527,9 +535,10 @@ export default { ...@@ -527,9 +535,10 @@ export default {
orderList.forEach(item => { orderList.forEach(item => {
max = max + item[totalPaymentObj.extInfo.source].totalPaymentAmount max = max + item[totalPaymentObj.extInfo.source].totalPaymentAmount
}) })
min = parseFloat((max * -1).toFixed(2)) max = Math.abs(max).toFixed(2)
min = parseFloat((max * -1)).toFixed(2)
if (value > max || value < min) { if (value > max || value < min) {
errorTxt = `请输入大于${min}且小于${max}的数字` errorTxt = `请输入${min}-${max}的数字`
} else if (value !== null && value !== undefined && value !== '') { } else if (value !== null && value !== undefined && value !== '') {
const decimalPart = String(value).split('.')[1] const decimalPart = String(value).split('.')[1]
if (decimalPart && decimalPart.length > 2) { if (decimalPart && decimalPart.length > 2) {
...@@ -542,10 +551,17 @@ export default { ...@@ -542,10 +551,17 @@ export default {
// 线下已付金额 // 线下已付金额
offlinePaidAmount: { offlinePaidAmount: {
source: 'ORDER', source: 'ORDER',
rule: (value) => { rule: (value, rowIndex) => {
const totalPaymentObj = this.tmplFieldsList.find(item => item.fieldCode == 'totalPaymentAmount')
const orderList = this.tableList.filter(item => item.ORDER.id == this.tableList[rowIndex].ORDER.id)
var errorTxt = '' var errorTxt = ''
const min = 0 var min = 0
const max = 999999 var max = 0
orderList.forEach(item => {
max = max + item[totalPaymentObj.extInfo.source].totalPaymentAmount
})
max = Math.abs(max).toFixed(2)
min = parseFloat((max * -1)).toFixed(2)
if (value < min || value > max) { if (value < min || value > max) {
errorTxt = `请输入${min}-${max}的数字` errorTxt = `请输入${min}-${max}的数字`
} else if (value !== null && value !== undefined && value !== '') { } else if (value !== null && value !== undefined && value !== '') {
...@@ -758,33 +774,6 @@ export default { ...@@ -758,33 +774,6 @@ export default {
confId: 7, confId: 7,
confLabel: "其他收款" confLabel: "其他收款"
}], }],
// divisionTypeList: [{
// confId: 1,
// confLabel: '线下对账'
// }, {
// confId: 2,
// confLabel: '线上分账'
// }],
// divisionStatusList: [{
// confId: 1,
// confLabel: '待分账'
// }, {
// confId: 2,
// confLabel: '分账中'
// }, {
// confId: 3,
// confLabel: '分账成功'
// }, {
// confId: 4,
// confLabel: '分账失败'
// }],
// reconcileStatusList: [{
// confId: 1,
// confLabel: '未对账'
// }, {
// confId: 2,
// confLabel: '已对账'
// }],
payTypeList: payTypeList, payTypeList: payTypeList,
trafficFeeCalculateTypeList: [{ trafficFeeCalculateTypeList: [{
confId: 1, confId: 1,
...@@ -871,8 +860,7 @@ export default { ...@@ -871,8 +860,7 @@ export default {
}, },
// 选择退款订单 // 选择退款订单
chooseVisible: '', chooseVisible: '',
refundInfo: {}, refundInfo: {}
srcList: []
} }
}, },
mounted() { mounted() {
...@@ -883,7 +871,7 @@ export default { ...@@ -883,7 +871,7 @@ export default {
this.billTypeStr = this.billTmplInfo.billType == '1' ? 'traffic' : 'service' this.billTypeStr = this.billTmplInfo.billType == '1' ? 'traffic' : 'service'
console.log(this.billTmplInfo, 'this.billTmplInfo---') console.log(this.billTmplInfo, 'this.billTmplInfo---')
this.dateStr = Util.dateFormate(this.billTmplInfo.startDate, 'YYYY年MM月DD日') + '~' + Util.dateFormate(this.billTmplInfo.endDate, 'YYYY年MM月DD日') this.dateStr = Util.dateFormate(this.billTmplInfo.startDate, 'YYYY年MM月DD日') + '~' + Util.dateFormate(this.billTmplInfo.endDate, 'YYYY年MM月DD日')
this.tmplFieldsList = JSON.parse(this.billTmplInfo.fieldsJson) this.tmplFieldsList = JSON.parse(this.billTmplInfo.fixedFieldsJson)
console.log(this.tmplFieldsList, 'this.tmplFieldsList---') console.log(this.tmplFieldsList, 'this.tmplFieldsList---')
this.originalOrderList = this.billTmplInfo?.orderPage?.list || [] this.originalOrderList = this.billTmplInfo?.orderPage?.list || []
this.orderId = this.billTmplInfo.id this.orderId = this.billTmplInfo.id
...@@ -896,8 +884,9 @@ export default { ...@@ -896,8 +884,9 @@ export default {
this.totalOfflinePaidAmount = this.billTmplInfo.totalOfflinePaidAmount this.totalOfflinePaidAmount = this.billTmplInfo.totalOfflinePaidAmount
this.totalOfflineReconciliation = this.billTmplInfo.totalOfflineReconciliation this.totalOfflineReconciliation = this.billTmplInfo.totalOfflineReconciliation
this.infoForm.tmplType = this.billTmplInfo.billType this.infoForm.tmplType = this.billTmplInfo.billType
this.infoForm.templateId = this.billTmplInfo.templateId this.infoForm.templateId = this.billTmplInfo.templateId || 'all'
this.infoForm.fieldsJson = JSON.parse(this.billTmplInfo.fieldsJson) this.infoForm.fieldsJson = JSON.parse(this.billTmplInfo.fieldsJson)
this.tmplSelectList = this.infoForm.fieldsJson.map(i => i.id)
this.infoForm.fieldsTxt = this.getFieldsTxt() this.infoForm.fieldsTxt = this.getFieldsTxt()
// this.page.pageNum = this.billTmplInfo?.orderPage?.pageNum || 1 // this.page.pageNum = this.billTmplInfo?.orderPage?.pageNum || 1
// this.page.pageSize = this.billTmplInfo?.orderPage?.pageSize || 10 // this.page.pageSize = this.billTmplInfo?.orderPage?.pageSize || 10
...@@ -949,7 +938,6 @@ export default { ...@@ -949,7 +938,6 @@ export default {
getMetaTmpl() { getMetaTmpl() {
const tmplName = this.localTmplList.find(item => item.type == this.infoForm.tmplType)?.name || 'trafficTmpl' const tmplName = this.localTmplList.find(item => item.type == this.infoForm.tmplType)?.name || 'trafficTmpl'
var list = JSON.parse(localStorage.getItem(tmplName)) var list = JSON.parse(localStorage.getItem(tmplName))
console.log(list, 'list0000000')
if (list) { if (list) {
this.dealFieldsJson(list) this.dealFieldsJson(list)
} else { } else {
...@@ -1110,7 +1098,7 @@ export default { ...@@ -1110,7 +1098,7 @@ export default {
}) })
return params return params
}, },
billComputePage() { billComputePage(noChangeFixedSum = false, fn = null) {
console.log(this.tableList, 'this.tableList---') console.log(this.tableList, 'this.tableList---')
this.loading = true this.loading = true
console.log(this.tableModifyList, 'this.tableModifyList----') console.log(this.tableModifyList, 'this.tableModifyList----')
...@@ -1129,17 +1117,20 @@ export default { ...@@ -1129,17 +1117,20 @@ export default {
billComputePage({ json: JSON.stringify(dynamicForm) }).then(res => { billComputePage({ json: JSON.stringify(dynamicForm) }).then(res => {
this.originalOrderList = res.orderPage?.list || [] this.originalOrderList = res.orderPage?.list || []
this.totalAmount = res.totalAmount this.totalAmount = res.totalAmount
if (!noChangeFixedSum) {
this.totalOrderCount = res.totalOrderCount this.totalOrderCount = res.totalOrderCount
this.totalReceivable = res.totalReceivable this.totalReceivable = res.totalReceivable
this.totalPayable = res.totalPayable this.totalPayable = res.totalPayable
this.totalPayable = res.totalPayable this.totalPayable = res.totalPayable
this.totalSplitPaidAmount = res.totalSplitPaidAmount this.totalSplitPaidAmount = res.totalSplitPaidAmount
this.totalOfflinePaidAmount = res.totalOfflinePaidAmount
this.totalOfflineReconciliation = res.totalOfflineReconciliation this.totalOfflineReconciliation = res.totalOfflineReconciliation
}
this.orderTotalStat = res.orderTotalStat this.orderTotalStat = res.orderTotalStat
// this.page.pageNum = res.orderPage?.pageNum || 1 // this.page.pageNum = res.orderPage?.pageNum || 1
// this.page.pageSize = res.orderPage?.pageSize || 10 // this.page.pageSize = res.orderPage?.pageSize || 10
this.page.total = res.orderPage?.total || 0 this.page.total = res.orderPage?.total || 0
this.dealTableData() this.dealTableData(fn)
}).finally(() => { }).finally(() => {
this.loading = false this.loading = false
}) })
...@@ -1153,6 +1144,9 @@ export default { ...@@ -1153,6 +1144,9 @@ export default {
if (this.judgeDisable(rowIndex, source, fieldConfig)) { if (this.judgeDisable(rowIndex, source, fieldConfig)) {
return true return true
} }
if (['remark'].includes(fieldConfig.fieldCode)) {
return true
}
if (fieldConfig?.editType === 'selectInput') { if (fieldConfig?.editType === 'selectInput') {
const obj = this.tableList[rowIndex][source] const obj = this.tableList[rowIndex][source]
const selectVal = obj[fieldConfig.editObj.selectField] const selectVal = obj[fieldConfig.editObj.selectField]
...@@ -1197,10 +1191,9 @@ export default { ...@@ -1197,10 +1191,9 @@ export default {
Object.keys(row).forEach(source => { Object.keys(row).forEach(source => {
Object.keys(row[source]).forEach(field => { Object.keys(row[source]).forEach(field => {
const fieldConfig = this.getFieldConfig(field, source) const fieldConfig = this.getFieldConfig(field, source)
let headObj = this.tmplFieldsList.find(i => i.fieldCode == field) // let headObj = this.tmplFieldsList.find(i => i.fieldCode == field)
if (!noValidList.includes(field) && fieldConfig && this.isEditableField(fieldConfig, field)) { if (!noValidList.includes(field) && fieldConfig && this.isEditableField(fieldConfig, field)) {
if (!this.validateField(rowIndex, source, field, fieldConfig)) { if (!this.validateField(rowIndex, source, field, fieldConfig)) {
console.log(rowIndex, source, field, fieldConfig, '===')
isValid = false isValid = false
} }
} }
...@@ -1235,11 +1228,11 @@ export default { ...@@ -1235,11 +1228,11 @@ export default {
this.validateField(rowIndex, fieldConfig.extInfo.source || 'ORDER', fieldConfig.fieldCode, fieldConfig) this.validateField(rowIndex, fieldConfig.extInfo.source || 'ORDER', fieldConfig.fieldCode, fieldConfig)
}, },
handleSelectInputChange(rowIndex, fieldConfig) { handleSelectInputChange(rowIndex, fieldConfig, isApi = true) {
const source = fieldConfig.extInfo.source || 'ORDER' const source = fieldConfig.extInfo.source || 'ORDER'
this.validateField(rowIndex, source, fieldConfig.editObj.selectField, fieldConfig) this.validateField(rowIndex, source, fieldConfig.editObj.selectField, fieldConfig)
this.validateField(rowIndex, source, fieldConfig.editObj.inputField, fieldConfig) this.validateField(rowIndex, source, fieldConfig.editObj.inputField, fieldConfig)
this.modifyAdd(rowIndex, source, fieldConfig.fieldCode, fieldConfig) isApi && this.modifyAdd(rowIndex, source, fieldConfig.fieldCode, fieldConfig)
}, },
// 选择退款订单 // 选择退款订单
...@@ -1325,15 +1318,17 @@ export default { ...@@ -1325,15 +1318,17 @@ export default {
}, },
handleSearchConfirm() { handleSearchConfirm() {
this.validationErrors = {}
this.searchDialogVisible() this.searchDialogVisible()
console.log(this.searchForm, 'searchform') // console.log(this.searchForm, 'searchform')
this.billComputePage() this.billComputePage(true)
}, },
handleConfirm() { handleConfirm() {
this.handleResetSearch()
this.isFirst = true
this.billComputePage(false, () => {
const validFlag = this.billTypeStr == 'traffic' ? (this.$refs.dynamicReceiveAdd.validateForm() && this.$refs.dynamicAdd.validateForm()) : this.$refs.dynamicAdd.validateForm() const validFlag = this.billTypeStr == 'traffic' ? (this.$refs.dynamicReceiveAdd.validateForm() && this.$refs.dynamicAdd.validateForm()) : this.$refs.dynamicAdd.validateForm()
console.log(validFlag, 'validFlag---')
console.log(this.validateForm(), 'this.validateForm()--')
if (this.validateForm() && validFlag) { if (this.validateForm() && validFlag) {
const dynamicForm = { const dynamicForm = {
id: this.orderId, id: this.orderId,
...@@ -1342,17 +1337,21 @@ export default { ...@@ -1342,17 +1337,21 @@ export default {
receivableAdjustments: this.$refs.dynamicReceiveAdd?.dynamicForm.tableData || [], receivableAdjustments: this.$refs.dynamicReceiveAdd?.dynamicForm.tableData || [],
payableAdjustments: this.$refs.dynamicAdd?.dynamicForm.tableData || [], payableAdjustments: this.$refs.dynamicAdd?.dynamicForm.tableData || [],
sceneType: this.sceneType, sceneType: this.sceneType,
templateId: this.infoForm.templateId, templateId: this.infoForm.templateId == 'all' ? '' : this.infoForm.templateId,
fieldsJson: this.infoForm.fieldsJson fieldsJson: this.infoForm.fieldsJson
} }
// console.log(dynamicForm, 'dynamicForm') // console.log(dynamicForm, 'dynamicForm')
this.loading = true
editBillPage({ json: JSON.stringify(dynamicForm) }).then(res => { editBillPage({ json: JSON.stringify(dynamicForm) }).then(res => {
this.$message.success("操作成功") this.$message.success("操作成功")
this.$emit('handleConfirm') this.$emit('handleConfirm')
}).finally(() => {
this.loading = false
}) })
} else { } else {
this.$message.error('请检查表单中的报错项') this.$message.error('请检查表单中的报错项')
} }
})
}, },
handleClose() { handleClose() {
...@@ -1399,13 +1398,13 @@ export default { ...@@ -1399,13 +1398,13 @@ export default {
k.editType = 'input' k.editType = 'input'
k.inputType = this.editObj.input.defaultConf[k.fieldCode].inputType || 'number' k.inputType = this.editObj.input.defaultConf[k.fieldCode].inputType || 'number'
k.maxlength = this.editObj.input.defaultConf[k.fieldCode].maxlength || '' k.maxlength = this.editObj.input.defaultConf[k.fieldCode].maxlength || ''
k.width = '90px' k.width = '100px'
k.editObj = { k.editObj = {
...this.editObj.input.defaultConf[k.fieldCode], ...this.editObj.input.defaultConf[k.fieldCode],
width: '80px' width: '90px'
} }
if (k.fieldCode == 'partnerFeeCalculateCoefficient') { if (k.fieldCode == 'partnerFeeCalculateCoefficient') {
k.width = '200px' k.width = '180px'
// k.editObj.width = '110px' // k.editObj.width = '110px'
} }
} }
...@@ -1420,10 +1419,12 @@ export default { ...@@ -1420,10 +1419,12 @@ export default {
k.width = '193px' k.width = '193px'
} }
} else { } else {
k.width = '100px' const widthObj = {
if (k.fieldCode == 'serialNo') { serialNo: '40px',
k.width = '60px' orderCode: '86px',
customerName: '74px'
} }
k.width = widthObj[k.fieldCode] || '80px'
} }
const txtObj = txtList.find(m => (m.source + m.attr) == (k.extInfo.source + k.fieldCode)) const txtObj = txtList.find(m => (m.source + m.attr) == (k.extInfo.source + k.fieldCode))
...@@ -1432,23 +1433,22 @@ export default { ...@@ -1432,23 +1433,22 @@ export default {
k.txtType = 'selectInput' k.txtType = 'selectInput'
k.txtObj = { k.txtObj = {
selectField: k.fieldCode.split(',')[0], selectField: k.fieldCode.split(',')[0],
inputField: k.fieldCode.split(',')[1], inputField: k.fieldCode.split(',')[1]
} }
} }
} }
}) })
this.tableHeader.push({ this.tableHeader.push({
moduleName: item, moduleName: item,
items: list items: list
}) })
}) })
console.log(this.tableHeader, 'v---') // console.log(this.tableHeader, 'v---')
this.dealTableData(this.tableHeader) this.dealTableData()
}, },
// 处理表格里面的数据,需结合表头这个字段的特有属性进行处理 // 处理表格里面的数据,需结合表头这个字段的特有属性进行处理
dealTableData() { dealTableData(fn = null) {
this.tableList = [] this.tableList = []
let serialNo = 0 let serialNo = 0
const txtList = this[this.billTypeStr + 'ChangeTxtList'] const txtList = this[this.billTypeStr + 'ChangeTxtList']
...@@ -1501,6 +1501,9 @@ export default { ...@@ -1501,6 +1501,9 @@ export default {
this.ownOrderList = deepClone(this.tableList) this.ownOrderList = deepClone(this.tableList)
this.isFirst = false this.isFirst = false
} }
if (fn) {
fn()
}
// console.log(this.originalOrderList, 'this.originalOrderList----') // console.log(this.originalOrderList, 'this.originalOrderList----')
// console.log(this.tableList, 'this.tableList---') // console.log(this.tableList, 'this.tableList---')
}, },
...@@ -1514,46 +1517,47 @@ export default { ...@@ -1514,46 +1517,47 @@ export default {
} }
/** /**
* 流量方 - traffic;服务商 - service * 流量方 - traffic;服务商 - service
* 对账单类型为服务商时,支付方式不能编辑
* */
if (this.billTypeStr == 'service') {
if (['ORDERpayType'].includes(source + fieldConfig.fieldCode)) {
isDisable = true
}
}
/**
* sourceType:1-订单;2-退款 * sourceType:1-订单;2-退款
* 订单是退款单时,流量方总金额,服务商品类比例,按新政策标准,备注的字段可以编辑 * 流量方 && 退款:流量方品类比例不能编辑
*/ * */
if (value.ORDER.sourceType != 1) { if (this.billTypeStr == 'traffic' && value.ORDER.sourceType != 1) {
if (!['ORDERshopDivisionMoney', 'SUB_ORDERpartnerFeeCalculateType,partnerFeeCalculateValue', 'SUB_ORDERpartnerFeeCalculateType', 'SUB_ORDERpartnerFeeCalculateValue', 'SUB_ORDERpartnerFeeCalculateCoefficient', 'SUB_ORDERsecondPartnerFee', 'ORDERremark'].includes(source + fieldConfig.fieldCode)) { if (['SUB_ORDERtrafficFeeCalculateType,trafficFeeCalculateValue'].includes(source + fieldConfig.fieldCode)) {
isDisable = true isDisable = true
} }
} }
/** /**
* 流量方 - traffic;服务商 - service
* sourceType:1-订单;2-退款 * sourceType:1-订单;2-退款
* 订单是退款单时,服务商2的金额可以编辑 * 服务商 && 正常订单:服务费2不能编辑
*/ * 服务商 && 退款:服务商品类比例、按新政策标准不能编辑
* */
if (this.billTypeStr == 'service') {
if (value.ORDER.sourceType == 1) { if (value.ORDER.sourceType == 1) {
if (['SUB_ORDERsecondPartnerFee'].includes(source + fieldConfig.fieldCode)) { if (['SUB_ORDERsecondPartnerFee', 'ORDERpayType'].includes(source + fieldConfig.fieldCode)) {
isDisable = true isDisable = true
} }
} }
/** editable为false,平台方和支付方式不能编辑 */ if (value.ORDER.sourceType != 1) {
if (value.ORDER.editable == false) { if (['SUB_ORDERpartnerFeeCalculateType,partnerFeeCalculateValue', 'SUB_ORDERpartnerFeeCalculateCoefficient', 'ORDERpayType'].includes(source + fieldConfig.fieldCode)) {
if (['ORDERplatformMerchantId', 'ORDERpayType'].includes(source + fieldConfig.fieldCode)) {
isDisable = true isDisable = true
} }
} }
}
/** editable为false,平台方和支付方式不能编辑 */
// if (value.ORDER.editable == false) {
// if (['ORDERplatformMerchantId', 'ORDERpayType'].includes(source + fieldConfig.fieldCode)) {
// isDisable = true
// }
// }
return isDisable return isDisable
}, },
// 判断表头字段是否可以批量编辑 // 判断表头字段是否可以批量编辑
judgeImgShow(obj) { judgeImgShow(obj) {
const list = deepClone(this[this.billTypeStr + 'SourceEditList']) const list = deepClone(this[this.billTypeStr + 'SourceEditList'])
const editList = [] const editList = []
const noBatchEditAtttrList = ['ORDERpayType', 'ORDERremark'] const batchEditAtttrList = ['ORDERplatformMerchantId', 'SUB_ORDERtrafficFeeCalculateType,trafficFeeCalculateValue', 'SUB_ORDERpartnerFeeCalculateType,partnerFeeCalculateValue', 'SUB_ORDERpartnerFeeCalculateCoefficient']
list.forEach(item => { list.forEach(item => {
if (!noBatchEditAtttrList.includes(item)) { if (batchEditAtttrList.includes(item)) {
editList.push(item) editList.push(item)
} }
}) })
...@@ -1614,15 +1618,18 @@ export default { ...@@ -1614,15 +1618,18 @@ export default {
} }
return isValid; return isValid;
}, },
closeImgViewer() {
this.imgVisible = false
},
handleReviewImg(row) { handleReviewImg(row) {
this.srcList = [] this.imgList = []
row.ORDER.payVoucherList.forEach(item => { row.ORDER.payVoucherList.forEach(item => {
this.srcList.push(item.payVoucher) this.imgList.push(item.payVoucher)
}) })
this.isShowPayVoucher = ++this.isShowPayVoucher if (!this.imgList.length) {
if (this.isShowPayVoucher == 3) { return true
this.isShowPayVoucher = 0
} }
this.imgVisible = !this.imgVisible
}, },
handlePreviewClose() { handlePreviewClose() {
console.log(111) console.log(111)
...@@ -1631,7 +1638,7 @@ export default { ...@@ -1631,7 +1638,7 @@ export default {
this.batchVisible = !this.batchVisible this.batchVisible = !this.batchVisible
}, },
handleBatchClose() { handleBatchClose() {
this.dialogErrors = {}; this.dialogErrors = {}
this.handelBatchVisible() this.handelBatchVisible()
this.headObj = {} this.headObj = {}
}, },
...@@ -1647,6 +1654,13 @@ export default { ...@@ -1647,6 +1654,13 @@ export default {
if (this.headObj.editType == 'selectInput') { if (this.headObj.editType == 'selectInput') {
this.tableList[idx][this.headObj.extInfo.source || 'ORDER'][this.headObj.editObj.selectField] = this.batchForm[this.headObj.editObj.selectField] this.tableList[idx][this.headObj.extInfo.source || 'ORDER'][this.headObj.editObj.selectField] = this.batchForm[this.headObj.editObj.selectField]
this.tableList[idx][this.headObj.extInfo.source || 'ORDER'][this.headObj.editObj.inputField] = this.batchForm[this.headObj.editObj.inputField] this.tableList[idx][this.headObj.extInfo.source || 'ORDER'][this.headObj.editObj.inputField] = this.batchForm[this.headObj.editObj.inputField]
} else if (this.headObj.editType == 'select') {
this.tableList[idx][this.headObj.extInfo.source || 'ORDER'][this.headObj.fieldCode] = this.batchForm[this.headObj.fieldCode]
if (this.headObj.editObj.batchName) {
this.tableList[idx][this.headObj.extInfo.source || 'ORDER'][this.headObj.editObj.batchName] =
this.baseData[this.headObj.editObj.optionsName]
.find(item => item[this.headObj.editObj.optionId] == this.batchForm[this.headObj.fieldCode])?.[this.headObj.editObj.optionLabel]
}
} else { } else {
this.tableList[idx][this.headObj.extInfo.source || 'ORDER'][this.headObj.fieldCode] = this.batchForm[this.headObj.fieldCode] this.tableList[idx][this.headObj.extInfo.source || 'ORDER'][this.headObj.fieldCode] = this.batchForm[this.headObj.fieldCode]
} }
...@@ -1659,8 +1673,8 @@ export default { ...@@ -1659,8 +1673,8 @@ export default {
this.dealModify(rowIdx, this.headObj.extInfo.source, this.headObj.fieldCode) this.dealModify(rowIdx, this.headObj.extInfo.source, this.headObj.fieldCode)
}) })
this.$nextTick(() => { this.$nextTick(() => {
this.billCompute()
this.handleBatchClose() this.handleBatchClose()
this.billCompute()
}) })
} }
}, },
...@@ -1733,6 +1747,7 @@ export default { ...@@ -1733,6 +1747,7 @@ export default {
return true return true
} }
const id = row.ORDER.id const id = row.ORDER.id
this.validationErrors = {}
let list = [] let list = []
this.tableList.forEach(item => { this.tableList.forEach(item => {
if (item.ORDER.id != id) { if (item.ORDER.id != id) {
...@@ -1767,7 +1782,7 @@ export default { ...@@ -1767,7 +1782,7 @@ export default {
maxLengthInput(e, item) { maxLengthInput(e, item) {
// 处理输入长度限制 // 处理输入长度限制
}, }
// handleSizeChange(value) { // handleSizeChange(value) {
// this.page.pageSize = value // this.page.pageSize = value
...@@ -1782,10 +1797,27 @@ export default { ...@@ -1782,10 +1797,27 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep.bill-drawer {
.el-drawer__header {
padding: 0;
margin: 0;
border-bottom: 1px solid #e5e5e5;
}
.drawer-title {
height: 26px;
line-height: 26px;
color: #333333;
font-size: 18px;
padding: 17px 20px;
font-weight: bold;
}
}
.privacyDrawer { .privacyDrawer {
box-sizing: border-box;
padding: 20px; padding: 20px;
overflow: scroll; overflow: scroll;
height: calc(100% - 150px); height: auto;
max-height: calc(100vh - 148px);
} }
.flex { .flex {
display: flex; display: flex;
...@@ -1806,19 +1838,20 @@ export default { ...@@ -1806,19 +1838,20 @@ export default {
.flex-center { .flex-center {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
} }
.refund-txt { .refund-img {
display: inline-block; display: inline-block;
box-sizing: border-box; box-sizing: border-box;
width: 16px; width: 16px;
height: 16px; height: 16px;
line-height: 16px; line-height: 16px;
font-size: 8px; // font-size: 8px;
padding: 2px; // padding: 2px;
border-radius: 3px; border-radius: 3px;
color: #ffffff; color: #ffffff;
margin: 0 8px 0 20px; margin: 0 2px 0 0;
background: linear-gradient(#ff8496 0%, #ff4e61 100%); // background: linear-gradient(#ff8496 0%, #ff4e61 100%);
} }
.el-form-item__error { .el-form-item__error {
...@@ -1840,6 +1873,9 @@ export default { ...@@ -1840,6 +1873,9 @@ export default {
.select-input-container { .select-input-container {
position: relative; position: relative;
::v-deep input[type="number"] {
padding: 0 16px 0 8px;
}
.el-form-item__error { .el-form-item__error {
position: static; position: static;
margin-top: 2px; margin-top: 2px;
...@@ -1864,39 +1900,87 @@ export default { ...@@ -1864,39 +1900,87 @@ export default {
border-left-color: #dcdfe6; border-left-color: #dcdfe6;
} }
} }
.el-input-group__prepend {
.el-input__inner {
font-size: 12px;
}
}
} }
} }
::v-deep .el-input__suffix .inputSuffix { ::v-deep .el-input__suffix .inputSuffix {
position: absolute; position: absolute;
left: -14px; left: -12px;
top: 8px; top: 8px;
// transition: all 0.3s; // transition: all 0.3s;
font-size: 12px;
}
::v-deep input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
::v-deep input::-webkit-outer-spin-button {
-webkit-appearance: none !important;
}
/*设置number类型的input外观*/
::v-deep input[type="number"] {
-moz-appearance: textfield;
} }
.tb-header-cell { .tb-header-cell {
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
// white-space: nowrap; // white-space: nowrap;
display: inline-block; /* 或者 inline */ display: inline-block; /* 或者 inline */
font-size: 12px;
} }
.tb-cell { .tb-cell {
padding: 8px; padding: 0;
text-align: center; text-align: center;
font-size: 12px;
} }
::v-deep .el-table .cell { ::v-deep .el-table .cell {
padding: 0px 6px !important;
text-align: center; text-align: center;
font-size: 12px;
}
::v-deep .el-select .el-input__inner {
font-size: 12px;
padding-left: 8px;
}
::v-deep .el-input__inner {
font-size: 12px;
padding: 0 8px;
}
::v-deep .el-select-dropdown__item {
font-size: 12px;
}
::v-deep .el-table th {
font-size: 12px;
}
::v-deep .el-table .el-table__header th {
font-size: 12px;
} }
::v-deep .el-table__footer-wrapper tbody td { ::v-deep .el-table__footer-wrapper tbody td {
padding: 14px; padding: 14px;
text-align: center; text-align: center;
font-size: 12px;
} }
.total-box { .total-box {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
width: calc(100% - 200px);
div { div {
flex: 1; width: 25%;
padding: 2px 0;
// flex: 1;
} }
} }
.batch-box { .batch-box {
text-align: center;
margin: 10px 36px; margin: 10px 36px;
} }
.red-txt { .red-txt {
...@@ -1923,7 +2007,23 @@ export default { ...@@ -1923,7 +2007,23 @@ export default {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
right: 0; right: 0;
box-sizing: border-box;
width: 100%;
height: 84px;
display: flex;
justify-content: space-between;
align-items: center;
// text-align: right;
padding: 0 30px;
background: #ffffff;
.btn-box {
background: #ffffff;
width: 200px;
text-align: right; text-align: right;
margin-right: 30px; }
.btn {
height: 32px;
padding: 8px 20px;
}
} }
</style> </style>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="container"> <div class="container">
<AccountTmpl ref="accountTmpl" :type="type" :tmplSelectList="tmplSelectList"></AccountTmpl> <AccountTmpl ref="accountTmpl" :type="type" :tmplSelectList="tmplSelectList"></AccountTmpl>
</div> </div>
<div class="footer"> <div class="tmpl-footer">
<el-button @click="handleClose">取消</el-button> <el-button @click="handleClose">取消</el-button>
<el-button @click="handleConfirm" type="primary" :loading="$store.state.d2admin.loading.value">确定</el-button> <el-button @click="handleConfirm" type="primary" :loading="$store.state.d2admin.loading.value">确定</el-button>
</div> </div>
...@@ -60,6 +60,10 @@ export default { ...@@ -60,6 +60,10 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep.tmpl-drawer { ::v-deep.tmpl-drawer {
.el-drawer__body {
overflow: scroll;
height: calc(100% - 400px);
}
.el-drawer__header { .el-drawer__header {
box-sizing: border-box; box-sizing: border-box;
height: 60px; height: 60px;
...@@ -74,12 +78,19 @@ export default { ...@@ -74,12 +78,19 @@ export default {
.container { .container {
box-sizing: border-box; box-sizing: border-box;
overflow: scroll; overflow: scroll;
height: calc(100% - 400px); padding: 20px 20px 60px;
padding: 20px;
} }
} }
.footer { .tmpl-footer {
position: absolute;
width: 100%;
height: 60px;
line-height: 60px;
bottom: 0;
right: 0;
background: #ffffff;
text-align: right; text-align: right;
margin-right: 30px; margin-right: 30px;
z-index: 9;
} }
</style> </style>
<!-- 下载对账单 --> <!-- 下载对账单 -->
<template> <template>
<d2-dialog title="下载对账单" :is-visible="accountVisible" class="accountDailog" width="688px" btn-ok-label="下载" @closeDialog="handleClose" @confirmDialog="handleAddConfirm"> <d2-dialog title="下载对账单" :is-visible="accountVisible" class="accountDailog" width="688px" btn-ok-label="下载" @closeDialog="handleClose" @confirmDialog="handleAddConfirm">
<!-- <el-button v-if="isTmpl" slot="btn-start" type="primary" @click="handleSystemBill">系统对账</el-button> --> <el-button v-if="isTmpl" slot="btn-start" type="primary" @click="handleSystemBill" :loading="$store.state.d2admin.loading.value">系统对账</el-button>
<el-form ref="accountForm" :model="infoForm" :rules="formRules" label-width="120px" v-loading="loading"> <el-form ref="accountForm" :model="infoForm" :rules="formRules" label-width="120px" v-loading="loading">
<el-form-item label="商户类型:" prop="merchantType"> <el-form-item label="商户类型:" prop="merchantType">
<el-radio-group v-model="infoForm.merchantType" @change="changeType"> <el-radio-group v-model="infoForm.merchantType" @change="changeType">
......
...@@ -452,7 +452,7 @@ export default { ...@@ -452,7 +452,7 @@ export default {
// 查询领料技师 // 查询领料技师
getRoleTechnicianList() { getRoleTechnicianList() {
const params = {} const params = {}
params.yqMerchantId = this.userInfo.merchant.merchantId // params.yqMerchantId = this.userInfo.merchant.merchantId
getRoleTechnician(params).then(res => { getRoleTechnician(params).then(res => {
this.baseData.technicianList = res this.baseData.technicianList = res
this.getOptionsList() this.getOptionsList()
......
...@@ -487,7 +487,7 @@ export default { ...@@ -487,7 +487,7 @@ export default {
} }
}) })
console.log(res, 'res') console.log(res, 'res')
res.costPrivacyShowFlag = res?.shopMerchantConfig?.costPrivacyShowFlag || '' res.costPrivacyShowFlag = res?.shopMerchantConfig?.costPrivacyShowFlag || null
res.bindMerchantId = res?.shopMerchantConfig?.bindMerchantId || '' res.bindMerchantId = res?.shopMerchantConfig?.bindMerchantId || ''
res.bindMerchantName = res?.shopMerchantConfig?.bindMerchantName || '' res.bindMerchantName = res?.shopMerchantConfig?.bindMerchantName || ''
res.boutiqueBusinessDevelopmentScene = res?.shopMerchantConfig?.boutiqueBusinessDevelopmentScene ? res?.shopMerchantConfig?.boutiqueBusinessDevelopmentScene.split(',') : [] res.boutiqueBusinessDevelopmentScene = res?.shopMerchantConfig?.boutiqueBusinessDevelopmentScene ? res?.shopMerchantConfig?.boutiqueBusinessDevelopmentScene.split(',') : []
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!