Commit db08dc4b by chenwq

bug修复

1 parent 7959fc72
......@@ -62,6 +62,9 @@ export default {
optionsName: 'tmplTypeList',
handleRadioChange: (val) => {
this.tmplSelectList = []
setTimeout(() => {
this.$refs.editFormRef.$refs[this.editChildRef].clearValidate("fieldIds")
}, 800)
}
},
{
......
<template>
<div>
<d2-dialog title="系统对账单" :is-visible="billVisible" class="privacyDailog" width="80%" @closeDialog="handleClose" @confirmDialog="handleConfirm">
<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" @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">
......@@ -66,29 +70,34 @@
<div>总金额:{{total}}元</div>
</d2-dialog>
<!-- 批量輸入 -->
<d2-dialog :title="'请设置' + headObj.fieldName" :is-visible="batchVisible" class="privacyDailog" width="480px" @closeDialog="handleBatchClose" @confirmDialog="handleBatchConfirm">
<!-- 输入框 -->
<template v-if="headObj.editType == 'input'">
<el-input placeholder="请输入" :prefix-icon="headObj.prefixIcon" v-model.trim="batchForm[headObj.fieldCode]" :maxlength="headObj.maxlength" :type="headObj.inputType || 'text'" :style="{ width: headObj.width || defaultWidth }" @input="(e) => maxLengthInput(e)">
<span v-if="headObj.editObj.prepend" slot="prepend">{{ headObj.editObj.prepend }}</span>
<span v-if="headObj.editObj.append" slot="suffix">{{ headObj.append }}</span>
</el-input>
</template>
<!-- 选择框 -->
<div v-else-if="headObj.editType == 'select'">
<el-select style="width: 200px" v-model="batchForm[headObj.fieldCode]" placeholder="请选择" no-data-text="无数据">
<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>
<!-- 选择输入组合框 -->
<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">
<el-select v-model="batchForm[headObj.editObj.selectField]" style="width: 90px" :popper-append-to-body="false" slot="prepend" placeholder="请选择">
<el-option v-for="(k, kIdx) in headObj.editObj.optionList" :key="kIdx" :label="k[headObj.editObj.optionLabel]" :value="k[headObj.editObj.optionId]" />
</el-select>
<d2-dialog :title="headObj.fieldCode == 'coverReceiverType' ? '备注' : ('批量设置' + headObj.fieldName)" :is-visible="batchVisible" class="privacyDailog" width="480px" @closeDialog="handleBatchClose" @confirmDialog="handleBatchConfirm">
<div class="batch-box">
<!-- 输入框 -->
<template v-if="headObj.editType == 'input'">
<el-input placeholder="请输入" :prefix-icon="headObj.prefixIcon" v-model.trim="batchForm[headObj.fieldCode]" :maxlength="headObj.maxlength" :type="headObj.inputType || 'text'" :style="{ width: headObj.width || defaultWidth }" @input="(e) => maxLengthInput(e)">
<span v-if="headObj.editObj.prepend" slot="prepend">{{ headObj.editObj.prepend }}</span>
<span v-if="headObj.editObj.append" slot="suffix">{{ headObj.append }}</span>
</el-input>
</template>
<!-- 选择框 -->
<div v-else-if="headObj.editType == 'select'">
<el-select style="width: 200px" v-model="batchForm[headObj.fieldCode]" placeholder="请选择" no-data-text="无数据">
<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>
<!-- 选择输入组合框 -->
<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">
<el-select v-model="batchForm[headObj.editObj.selectField]" style="width: 90px" :popper-append-to-body="false" slot="prepend" placeholder="请选择">
<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-input>
</div>
</div>
<div v-if="headObj.fieldCode == 'coverReceiverType'" class="red-txt">
提示:若按支付方式拆分对账单,切换收款方式,系统自动将该订单切换至对应周期+收款方式的对账单中;若无对账单则在下次生成对应收款方式的对账单时自动加入;
</div>
</div>
</d2-dialog>
......@@ -121,6 +130,7 @@ export default {
return {
loading: false,
billTypeStr: 'traffic',
dateStr: '',
tmplFieldsList: [],
tableHeader: [],
originalOrderList: [],
......@@ -166,14 +176,28 @@ export default {
attr: 'paymentTime',
type: 'time'
}, {
name: '支付方式',
source: 'ORDER',
attr: 'payType',
type: 'select',
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'payTypeList',
}, {
name: '流量方套餐比例',
source: 'PACKAGE',
attr: 'trafficFeeCalculateType,trafficFeeCalculateValue',
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'trafficFeeCalculateTypeTxtList',
type: 'selectInput',
}, {
name: '流量方整单比例',
source: 'ORDER',
attr: 'trafficFeeCalculateType,trafficFeeCalculateValue',
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'trafficFeeCalculateTypeTxtList',
type: 'selectInput',
}],
serviceChangeTxtList: [{
......@@ -347,6 +371,44 @@ export default {
{
confId: 3,
confValue: '按固定金额'
}],
trafficFeeCalculateTypeTxtList: [{
confId: 1,
confLabel: '按毛利'
},
{
confId: 2,
confLabel: '按收入'
},
{
confId: 3,
confLabel: '按固定金额'
}, {
confId: 4,
confLabel: '按(产值-流量成本)比例'
},
{
confId: 5,
confLabel: '按(产值-流量成本-其他费用不包含成本)比例'
},
{
confId: 6,
confLabel: '按(产值-流量成本-其他费用包含成本)比例'
}, {
confId: 7,
confLabel: '可扩展兜底'
},
{
confId: 8,
confLabel: '按(收入-自定义其他费用)比例'
},
{
confId: 9,
confLabel: '按(收入-其他费用)比例'
},
{
confId: 10,
confLabel: '按固定金额*购买数量'
}]
},
defaultWidth: '180px'
......@@ -358,6 +420,7 @@ export default {
methods: {
initComponent() {
this.billTypeStr = this.billTmplInfo.billType == '1' ? 'traffic' : 'service'
this.dateStr = Util.dateFormate(this.billTypeStr.startDate, 'YYYY年MM月DD日') + '~' + Util.dateFormate(this.billTypeStr.endDate, 'YYYY年MM月DD日')
console.log(this.billTmplInfo, 'this.billTmplInfo---')
this.tmplFieldsList = JSON.parse(this.billTmplInfo.fieldsJson)
console.log(this.tmplFieldsList, 'this.tmplFieldsList---')
......@@ -668,7 +731,7 @@ export default {
const source = m.source
const selectField = m.attr.split(',')[0]
const inputField = m.attr.split(',')[1]
const selectTxt = this.baseData[selectField + 'List'].find(n => n[m.optionId] == item[m.source][selectField])?.[m.optionLabel]
const selectTxt = this.baseData[selectField + 'TxtList'].find(n => n[m.optionId] == item[m.source][selectField])?.[m.optionLabel]
item[m.source][selectField] = selectTxt || ''
} else if (m.type == 'time') {
item[m.source][m.attr] = item[m.source][m.attr] ? Util.dateFormate(item[m.source][m.attr], 'YYYY-MM-DD HH:mm:ss') : '-'
......@@ -854,6 +917,10 @@ export default {
</script>
<style lang="scss" scoped>
.flex {
display: flex;
justify-content: space-between;
}
.el-form-item__error {
color: #f56c6c;
font-size: 12px;
......@@ -916,4 +983,12 @@ export default {
padding: 14px;
text-align: center;
}
.batch-box {
margin: 10px 36px;
}
.red-txt {
color: #eb4e4e;
font-size: 14px;
margin: 8px 0;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!