[渠道管理]-优化样式,新增手动结算
This commit is contained in:
@@ -6,9 +6,45 @@
|
||||
<el-scrollbar v-loading="baTable.form.loading" class="ba-table-form-scrollbar">
|
||||
<div class="ba-operate-form" :class="'ba-' + baTable.form.operate + '-form'" :style="config.layout.shrink ? '' : 'width: calc(100% - ' + baTable.form.labelWidth! / 2 + 'px)'">
|
||||
<el-form v-if="!baTable.form.loading" ref="formRef" @submit.prevent="" @keyup.enter="baTable.onSubmit(formRef)" :model="baTable.form.items" :label-position="config.layout.shrink ? 'top' : 'right'" :label-width="baTable.form.labelWidth + 'px'" :rules="rules">
|
||||
<FormItem :label="t('agent.commissionRecord.settlement_period_id')" type="number" v-model="baTable.form.items!.settlement_period_id" prop="settlement_period_id" :input-attr="{ min: 1, step: 1 }" />
|
||||
<FormItem :label="t('agent.commissionRecord.channel_id')" type="number" v-model="baTable.form.items!.channel_id" prop="channel_id" :input-attr="{ min: 1, step: 1 }" />
|
||||
<FormItem :label="t('agent.commissionRecord.admin_id')" type="number" v-model="baTable.form.items!.admin_id" prop="admin_id" :input-attr="{ min: 1, step: 1 }" />
|
||||
<FormItem
|
||||
:label="t('agent.commissionRecord.settlement_period_id')"
|
||||
type="remoteSelect"
|
||||
v-model="baTable.form.items!.settlement_period_id"
|
||||
prop="settlement_period_id"
|
||||
:key="'sp-' + (baTable.form.items!.id ?? 'new')"
|
||||
:input-attr="{
|
||||
pk: 'id',
|
||||
field: 'settlement_no',
|
||||
remoteUrl: '/admin/agent.SettlementPeriod/index',
|
||||
placeholder: t('Click select'),
|
||||
}"
|
||||
/>
|
||||
<FormItem
|
||||
:label="t('agent.commissionRecord.channel_id')"
|
||||
type="remoteSelect"
|
||||
v-model="baTable.form.items!.channel_id"
|
||||
prop="channel_id"
|
||||
:key="'ch-' + (baTable.form.items!.id ?? 'new')"
|
||||
:input-attr="{
|
||||
pk: 'id',
|
||||
field: 'name',
|
||||
remoteUrl: '/admin/channel/index',
|
||||
placeholder: t('Click select'),
|
||||
}"
|
||||
/>
|
||||
<FormItem
|
||||
:label="t('agent.commissionRecord.admin_id')"
|
||||
type="remoteSelect"
|
||||
v-model="baTable.form.items!.admin_id"
|
||||
prop="admin_id"
|
||||
:key="'adm-' + (baTable.form.items!.id ?? 'new')"
|
||||
:input-attr="{
|
||||
pk: 'id',
|
||||
field: 'username',
|
||||
remoteUrl: '/admin/auth/admin/index',
|
||||
placeholder: t('Click select'),
|
||||
}"
|
||||
/>
|
||||
<FormItem :label="t('agent.commissionRecord.commission_rate')" type="number" v-model="baTable.form.items!.commission_rate" prop="commission_rate" :input-attr="{ min: 0, precision: 4, step: 0.0001 }" />
|
||||
<FormItem :label="t('agent.commissionRecord.calc_base_amount')" type="number" v-model="baTable.form.items!.calc_base_amount" prop="calc_base_amount" :input-attr="{ min: 0, precision: 4, step: 0.0001 }" />
|
||||
<FormItem :label="t('agent.commissionRecord.commission_amount')" type="number" v-model="baTable.form.items!.commission_amount" prop="commission_amount" :input-attr="{ precision: 4, step: 0.0001 }" />
|
||||
@@ -42,8 +78,9 @@ const { t } = useI18n()
|
||||
|
||||
const rules: Partial<Record<string, FormItemRule[]>> = reactive({
|
||||
settlement_period_id: [{ required: true, message: t('Please input field', { field: t('agent.commissionRecord.settlement_period_id') }) }],
|
||||
channel_id: [{ required: true, message: t('Please input field', { field: t('agent.commissionRecord.channel_id') }) }],
|
||||
admin_id: [{ required: true, message: t('Please input field', { field: t('agent.commissionRecord.admin_id') }) }],
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user