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 {
// orderPageSize: 10,
overwriteFiledJson: true
}
this.loading = true
billDetailPage(params).then(res => {
this.billTmplInfo = deepClone(res)
this.handleBillVisible()
}).finally(() => {
this.loading = false
})
},
splitDialogVisible() {
......@@ -520,9 +523,12 @@ export default {
// orderPageSize: 10,
overwriteFiledJson: false
}
this.loading = true
billDetailPage(params).then(res => {
this.billTmplInfo = deepClone(res)
this.handleChangeDetailVisible()
}).finally(() => {
this.loading = false
})
},
......
......@@ -19,9 +19,9 @@
<el-table-column align="center" width="60px" label="序号" type="index" :index="
(index) =>
index +
((page.currentPage
? page.currentPage
: page.currentPage) -
((page.pageNum
? page.pageNum
: page.pageNum) -
1) * page.pageSize + 1
" />
<el-table-column label="订单编号" prop="orderCode" align="center"></el-table-column>
......@@ -57,7 +57,7 @@
</template>
</el-table-column>
</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">
<span>已选订单:</span>
<el-tooltip class="item" :content="formatSelected(selectedData, 'all')" placement="right">
......@@ -123,15 +123,6 @@ export default {
isClear: true,
pickerOptions: 'rangePickerOptions'
}, {
label: '支付方式',
name: 'payType',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'searchPayTypeList'
}, {
label: '商品名称',
name: 'orderGoodsName',
type: 'input',
......@@ -142,7 +133,7 @@ export default {
tableTotal: 0,
page: {
pageSize: 10,
currentPage: 1
pageNum: 1
},
baseData: {
searchPayTypeList: deepClone(payTypeList)
......@@ -240,9 +231,11 @@ export default {
},
// 输入框输入限制
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
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)
const selIndex = this.selectedData?.findIndex(val => val.orderCode == row.orderCode)
if (selIndex > -1) {
......@@ -288,7 +281,7 @@ export default {
ymerchantId: this.infoForm?.yqMerchantId, // 对账园区店
merchantId: this.infoForm?.shopMerchantId, // 对账流量方
...searchFormSearch,
currentPage: this.page.currentPage,
pageNum: this.page.pageNum,
pageSize: this.page.pageSize,
// filterTransferAccounts: true, // 固定传参
// shopTrafficMoneyFlag: 'Y', // 固定传参
......@@ -296,7 +289,7 @@ export default {
}
},
jumpPage(page) {
this.page.currentPage = page
this.page.pageNum = page
this.getOrderList()
},
handleSearch() {
......@@ -311,7 +304,7 @@ export default {
payType: '',
orderGoodsName: ''
}
this.page.currentPage = 1
this.page.pageNum = 1
this.handleSearch()
},
......
<template>
<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-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">
<template slot-scope="scope">
{{ scope.$index + 1 }}
......@@ -30,7 +30,7 @@
<el-table-column label="操作" width="120" align="center" v-if="isEdit">
<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>
</el-table-column>
</el-table>
......@@ -121,11 +121,12 @@ export default {
deleteRow(index) {
this.tableData.splice(index, 1);
this.tableOldData = deepClone(this.tableData)
this.$emit('handleInputBlur')
},
handleInput(rowIdx, attr) {
const val = this.tableData[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]
},
handleInputBlur() {
......@@ -144,12 +145,19 @@ export default {
}
</script>
<style scoped>
<style lang="scss">
.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 {
margin-bottom: 0;
.el-form-item {
margin-bottom: 0;
}
}
</style>
<template>
<div>
<d2-dialog title="系统对账单" :is-visible="billVisible" class="privacyDailog" width="80%" btnOkLabel="返回" :noCancel="noCancel" @closeDialog="handleClose" @confirmDialog="handleClose">
<div class="flex">
<div>{{dateStr}}销售对账单</div>
<div>适用对象:{{billTmplInfo.billMerchantName}}</div>
</div>
<el-table v-loading="loading" :data="tableList" style="width: 100%" 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="(subItem, subIdx) in item.items" :key="subIdx" :prop="subItem.fieldCode" :label="subItem.fieldName" :width="subItem.width || '120px'">
<div class="tb-header-cell" slot="header">
<span>{{subItem.fieldName}}</span>
</div>
<div class="tb-cell" slot-scope="scope">
<div v-if="subItem.txtType == 'selectInput'">
{{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] + '')) : '-'}}
<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>{{dateStr}}销售对账单</div>
<div>适用对象:{{billTmplInfo.billMerchantName}}</div>
</div>
<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="(subItem, subIdx) in item.items" :key="subIdx" :prop="subItem.fieldCode" :label="subItem.fieldName" :width="subItem.width || '120px'">
<div class="tb-header-cell" slot="header">
<span>{{subItem.fieldName}}</span>
</div>
<!-- 普通文本显示 -->
<div v-else>
<div v-if="subItem.fieldCode == 'orderCode' && scope.row.ORDER.sourceType != 1" class="refund-txt">退</div>
<span v-if="subItem.fieldCode == 'tradeNo'" :class="scope.row.ORDER.payVoucherList && scope.row.ORDER.payVoucherList.length ? 'txt-blue': '' ">
<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>
{{ 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>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</span>
<div class="tb-cell" slot-scope="scope">
<div v-if="subItem.txtType == 'selectInput'">
{{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 v-else class="flex-center">
<div v-if="subItem.fieldCode == 'orderCode'" class="flex-center" style="margin-left: 12px;">
<img v-if="scope.row.ORDER.sourceType != 1" class="refund-img" src="@/assets/retrun.png">
<div>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</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)">
{{ 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>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</span>
</div>
</div>
</div>
</el-table-column>
</el-table-column>
</el-table-column>
</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-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> -->
<DynamicAddTable v-if="billTypeStr == 'traffic'" ref="dynamicReceiveAdd" :configObj="{'title': '应收'}" :receivableAdjustments="receivableAdjustments" @handleInputBlur="billCompute" :isEdit="isEdit"></DynamicAddTable>
<DynamicAddTable ref="dynamicAdd" :adjustments="payableAdjustments" @handleInputBlur="billCompute" :isEdit="isEdit"></DynamicAddTable>
<div class="total-box">
<div>订单总数:{{ totalOrderCount }}</div>
<div>总产值:{{ totalAmount }}</div>
<div v-if="billTypeStr == 'traffic'">应收总额:{{ totalReceivable }}元</div>
<div>应付总额:{{ totalPayable }}元</div>
<div>线上分账总额:{{ totalSplitPaidAmount }}</div>
<div>线下已付总额:{{ totalOfflinePaidAmount }}</div>
<div v-if="billTypeStr == 'traffic'">线下对账总额:{{ totalOfflineReconciliation }}元</div>
<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>
</div>
<div class="footer">
<div class="total-box">
<div>订单总数:{{ totalOrderCount }}</div>
<div>总产值:{{ totalAmount }}元</div>
<div v-if="billTypeStr == 'traffic'">应收总额:{{ totalReceivable }}元</div>
<div>应付总额:{{ totalPayable }}元</div>
<div v-if="billTypeStr == 'traffic'">线上分账总额:{{ totalSplitPaidAmount }}元</div>
<div v-if="billTypeStr == 'traffic'">线下已付总额:{{ totalOfflinePaidAmount }}元</div>
<div v-if="billTypeStr == 'traffic'">线下对账总额:{{ totalOfflineReconciliation }}元</div>
</div>
<div class="btn-box">
<el-button class="btn" @click="handleClose">返回</el-button>
</div>
</div>
</d2-dialog>
</el-drawer>
<el-image-viewer style="z-index: 9999;" v-if="imgVisible" :on-close="closeImgViewer" :url-list="imgList" :initial-index="initialIndex" />
</div>
</template>
......@@ -64,13 +76,18 @@ export default {
}
},
components: {
DynamicAddTable
DynamicAddTable,
"el-image-viewer": () =>
import("element-ui/packages/image/src/image-viewer")
},
data() {
return {
loading: false,
noCancel: true,
isEdit: false,
imgVisible: false,
initialIndex: 0,
imgList: [],
billTypeStr: 'traffic',
dateStr: '',
tmplFieldsList: [],
......@@ -121,14 +138,6 @@ export default {
optionLabel: 'confLabel',
optionsName: 'reconcileStatusList',
}, {
name: '备注',
source: 'ORDER',
attr: 'coverReceiverType',
type: 'select',
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'coverReceiverTypeList',
}, {
name: '订单时间',
source: 'ORDER',
attr: 'orderTime',
......@@ -208,14 +217,6 @@ export default {
optionLabel: 'confLabel',
optionsName: 'payTypeList',
}, {
name: '备注',
source: 'ORDER',
attr: 'coverReceiverType',
type: 'select',
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'coverReceiverTypeList',
}, {
name: '订单时间',
source: 'ORDER',
attr: 'orderTime',
......@@ -362,8 +363,7 @@ export default {
suffix: '元'
}]
},
defaultWidth: '180px',
srcList: []
defaultWidth: '180px'
}
},
mounted() {
......@@ -560,11 +560,18 @@ export default {
this.modifyDelete(orderCode)
},
closeImgViewer() {
this.imgVisible = false
},
handleReviewImg(row) {
this.srcList = []
this.imgList = []
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() {
......@@ -587,6 +594,7 @@ export default {
this.totalPayable = res.totalPayable
this.totalPayable = res.totalPayable
this.totalSplitPaidAmount = res.totalSplitPaidAmount
this.totalOfflinePaidAmount = res.totalOfflinePaidAmount
this.totalOfflineReconciliation = res.totalOfflineReconciliation
this.orderTotalStat = res.orderTotalStat
this.page.pageNum = res.orderPage?.pageNum || 1
......@@ -611,10 +619,62 @@ export default {
</script>
<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 {
display: flex;
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 {
color: #f56c6c;
font-size: 12px;
......@@ -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 {
position: relative;
......@@ -680,17 +726,29 @@ export default {
top: 8px;
// 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 {
box-sizing: border-box;
text-align: center;
white-space: nowrap;
// white-space: nowrap;
display: inline-block; /* 或者 inline */
}
.tb-cell {
padding: 14px;
padding: 0px 6px;
text-align: center;
}
::v-deep .el-table .cell {
padding: 0px 6px !important;
text-align: center;
}
::v-deep .el-table__footer-wrapper tbody td {
......@@ -700,11 +758,15 @@ export default {
.total-box {
display: flex;
flex-wrap: wrap;
width: calc(100% - 200px);
div {
flex: 1;
width: 25%;
padding: 2px 0;
// flex: 1;
}
}
.batch-box {
text-align: center;
margin: 10px 36px;
}
.red-txt {
......@@ -716,4 +778,38 @@ export default {
cursor: pointer;
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>
<template>
<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="flex">
<div>
......@@ -9,12 +10,12 @@
</div>
<!-- <div>适用对象:{{billTmplInfo.billMerchantName}}</div> -->
<el-form ref="accountForm" :model="infoForm" :rules="formRules" label-width="120px" class="flex">
<el-form-item label="对账模版:" prop="templateId">
<el-select v-model="infoForm.templateId" style="width:120px" @change="handleTmplChange">
<el-form-item label="对账模版:" prop="templateId" style="margin-bottom: 10px;">
<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-select>
</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">
<el-tooltip v-show="infoForm.fieldsTxt" effect="dark" placement="top" :content="infoForm.fieldsTxt">
<span class="fields-txt">{{infoForm.fieldsTxt}}</span>
......@@ -25,22 +26,23 @@
</el-form-item>
</el-form>
</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-column fixed 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 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 type="selection" width="55"></el-table-column>
<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'">
<div class="tb-header-cell" slot="header" slot-scope="scope">
<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-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 class="tb-cell" slot-scope="scope">
<!-- 输入框 -->
<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="subItem.editObj.prepend" slot="prepend">{{ subItem.editObj.prepend }}</span>
<span v-if="subItem.editObj.append" slot="suffix">{{ subItem.append }}</span>
<span v-if="judgeDisable(scope.$index, subItem.extInfo.source || 'ORDER', subItem) && ['partnerFeeCalculateCoefficient'].includes(subItem.fieldCode)">-</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.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>
<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) }}
......@@ -59,7 +61,8 @@
<!-- 选择输入组合框 -->
<div v-else-if="subItem.editType == 'selectInput'">
<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-option v-for="(k, kIdx) in subItem.editObj.optionList" :key="kIdx" :label="k[subItem.editObj.optionLabel]" :value="k[subItem.editObj.optionId]" />
</el-select>
......@@ -76,26 +79,24 @@
</div>
</div>
<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] + '')) : '-'}}
</div>
<!-- 普通文本显示 -->
<div v-else class="flex-center">
<!-- {{subItem.extInfo.source || 'ORDER'}}{{subItem.fieldCode}} -->
<div v-if="subItem.fieldCode == 'orderCode' && scope.row.ORDER.sourceType != 1">
<div class="refund-txt">退</div>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}
<div v-if="subItem.fieldCode == 'orderCode'" class="flex-center">
<img v-if="scope.row.ORDER.sourceType != 1" class="refund-img" src="@/assets/retrun.png">
<div>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</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)">
<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>
<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)">
{{ 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>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</span>
</div>
<div v-else-if="scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] === 0">0</div>
<div v-else>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</div>
</div>
</div>
</el-table-column>
</el-table-column>
<el-table-column label="操作">
<el-table-column label="操作" :width=" billTypeStr == 'traffic' ? '50px' : ''">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
</template>
......@@ -106,23 +107,25 @@
<DynamicAddTable v-if="billTypeStr == 'traffic'" ref="dynamicReceiveAdd" :configObj="{'title': '应收'}" :adjustments="receivableAdjustments" @handleInputBlur="billCompute"></DynamicAddTable>
<DynamicAddTable ref="dynamicAdd" :adjustments="payableAdjustments" @handleInputBlur="billCompute"></DynamicAddTable>
</div>
<div class="total-box">
<div>订单总数:{{ totalOrderCount }}</div>
<div>总产值:{{ totalAmount }}</div>
<div v-if="billTypeStr == 'traffic'">应收总额:{{ totalReceivable }}元</div>
<div>应付总额:{{ totalPayable }}元</div>
<div>线上分账总额:{{ totalSplitPaidAmount }}</div>
<div>线下已付总额:{{ totalOfflinePaidAmount }}</div>
<div v-if="billTypeStr == 'traffic'">线下对账总额:{{ totalOfflineReconciliation }}元</div>
</div>
<div class="footer">
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" :loading="loading" @click="handleConfirm">确定</el-button>
<div class="total-box">
<div>订单总数:{{ totalOrderCount }}</div>
<div>总产值:{{ totalAmount }}元</div>
<div v-if="billTypeStr == 'traffic'">应收总额:{{ totalReceivable }}元</div>
<div>应付总额:{{ totalPayable }}元</div>
<div v-if="billTypeStr == 'traffic'">线上分账总额:{{ totalSplitPaidAmount }}元</div>
<div v-if="billTypeStr == 'traffic'">线下已付总额:{{ totalOfflinePaidAmount }}元</div>
<div v-if="billTypeStr == 'traffic'">线下对账总额:{{ totalOfflineReconciliation }}元</div>
</div>
<div class="btn-box">
<el-button class="btn" @click="handleClose">取消</el-button>
<el-button class="btn" type="primary" :loading="loading" @click="handleConfirm">确定</el-button>
</div>
</div>
</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">
<!-- 输入框 -->
<template v-if="headObj.editType == 'input'">
......@@ -135,7 +138,7 @@
<!-- 选择框 -->
<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-select>
<div v-if="dialogErrors[headObj.fieldCode]" class="el-form-item__error">{{ dialogErrors[headObj.fieldCode] }}</div>
......@@ -144,8 +147,8 @@
<!-- 选择输入组合框 -->
<div v-else-if="headObj.editType === 'selectInput'">
<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-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-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: 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-select>
<span v-if="headObj.editObj.suffixFn" slot="suffix">
......@@ -164,7 +167,7 @@
<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>
<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>
</template>
......@@ -192,12 +195,16 @@ export default {
components: {
DynamicAddTable,
tmplDrawer,
ChooseRefundOrderDialog
ChooseRefundOrderDialog,
"el-image-viewer": () =>
import("element-ui/packages/image/src/image-viewer")
},
data() {
return {
loading: false,
isShowPayVoucher: false,
imgVisible: false,
initialIndex: 0,
imgList: [],
billTypeStr: 'traffic',
dateStr: '',
tmplFieldsList: [],
......@@ -471,7 +478,7 @@ export default {
totalOfflineReconciliation: 0,
editObj: {
select: {
attrList: ['payType', 'platformMerchantId', 'payType'],
attrList: ['payType', 'platformMerchantId'],
defaultConf: {
payType: {
optionId: 'confId',
......@@ -484,6 +491,7 @@ export default {
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'PlatformMerchantList',
batchName: 'platformMerchantName',
fn: (val, listIdx, obj) => {
const source = obj.extInfo.source || 'ORDER'
this.tableList[listIdx][source].platformMerchantName =
......@@ -503,9 +511,9 @@ export default {
const totalPaymentObj = this.tmplFieldsList.find(item => item.fieldCode == 'totalPaymentAmount')
var errorTxt = ''
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) {
errorTxt = `请输入大于${min}且小于${max}的数字`
errorTxt = `请输入${min}-${max}的数字`
} else if (value !== null && value !== undefined && value !== '') {
const decimalPart = String(value).split('.')[1]
if (decimalPart && decimalPart.length > 2) {
......@@ -527,9 +535,10 @@ export default {
orderList.forEach(item => {
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) {
errorTxt = `请输入大于${min}且小于${max}的数字`
errorTxt = `请输入${min}-${max}的数字`
} else if (value !== null && value !== undefined && value !== '') {
const decimalPart = String(value).split('.')[1]
if (decimalPart && decimalPart.length > 2) {
......@@ -542,10 +551,17 @@ export default {
// 线下已付金额
offlinePaidAmount: {
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 = ''
const min = 0
const max = 999999
var min = 0
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) {
errorTxt = `请输入${min}-${max}的数字`
} else if (value !== null && value !== undefined && value !== '') {
......@@ -758,33 +774,6 @@ export default {
confId: 7,
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,
trafficFeeCalculateTypeList: [{
confId: 1,
......@@ -871,8 +860,7 @@ export default {
},
// 选择退款订单
chooseVisible: '',
refundInfo: {},
srcList: []
refundInfo: {}
}
},
mounted() {
......@@ -883,7 +871,7 @@ export default {
this.billTypeStr = this.billTmplInfo.billType == '1' ? 'traffic' : 'service'
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.tmplFieldsList = JSON.parse(this.billTmplInfo.fieldsJson)
this.tmplFieldsList = JSON.parse(this.billTmplInfo.fixedFieldsJson)
console.log(this.tmplFieldsList, 'this.tmplFieldsList---')
this.originalOrderList = this.billTmplInfo?.orderPage?.list || []
this.orderId = this.billTmplInfo.id
......@@ -896,8 +884,9 @@ export default {
this.totalOfflinePaidAmount = this.billTmplInfo.totalOfflinePaidAmount
this.totalOfflineReconciliation = this.billTmplInfo.totalOfflineReconciliation
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.tmplSelectList = this.infoForm.fieldsJson.map(i => i.id)
this.infoForm.fieldsTxt = this.getFieldsTxt()
// this.page.pageNum = this.billTmplInfo?.orderPage?.pageNum || 1
// this.page.pageSize = this.billTmplInfo?.orderPage?.pageSize || 10
......@@ -949,7 +938,6 @@ export default {
getMetaTmpl() {
const tmplName = this.localTmplList.find(item => item.type == this.infoForm.tmplType)?.name || 'trafficTmpl'
var list = JSON.parse(localStorage.getItem(tmplName))
console.log(list, 'list0000000')
if (list) {
this.dealFieldsJson(list)
} else {
......@@ -1110,7 +1098,7 @@ export default {
})
return params
},
billComputePage() {
billComputePage(noChangeFixedSum = false, fn = null) {
console.log(this.tableList, 'this.tableList---')
this.loading = true
console.log(this.tableModifyList, 'this.tableModifyList----')
......@@ -1129,17 +1117,20 @@ export default {
billComputePage({ json: JSON.stringify(dynamicForm) }).then(res => {
this.originalOrderList = res.orderPage?.list || []
this.totalAmount = res.totalAmount
this.totalOrderCount = res.totalOrderCount
this.totalReceivable = res.totalReceivable
this.totalPayable = res.totalPayable
this.totalPayable = res.totalPayable
this.totalSplitPaidAmount = res.totalSplitPaidAmount
this.totalOfflineReconciliation = res.totalOfflineReconciliation
if (!noChangeFixedSum) {
this.totalOrderCount = res.totalOrderCount
this.totalReceivable = res.totalReceivable
this.totalPayable = res.totalPayable
this.totalPayable = res.totalPayable
this.totalSplitPaidAmount = res.totalSplitPaidAmount
this.totalOfflinePaidAmount = res.totalOfflinePaidAmount
this.totalOfflineReconciliation = res.totalOfflineReconciliation
}
this.orderTotalStat = res.orderTotalStat
// this.page.pageNum = res.orderPage?.pageNum || 1
// this.page.pageSize = res.orderPage?.pageSize || 10
this.page.total = res.orderPage?.total || 0
this.dealTableData()
this.dealTableData(fn)
}).finally(() => {
this.loading = false
})
......@@ -1153,6 +1144,9 @@ export default {
if (this.judgeDisable(rowIndex, source, fieldConfig)) {
return true
}
if (['remark'].includes(fieldConfig.fieldCode)) {
return true
}
if (fieldConfig?.editType === 'selectInput') {
const obj = this.tableList[rowIndex][source]
const selectVal = obj[fieldConfig.editObj.selectField]
......@@ -1197,10 +1191,9 @@ export default {
Object.keys(row).forEach(source => {
Object.keys(row[source]).forEach(field => {
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 (!this.validateField(rowIndex, source, field, fieldConfig)) {
console.log(rowIndex, source, field, fieldConfig, '===')
isValid = false
}
}
......@@ -1235,11 +1228,11 @@ export default {
this.validateField(rowIndex, fieldConfig.extInfo.source || 'ORDER', fieldConfig.fieldCode, fieldConfig)
},
handleSelectInputChange(rowIndex, fieldConfig) {
handleSelectInputChange(rowIndex, fieldConfig, isApi = true) {
const source = fieldConfig.extInfo.source || 'ORDER'
this.validateField(rowIndex, source, fieldConfig.editObj.selectField, 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,34 +1318,40 @@ export default {
},
handleSearchConfirm() {
this.validationErrors = {}
this.searchDialogVisible()
console.log(this.searchForm, 'searchform')
this.billComputePage()
// console.log(this.searchForm, 'searchform')
this.billComputePage(true)
},
handleConfirm() {
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) {
const dynamicForm = {
id: this.orderId,
updatedOrders: deepClone(this.tableModifyList),
orderIdList: deepClone(this.tableDeleteList),
receivableAdjustments: this.$refs.dynamicReceiveAdd?.dynamicForm.tableData || [],
payableAdjustments: this.$refs.dynamicAdd?.dynamicForm.tableData || [],
sceneType: this.sceneType,
templateId: this.infoForm.templateId,
fieldsJson: this.infoForm.fieldsJson
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()
if (this.validateForm() && validFlag) {
const dynamicForm = {
id: this.orderId,
updatedOrders: deepClone(this.tableModifyList),
orderIdList: deepClone(this.tableDeleteList),
receivableAdjustments: this.$refs.dynamicReceiveAdd?.dynamicForm.tableData || [],
payableAdjustments: this.$refs.dynamicAdd?.dynamicForm.tableData || [],
sceneType: this.sceneType,
templateId: this.infoForm.templateId == 'all' ? '' : this.infoForm.templateId,
fieldsJson: this.infoForm.fieldsJson
}
// console.log(dynamicForm, 'dynamicForm')
this.loading = true
editBillPage({ json: JSON.stringify(dynamicForm) }).then(res => {
this.$message.success("操作成功")
this.$emit('handleConfirm')
}).finally(() => {
this.loading = false
})
} else {
this.$message.error('请检查表单中的报错项')
}
// console.log(dynamicForm, 'dynamicForm')
editBillPage({ json: JSON.stringify(dynamicForm) }).then(res => {
this.$message.success("操作成功")
this.$emit('handleConfirm')
})
} else {
this.$message.error('请检查表单中的报错项')
}
})
},
handleClose() {
......@@ -1399,13 +1398,13 @@ export default {
k.editType = 'input'
k.inputType = this.editObj.input.defaultConf[k.fieldCode].inputType || 'number'
k.maxlength = this.editObj.input.defaultConf[k.fieldCode].maxlength || ''
k.width = '90px'
k.width = '100px'
k.editObj = {
...this.editObj.input.defaultConf[k.fieldCode],
width: '80px'
width: '90px'
}
if (k.fieldCode == 'partnerFeeCalculateCoefficient') {
k.width = '200px'
k.width = '180px'
// k.editObj.width = '110px'
}
}
......@@ -1420,10 +1419,12 @@ export default {
k.width = '193px'
}
} else {
k.width = '100px'
if (k.fieldCode == 'serialNo') {
k.width = '60px'
const widthObj = {
serialNo: '40px',
orderCode: '86px',
customerName: '74px'
}
k.width = widthObj[k.fieldCode] || '80px'
}
const txtObj = txtList.find(m => (m.source + m.attr) == (k.extInfo.source + k.fieldCode))
......@@ -1432,23 +1433,22 @@ export default {
k.txtType = 'selectInput'
k.txtObj = {
selectField: k.fieldCode.split(',')[0],
inputField: k.fieldCode.split(',')[1],
inputField: k.fieldCode.split(',')[1]
}
}
}
})
this.tableHeader.push({
moduleName: item,
items: list
})
})
console.log(this.tableHeader, 'v---')
this.dealTableData(this.tableHeader)
// console.log(this.tableHeader, 'v---')
this.dealTableData()
},
// 处理表格里面的数据,需结合表头这个字段的特有属性进行处理
dealTableData() {
dealTableData(fn = null) {
this.tableList = []
let serialNo = 0
const txtList = this[this.billTypeStr + 'ChangeTxtList']
......@@ -1501,6 +1501,9 @@ export default {
this.ownOrderList = deepClone(this.tableList)
this.isFirst = false
}
if (fn) {
fn()
}
// console.log(this.originalOrderList, 'this.originalOrderList----')
// console.log(this.tableList, 'this.tableList---')
},
......@@ -1514,46 +1517,47 @@ export default {
}
/**
* 流量方 - traffic;服务商 - service
* 对账单类型为服务商时,支付方式不能编辑
* sourceType:1-订单;2-退款
* 流量方 && 退款:流量方品类比例不能编辑
* */
if (this.billTypeStr == 'service') {
if (['ORDERpayType'].includes(source + fieldConfig.fieldCode)) {
if (this.billTypeStr == 'traffic' && value.ORDER.sourceType != 1) {
if (['SUB_ORDERtrafficFeeCalculateType,trafficFeeCalculateValue'].includes(source + fieldConfig.fieldCode)) {
isDisable = true
}
}
/**
* 流量方 - traffic;服务商 - service
* sourceType:1-订单;2-退款
* 订单是退款单时,流量方总金额,服务商品类比例,按新政策标准,备注的字段可以编辑
*/
if (value.ORDER.sourceType != 1) {
if (!['ORDERshopDivisionMoney', 'SUB_ORDERpartnerFeeCalculateType,partnerFeeCalculateValue', 'SUB_ORDERpartnerFeeCalculateType', 'SUB_ORDERpartnerFeeCalculateValue', 'SUB_ORDERpartnerFeeCalculateCoefficient', 'SUB_ORDERsecondPartnerFee', 'ORDERremark'].includes(source + fieldConfig.fieldCode)) {
isDisable = true
* 服务商 && 正常订单:服务费2不能编辑
* 服务商 && 退款:服务商品类比例、按新政策标准不能编辑
* */
if (this.billTypeStr == 'service') {
if (value.ORDER.sourceType == 1) {
if (['SUB_ORDERsecondPartnerFee', 'ORDERpayType'].includes(source + fieldConfig.fieldCode)) {
isDisable = true
}
}
}
/**
* sourceType:1-订单;2-退款
* 订单是退款单时,服务商2的金额可以编辑
*/
if (value.ORDER.sourceType == 1) {
if (['SUB_ORDERsecondPartnerFee'].includes(source + fieldConfig.fieldCode)) {
isDisable = true
if (value.ORDER.sourceType != 1) {
if (['SUB_ORDERpartnerFeeCalculateType,partnerFeeCalculateValue', 'SUB_ORDERpartnerFeeCalculateCoefficient', 'ORDERpayType'].includes(source + fieldConfig.fieldCode)) {
isDisable = true
}
}
}
/** editable为false,平台方和支付方式不能编辑 */
if (value.ORDER.editable == false) {
if (['ORDERplatformMerchantId', 'ORDERpayType'].includes(source + fieldConfig.fieldCode)) {
isDisable = true
}
}
// if (value.ORDER.editable == false) {
// if (['ORDERplatformMerchantId', 'ORDERpayType'].includes(source + fieldConfig.fieldCode)) {
// isDisable = true
// }
// }
return isDisable
},
// 判断表头字段是否可以批量编辑
judgeImgShow(obj) {
const list = deepClone(this[this.billTypeStr + 'SourceEditList'])
const editList = []
const noBatchEditAtttrList = ['ORDERpayType', 'ORDERremark']
const batchEditAtttrList = ['ORDERplatformMerchantId', 'SUB_ORDERtrafficFeeCalculateType,trafficFeeCalculateValue', 'SUB_ORDERpartnerFeeCalculateType,partnerFeeCalculateValue', 'SUB_ORDERpartnerFeeCalculateCoefficient']
list.forEach(item => {
if (!noBatchEditAtttrList.includes(item)) {
if (batchEditAtttrList.includes(item)) {
editList.push(item)
}
})
......@@ -1614,15 +1618,18 @@ export default {
}
return isValid;
},
closeImgViewer() {
this.imgVisible = false
},
handleReviewImg(row) {
this.srcList = []
this.imgList = []
row.ORDER.payVoucherList.forEach(item => {
this.srcList.push(item.payVoucher)
this.imgList.push(item.payVoucher)
})
this.isShowPayVoucher = ++this.isShowPayVoucher
if (this.isShowPayVoucher == 3) {
this.isShowPayVoucher = 0
if (!this.imgList.length) {
return true
}
this.imgVisible = !this.imgVisible
},
handlePreviewClose() {
console.log(111)
......@@ -1631,7 +1638,7 @@ export default {
this.batchVisible = !this.batchVisible
},
handleBatchClose() {
this.dialogErrors = {};
this.dialogErrors = {}
this.handelBatchVisible()
this.headObj = {}
},
......@@ -1647,6 +1654,13 @@ export default {
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.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 {
this.tableList[idx][this.headObj.extInfo.source || 'ORDER'][this.headObj.fieldCode] = this.batchForm[this.headObj.fieldCode]
}
......@@ -1659,8 +1673,8 @@ export default {
this.dealModify(rowIdx, this.headObj.extInfo.source, this.headObj.fieldCode)
})
this.$nextTick(() => {
this.billCompute()
this.handleBatchClose()
this.billCompute()
})
}
},
......@@ -1733,6 +1747,7 @@ export default {
return true
}
const id = row.ORDER.id
this.validationErrors = {}
let list = []
this.tableList.forEach(item => {
if (item.ORDER.id != id) {
......@@ -1767,7 +1782,7 @@ export default {
maxLengthInput(e, item) {
// 处理输入长度限制
},
}
// handleSizeChange(value) {
// this.page.pageSize = value
......@@ -1782,10 +1797,27 @@ export default {
</script>
<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: calc(100% - 150px);
height: auto;
max-height: calc(100vh - 148px);
}
.flex {
display: flex;
......@@ -1806,19 +1838,20 @@ export default {
.flex-center {
display: flex;
align-items: center;
justify-content: center;
}
.refund-txt {
.refund-img {
display: inline-block;
box-sizing: border-box;
width: 16px;
height: 16px;
line-height: 16px;
font-size: 8px;
padding: 2px;
// font-size: 8px;
// padding: 2px;
border-radius: 3px;
color: #ffffff;
margin: 0 8px 0 20px;
background: linear-gradient(#ff8496 0%, #ff4e61 100%);
margin: 0 2px 0 0;
// background: linear-gradient(#ff8496 0%, #ff4e61 100%);
}
.el-form-item__error {
......@@ -1840,6 +1873,9 @@ export default {
.select-input-container {
position: relative;
::v-deep input[type="number"] {
padding: 0 16px 0 8px;
}
.el-form-item__error {
position: static;
margin-top: 2px;
......@@ -1864,39 +1900,87 @@ export default {
border-left-color: #dcdfe6;
}
}
.el-input-group__prepend {
.el-input__inner {
font-size: 12px;
}
}
}
}
::v-deep .el-input__suffix .inputSuffix {
position: absolute;
left: -14px;
left: -12px;
top: 8px;
// 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 {
box-sizing: border-box;
text-align: center;
// white-space: nowrap;
display: inline-block; /* 或者 inline */
font-size: 12px;
}
.tb-cell {
padding: 8px;
padding: 0;
text-align: center;
font-size: 12px;
}
::v-deep .el-table .cell {
padding: 0px 6px !important;
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 {
padding: 14px;
text-align: center;
font-size: 12px;
}
.total-box {
display: flex;
flex-wrap: wrap;
width: calc(100% - 200px);
div {
flex: 1;
width: 25%;
padding: 2px 0;
// flex: 1;
}
}
.batch-box {
text-align: center;
margin: 10px 36px;
}
.red-txt {
......@@ -1923,7 +2007,23 @@ export default {
position: absolute;
bottom: 0;
right: 0;
text-align: right;
margin-right: 30px;
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>
......@@ -4,7 +4,7 @@
<div class="container">
<AccountTmpl ref="accountTmpl" :type="type" :tmplSelectList="tmplSelectList"></AccountTmpl>
</div>
<div class="footer">
<div class="tmpl-footer">
<el-button @click="handleClose">取消</el-button>
<el-button @click="handleConfirm" type="primary" :loading="$store.state.d2admin.loading.value">确定</el-button>
</div>
......@@ -60,6 +60,10 @@ export default {
</script>
<style lang="scss" scoped>
::v-deep.tmpl-drawer {
.el-drawer__body {
overflow: scroll;
height: calc(100% - 400px);
}
.el-drawer__header {
box-sizing: border-box;
height: 60px;
......@@ -74,12 +78,19 @@ export default {
.container {
box-sizing: border-box;
overflow: scroll;
height: calc(100% - 400px);
padding: 20px;
padding: 20px 20px 60px;
}
}
.footer {
.tmpl-footer {
position: absolute;
width: 100%;
height: 60px;
line-height: 60px;
bottom: 0;
right: 0;
background: #ffffff;
text-align: right;
margin-right: 30px;
z-index: 9;
}
</style>
<!-- 下载对账单 -->
<template>
<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-item label="商户类型:" prop="merchantType">
<el-radio-group v-model="infoForm.merchantType" @change="changeType">
......
......@@ -452,7 +452,7 @@ export default {
// 查询领料技师
getRoleTechnicianList() {
const params = {}
params.yqMerchantId = this.userInfo.merchant.merchantId
// params.yqMerchantId = this.userInfo.merchant.merchantId
getRoleTechnician(params).then(res => {
this.baseData.technicianList = res
this.getOptionsList()
......
......@@ -487,7 +487,7 @@ export default {
}
})
console.log(res, 'res')
res.costPrivacyShowFlag = res?.shopMerchantConfig?.costPrivacyShowFlag || ''
res.costPrivacyShowFlag = res?.shopMerchantConfig?.costPrivacyShowFlag || null
res.bindMerchantId = res?.shopMerchantConfig?.bindMerchantId || ''
res.bindMerchantName = res?.shopMerchantConfig?.bindMerchantName || ''
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!