|
|
@ -3,30 +3,45 @@
|
|
|
|
<div class="JNPF-preview-main">
|
|
|
|
<div class="JNPF-preview-main">
|
|
|
|
<div class="JNPF-common-page-header">
|
|
|
|
<div class="JNPF-common-page-header">
|
|
|
|
<!-- <el-page-header @back="goBack" :content="!dataForm.id ? '新建' : '编辑'" /> -->
|
|
|
|
<!-- <el-page-header @back="goBack" :content="!dataForm.id ? '新建' : '编辑'" /> -->
|
|
|
|
<el-page-header @back="goBack" :content="!dataForm.id ? '合同价格配置' : '合同价格配置'" />
|
|
|
|
<el-page-header
|
|
|
|
|
|
|
|
@back="goBack"
|
|
|
|
|
|
|
|
:content="!dataForm.id ? '合同价格配置' : '合同价格配置'"
|
|
|
|
|
|
|
|
/>
|
|
|
|
<div class="options">
|
|
|
|
<div class="options">
|
|
|
|
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"
|
|
|
|
<el-button
|
|
|
|
:disabled='continueBtnLoading'> 保 存</el-button>
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
@click="dataFormSubmit()"
|
|
|
|
|
|
|
|
:loading="btnLoading"
|
|
|
|
|
|
|
|
:disabled="continueBtnLoading"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
保 存</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
<el-button @click="goBack"> 取 消</el-button>
|
|
|
|
<el-button @click="goBack"> 取 消</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<el-row :gutter="15" class=" main" :style="{ margin: '0 auto', width: '100%' }">
|
|
|
|
<el-row
|
|
|
|
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
|
|
|
|
:gutter="15"
|
|
|
|
label-position="right">
|
|
|
|
class=" main"
|
|
|
|
|
|
|
|
:style="{ margin: '0 auto', width: '100%' }"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-form
|
|
|
|
|
|
|
|
ref="formRef"
|
|
|
|
|
|
|
|
:model="dataForm"
|
|
|
|
|
|
|
|
:rules="dataRule"
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
label-width="100px"
|
|
|
|
|
|
|
|
label-position="right"
|
|
|
|
|
|
|
|
>
|
|
|
|
<template v-if="!loading">
|
|
|
|
<template v-if="!loading">
|
|
|
|
<!-- 具体表单 -->
|
|
|
|
|
|
|
|
<!-- <el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="合同id" prop="contractId">
|
|
|
|
|
|
|
|
<JnpfInput v-model="dataForm.contractId" @change="changeData('contractId', -1)"
|
|
|
|
|
|
|
|
placeholder="请输入" clearable :style='{ "width": "100%" }'>
|
|
|
|
|
|
|
|
</JnpfInput>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col> -->
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
<el-col :span="24">
|
|
|
|
<jnpf-form-tip-item label="公式编码" prop="priceFormulaCode">
|
|
|
|
<jnpf-form-tip-item label="公式编码" prop="priceFormulaCode">
|
|
|
|
<JnpfInput v-model="dataForm.priceFormulaCode"
|
|
|
|
<JnpfInput
|
|
|
|
@change="changeData('priceFormulaCode', -1)" placeholder="系统自动生成" readonly
|
|
|
|
v-model="dataForm.priceFormulaCode"
|
|
|
|
:style='{ "width": "100%" }'>
|
|
|
|
@change="changeData('priceFormulaCode', -1)"
|
|
|
|
|
|
|
|
placeholder="系统自动生成"
|
|
|
|
|
|
|
|
readonly
|
|
|
|
|
|
|
|
:style="{ width: '100%' }"
|
|
|
|
|
|
|
|
>
|
|
|
|
</JnpfInput>
|
|
|
|
</JnpfInput>
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
@ -36,7 +51,11 @@
|
|
|
|
<template v-if="item.enCode == 'fixedProfit'">
|
|
|
|
<template v-if="item.enCode == 'fixedProfit'">
|
|
|
|
<div class="formula-item">
|
|
|
|
<div class="formula-item">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<el-radio v-model="dataForm.priceFormulaType" :label="item.enCode">
|
|
|
|
<el-radio
|
|
|
|
|
|
|
|
v-model="dataForm.priceFormulaType"
|
|
|
|
|
|
|
|
:label="item.enCode"
|
|
|
|
|
|
|
|
@input="fnPriceFormulaTypeChg"
|
|
|
|
|
|
|
|
>
|
|
|
|
{{ item.fullName }}
|
|
|
|
{{ item.fullName }}
|
|
|
|
</el-radio>
|
|
|
|
</el-radio>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -46,7 +65,11 @@
|
|
|
|
<template v-else-if="item.enCode == 'taxRateA'">
|
|
|
|
<template v-else-if="item.enCode == 'taxRateA'">
|
|
|
|
<div class="formula-item">
|
|
|
|
<div class="formula-item">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<el-radio v-model="dataForm.priceFormulaType" :label="item.enCode">
|
|
|
|
<el-radio
|
|
|
|
|
|
|
|
v-model="dataForm.priceFormulaType"
|
|
|
|
|
|
|
|
:label="item.enCode"
|
|
|
|
|
|
|
|
@input="fnPriceFormulaTypeChg"
|
|
|
|
|
|
|
|
>
|
|
|
|
{{ item.fullName }}
|
|
|
|
{{ item.fullName }}
|
|
|
|
</el-radio>
|
|
|
|
</el-radio>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -56,7 +79,11 @@
|
|
|
|
<template v-else-if="item.enCode == 'taxRateB'">
|
|
|
|
<template v-else-if="item.enCode == 'taxRateB'">
|
|
|
|
<div class="formula-item">
|
|
|
|
<div class="formula-item">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<el-radio v-model="dataForm.priceFormulaType" :label="item.enCode">
|
|
|
|
<el-radio
|
|
|
|
|
|
|
|
v-model="dataForm.priceFormulaType"
|
|
|
|
|
|
|
|
:label="item.enCode"
|
|
|
|
|
|
|
|
@input="fnPriceFormulaTypeChg"
|
|
|
|
|
|
|
|
>
|
|
|
|
{{ item.fullName }}
|
|
|
|
{{ item.fullName }}
|
|
|
|
</el-radio>
|
|
|
|
</el-radio>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -66,37 +93,53 @@
|
|
|
|
<template v-else-if="item.enCode == 'moneyRate'">
|
|
|
|
<template v-else-if="item.enCode == 'moneyRate'">
|
|
|
|
<div class="formula-item">
|
|
|
|
<div class="formula-item">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<el-radio v-model="dataForm.priceFormulaType" :label="item.enCode">
|
|
|
|
<el-radio
|
|
|
|
|
|
|
|
v-model="dataForm.priceFormulaType"
|
|
|
|
|
|
|
|
:label="item.enCode"
|
|
|
|
|
|
|
|
@input="fnPriceFormulaTypeChg"
|
|
|
|
|
|
|
|
>
|
|
|
|
{{ item.fullName }}
|
|
|
|
{{ item.fullName }}
|
|
|
|
</el-radio>
|
|
|
|
</el-radio>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<FormulaMoneyRate v-model="dataForm" />
|
|
|
|
<FormulaMoneyRate v-model="dataForm" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<template v-else-if="item.enCode == 'moneyRate'">
|
|
|
|
<template v-else-if="item.enCode == 'storageService'">
|
|
|
|
<div class="formula-item">
|
|
|
|
<div class="formula-item">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<el-radio v-model="dataForm.storageService" :label="item.enCode">
|
|
|
|
<el-radio
|
|
|
|
|
|
|
|
v-model="dataForm.priceFormulaType"
|
|
|
|
|
|
|
|
:label="item.enCode"
|
|
|
|
|
|
|
|
@input="fnPriceFormulaTypeChg"
|
|
|
|
|
|
|
|
>
|
|
|
|
{{ item.fullName }}
|
|
|
|
{{ item.fullName }}
|
|
|
|
</el-radio>
|
|
|
|
</el-radio>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<FormulaStorageService v-model="dataForm" />
|
|
|
|
<FormulaStorageService v-model="dataForm" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<template v-else-if="item.enCode == 'moneyRate'">
|
|
|
|
<template v-else-if="item.enCode == 'transitService'">
|
|
|
|
<div class="formula-item">
|
|
|
|
<div class="formula-item">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<el-radio v-model="dataForm.transitService" :label="item.enCode">
|
|
|
|
<el-radio
|
|
|
|
|
|
|
|
v-model="dataForm.priceFormulaType"
|
|
|
|
|
|
|
|
:label="item.enCode"
|
|
|
|
|
|
|
|
@input="fnPriceFormulaTypeChg"
|
|
|
|
|
|
|
|
>
|
|
|
|
{{ item.fullName }}
|
|
|
|
{{ item.fullName }}
|
|
|
|
</el-radio>
|
|
|
|
</el-radio>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<FormulaTransitService v-model="dataForm" />
|
|
|
|
<FormulaTransitService v-model="dataForm" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<template v-else-if="item.enCode == 'moneyRate'">
|
|
|
|
<template v-else-if="item.enCode == 'outProcessService'">
|
|
|
|
<div class="formula-item">
|
|
|
|
<div class="formula-item">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<el-radio v-model="dataForm.outProcessService" :label="item.enCode">
|
|
|
|
<el-radio
|
|
|
|
|
|
|
|
v-model="dataForm.priceFormulaType"
|
|
|
|
|
|
|
|
:label="item.enCode"
|
|
|
|
|
|
|
|
@input="fnPriceFormulaTypeChg"
|
|
|
|
|
|
|
|
>
|
|
|
|
{{ item.fullName }}
|
|
|
|
{{ item.fullName }}
|
|
|
|
</el-radio>
|
|
|
|
</el-radio>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -106,7 +149,11 @@
|
|
|
|
<template v-else-if="item.enCode == 'specialPrice'">
|
|
|
|
<template v-else-if="item.enCode == 'specialPrice'">
|
|
|
|
<div class="formula-item">
|
|
|
|
<div class="formula-item">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<el-radio v-model="dataForm.outProcessService" :label="item.enCode">
|
|
|
|
<el-radio
|
|
|
|
|
|
|
|
v-model="dataForm.priceFormulaType"
|
|
|
|
|
|
|
|
:label="item.enCode"
|
|
|
|
|
|
|
|
@input="fnPriceFormulaTypeChg"
|
|
|
|
|
|
|
|
>
|
|
|
|
{{ item.fullName }}
|
|
|
|
{{ item.fullName }}
|
|
|
|
</el-radio>
|
|
|
|
</el-radio>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -114,203 +161,48 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <div class="formula-item">
|
|
|
|
|
|
|
|
<div>资金利息</div>
|
|
|
|
|
|
|
|
<FormulaMoneyRate v-model="dataForm" />
|
|
|
|
|
|
|
|
</div> -->
|
|
|
|
|
|
|
|
<!-- <div class="formula-item">
|
|
|
|
|
|
|
|
<div>仓储服务(带票)</div>
|
|
|
|
|
|
|
|
<FormulaStorageService v-model="dataForm" />
|
|
|
|
|
|
|
|
</div> -->
|
|
|
|
|
|
|
|
<!-- <div class="formula-item">
|
|
|
|
|
|
|
|
<div>服务费用(倒运)</div>
|
|
|
|
|
|
|
|
<FormulaTransitService v-model="dataForm" />
|
|
|
|
|
|
|
|
</div> -->
|
|
|
|
|
|
|
|
<!-- <div class="formula-item">
|
|
|
|
|
|
|
|
<div>服务费用(委外加工)</div>
|
|
|
|
|
|
|
|
<FormulaOutProcessService v-model="dataForm" />
|
|
|
|
|
|
|
|
</div> -->
|
|
|
|
|
|
|
|
<!-- <div class="formula-item">
|
|
|
|
|
|
|
|
<div>特殊价格</div>
|
|
|
|
|
|
|
|
<FormulaSpecialPrice v-model="dataForm" />
|
|
|
|
|
|
|
|
</div> -->
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<!-- <el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="公式类型" prop="priceFormulaType">
|
|
|
|
|
|
|
|
<JnpfRadio v-model="dataForm.priceFormulaType"
|
|
|
|
|
|
|
|
@change="changeData('priceFormulaType', -1)" optionType="default"
|
|
|
|
|
|
|
|
direction="horizontal" size="small" :options="priceFormulaTypeOptions"
|
|
|
|
|
|
|
|
:props="priceFormulaTypeProps">
|
|
|
|
|
|
|
|
</JnpfRadio>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col> -->
|
|
|
|
|
|
|
|
<!-- <el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="固定利润1" prop="fixedProfit1">
|
|
|
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.fixedProfit1"
|
|
|
|
|
|
|
|
@change="changeData('fixedProfit1', -1)" placeholder="数字文本" :precision="2"
|
|
|
|
|
|
|
|
:step="1">
|
|
|
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="固定利润2" prop="fixedProfit2">
|
|
|
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.fixedProfit2"
|
|
|
|
|
|
|
|
@change="changeData('fixedProfit2', -1)" placeholder="数字文本" :precision="2"
|
|
|
|
|
|
|
|
:step="1">
|
|
|
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="固定金额" prop="fixedAmount">
|
|
|
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.fixedAmount" @change="changeData('fixedAmount', -1)"
|
|
|
|
|
|
|
|
placeholder="数字文本" :precision="2" :step="1">
|
|
|
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="户头费" prop="accountCost">
|
|
|
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.accountCost" @change="changeData('accountCost', -1)"
|
|
|
|
|
|
|
|
placeholder="数字文本" :precision="2" :step="1">
|
|
|
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="装卸费" prop="handleCost">
|
|
|
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.handleCost" @change="changeData('handleCost', -1)"
|
|
|
|
|
|
|
|
placeholder="数字文本" :precision="2" :step="1">
|
|
|
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="倒运费" prop="reshipmentCost">
|
|
|
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.reshipmentCost"
|
|
|
|
|
|
|
|
@change="changeData('reshipmentCost', -1)" placeholder="数字文本" :precision="2"
|
|
|
|
|
|
|
|
:step="1">
|
|
|
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="其它费用1" prop="otherCost1">
|
|
|
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.otherCost1" @change="changeData('otherCost1', -1)"
|
|
|
|
|
|
|
|
placeholder="数字文本" :precision="2" :step="1">
|
|
|
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="其它费用2" prop="otherCost2">
|
|
|
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.otherCost2" @change="changeData('otherCost2', -1)"
|
|
|
|
|
|
|
|
placeholder="数字文本" :precision="2" :step="1">
|
|
|
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="其它费用3" prop="otherCost3">
|
|
|
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.otherCost3" @change="changeData('otherCost3', -1)"
|
|
|
|
|
|
|
|
placeholder="数字文本" :precision="2" :step="1">
|
|
|
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="其它费用4" prop="otherCost4">
|
|
|
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.otherCost4" @change="changeData('otherCost4', -1)"
|
|
|
|
|
|
|
|
placeholder="数字文本" :precision="2" :step="1">
|
|
|
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="结算吨数" prop="settlementTonnage">
|
|
|
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.settlementTonnage"
|
|
|
|
|
|
|
|
@change="changeData('settlementTonnage', -1)" placeholder="数字文本" :precision="2"
|
|
|
|
|
|
|
|
:step="1">
|
|
|
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="对应吨数" prop="correspondTonnage">
|
|
|
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.correspondTonnage"
|
|
|
|
|
|
|
|
@change="changeData('correspondTonnage', -1)" placeholder="数字文本" :precision="2"
|
|
|
|
|
|
|
|
:step="1">
|
|
|
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="销售吨数" prop="saleTonnage">
|
|
|
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.saleTonnage" @change="changeData('saleTonnage', -1)"
|
|
|
|
|
|
|
|
placeholder="数字文本" :precision="2" :step="1">
|
|
|
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="税率" prop="taxRate">
|
|
|
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.taxRate" @change="changeData('taxRate', -1)"
|
|
|
|
|
|
|
|
placeholder="数字文本" :precision="2" :step="1">
|
|
|
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="客户税负率" prop="taxRateCustomer">
|
|
|
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.taxRateCustomer"
|
|
|
|
|
|
|
|
@change="changeData('taxRateCustomer', -1)" placeholder="数字文本" :precision="2"
|
|
|
|
|
|
|
|
:step="1">
|
|
|
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="黄牛税负率" prop="taxRateYellowBull">
|
|
|
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.taxRateYellowBull"
|
|
|
|
|
|
|
|
@change="changeData('taxRateYellowBull', -1)" placeholder="数字文本" :precision="2"
|
|
|
|
|
|
|
|
:step="1">
|
|
|
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="开票公司税负率" prop="taxRateInvoicingCompany">
|
|
|
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.taxRateInvoicingCompany"
|
|
|
|
|
|
|
|
@change="changeData('taxRateInvoicingCompany', -1)" placeholder="数字文本"
|
|
|
|
|
|
|
|
:precision="2" :step="1">
|
|
|
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="资金利率" prop="fundRate">
|
|
|
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.fundRate" @change="changeData('fundRate', -1)"
|
|
|
|
|
|
|
|
placeholder="数字文本" :precision="2" :step="1">
|
|
|
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
</el-col> -->
|
|
|
|
|
|
|
|
<!-- 表单结束 -->
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm" ref="selectDialog"
|
|
|
|
<SelectDialog
|
|
|
|
@select="addForSelect" @close="selectDialogVisible = false" />
|
|
|
|
v-if="selectDialogVisible"
|
|
|
|
|
|
|
|
:config="currTableConf"
|
|
|
|
|
|
|
|
:formData="dataForm"
|
|
|
|
|
|
|
|
ref="selectDialog"
|
|
|
|
|
|
|
|
@select="addForSelect"
|
|
|
|
|
|
|
|
@close="selectDialogVisible = false"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</transition>
|
|
|
|
</transition>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import request from '@/utils/request'
|
|
|
|
import request from "@/utils/request";
|
|
|
|
import { mapGetters } from "vuex";
|
|
|
|
import { mapGetters } from "vuex";
|
|
|
|
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
|
|
|
import { getDataInterfaceRes } from "@/api/systemData/dataInterface";
|
|
|
|
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
|
|
|
import { getDictionaryDataSelector } from "@/api/systemData/dictionary";
|
|
|
|
import { getDefaultCurrentValueUserId } from '@/api/permission/user'
|
|
|
|
import { getDefaultCurrentValueUserId } from "@/api/permission/user";
|
|
|
|
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
|
|
|
|
import { getDefaultCurrentValueDepartmentId } from "@/api/permission/organize";
|
|
|
|
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
|
|
|
|
import {
|
|
|
|
import { thousandsFormat } from "@/components/Generator/utils/index"
|
|
|
|
getDateDay,
|
|
|
|
import FormulaFixedProfit from './formula/fixedProfit.vue'
|
|
|
|
getLaterData,
|
|
|
|
import FormulaTaxRateA from './formula/taxRateA.vue'
|
|
|
|
getBeforeData,
|
|
|
|
import FormulaTaxRateB from './formula/taxRateB.vue'
|
|
|
|
getBeforeTime,
|
|
|
|
import FormulaMoneyRate from './formula/moneyRate.vue'
|
|
|
|
getLaterTime
|
|
|
|
import FormulaStorageService from './formula/storageService.vue'
|
|
|
|
} from "@/components/Generator/utils/index.js";
|
|
|
|
import FormulaTransitService from './formula/transitService.vue'
|
|
|
|
import { thousandsFormat } from "@/components/Generator/utils/index";
|
|
|
|
import FormulaOutProcessService from './formula/outProcessService.vue'
|
|
|
|
import FormulaFixedProfit from "./formula/fixedProfit.vue";
|
|
|
|
import FormulaSpecialPrice from './formula/specialPrice.vue'
|
|
|
|
import FormulaTaxRateA from "./formula/taxRateA.vue";
|
|
|
|
import katex from 'katex';
|
|
|
|
import FormulaTaxRateB from "./formula/taxRateB.vue";
|
|
|
|
import 'katex/dist/katex.min.css';
|
|
|
|
import FormulaMoneyRate from "./formula/moneyRate.vue";
|
|
|
|
|
|
|
|
import FormulaStorageService from "./formula/storageService.vue";
|
|
|
|
|
|
|
|
import FormulaTransitService from "./formula/transitService.vue";
|
|
|
|
|
|
|
|
import FormulaOutProcessService from "./formula/outProcessService.vue";
|
|
|
|
|
|
|
|
import FormulaSpecialPrice from "./formula/specialPrice.vue";
|
|
|
|
|
|
|
|
import katex from "katex";
|
|
|
|
|
|
|
|
import "katex/dist/katex.min.css";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
|
FormulaFixedProfit,
|
|
|
|
FormulaFixedProfit,
|
|
|
@ -334,20 +226,17 @@ export default {
|
|
|
|
visible: false,
|
|
|
|
visible: false,
|
|
|
|
loading: false,
|
|
|
|
loading: false,
|
|
|
|
btnLoading: false,
|
|
|
|
btnLoading: false,
|
|
|
|
formRef: 'formRef',
|
|
|
|
formRef: "formRef",
|
|
|
|
setting: {},
|
|
|
|
setting: {},
|
|
|
|
eventType: '',
|
|
|
|
eventType: "",
|
|
|
|
userBoxVisible: false,
|
|
|
|
userBoxVisible: false,
|
|
|
|
selectDialogVisible: false,
|
|
|
|
selectDialogVisible: false,
|
|
|
|
currTableConf: {},
|
|
|
|
currTableConf: {},
|
|
|
|
dataValueAll: {},
|
|
|
|
dataValueAll: {},
|
|
|
|
addTableConf: {
|
|
|
|
addTableConf: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
//可选范围默认值
|
|
|
|
//可选范围默认值
|
|
|
|
ableAll: {
|
|
|
|
ableAll: {},
|
|
|
|
},
|
|
|
|
tableRows: {},
|
|
|
|
tableRows: {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
Vmodel: "",
|
|
|
|
Vmodel: "",
|
|
|
|
currVmodel: "",
|
|
|
|
currVmodel: "",
|
|
|
|
dataForm: {
|
|
|
|
dataForm: {
|
|
|
@ -372,14 +261,12 @@ export default {
|
|
|
|
taxRateYellowBull: undefined,
|
|
|
|
taxRateYellowBull: undefined,
|
|
|
|
taxRateInvoicingCompany: undefined,
|
|
|
|
taxRateInvoicingCompany: undefined,
|
|
|
|
fundRate: undefined,
|
|
|
|
fundRate: undefined,
|
|
|
|
version: 0,
|
|
|
|
version: 0
|
|
|
|
},
|
|
|
|
},
|
|
|
|
tableRequiredData: {},
|
|
|
|
tableRequiredData: {},
|
|
|
|
dataRule:
|
|
|
|
dataRule: {},
|
|
|
|
{
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
priceFormulaTypeOptions: [],
|
|
|
|
priceFormulaTypeOptions: [],
|
|
|
|
priceFormulaTypeProps: { "label": "fullName", "value": "enCode" },
|
|
|
|
priceFormulaTypeProps: { label: "fullName", value: "enCode" },
|
|
|
|
childIndex: -1,
|
|
|
|
childIndex: -1,
|
|
|
|
isEdit: false,
|
|
|
|
isEdit: false,
|
|
|
|
interfaceRes: {
|
|
|
|
interfaceRes: {
|
|
|
@ -403,63 +290,88 @@ export default {
|
|
|
|
taxRateCustomer: [],
|
|
|
|
taxRateCustomer: [],
|
|
|
|
taxRateYellowBull: [],
|
|
|
|
taxRateYellowBull: [],
|
|
|
|
taxRateInvoicingCompany: [],
|
|
|
|
taxRateInvoicingCompany: [],
|
|
|
|
fundRate: [],
|
|
|
|
fundRate: []
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
computed: {
|
|
|
|
...mapGetters(['userInfo'])
|
|
|
|
...mapGetters(["userInfo"])
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {},
|
|
|
|
watch: {},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.dataAll()
|
|
|
|
this.dataAll();
|
|
|
|
this.initDefaultData()
|
|
|
|
this.initDefaultData();
|
|
|
|
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
|
|
|
|
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm));
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
prev() {
|
|
|
|
prev() {
|
|
|
|
this.index--
|
|
|
|
this.index--;
|
|
|
|
if (this.index === 0) {
|
|
|
|
if (this.index === 0) {
|
|
|
|
this.prevDis = true
|
|
|
|
this.prevDis = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.nextDis = false
|
|
|
|
this.nextDis = false;
|
|
|
|
for (let index = 0; index < this.allList.length; index++) {
|
|
|
|
for (let index = 0; index < this.allList.length; index++) {
|
|
|
|
const element = this.allList[index];
|
|
|
|
const element = this.allList[index];
|
|
|
|
if (this.index == index) {
|
|
|
|
if (this.index == index) {
|
|
|
|
this.getInfo(element.id)
|
|
|
|
this.getInfo(element.id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
next() {
|
|
|
|
next() {
|
|
|
|
this.index++
|
|
|
|
this.index++;
|
|
|
|
if (this.index === this.allList.length - 1) {
|
|
|
|
if (this.index === this.allList.length - 1) {
|
|
|
|
this.nextDis = true
|
|
|
|
this.nextDis = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.prevDis = false
|
|
|
|
this.prevDis = false;
|
|
|
|
for (let index = 0; index < this.allList.length; index++) {
|
|
|
|
for (let index = 0; index < this.allList.length; index++) {
|
|
|
|
const element = this.allList[index];
|
|
|
|
const element = this.allList[index];
|
|
|
|
if (this.index == index) {
|
|
|
|
if (this.index == index) {
|
|
|
|
this.getInfo(element.id)
|
|
|
|
this.getInfo(element.id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
fnPriceFormulaTypeChg(info) {
|
|
|
|
|
|
|
|
this.dataForm = {
|
|
|
|
|
|
|
|
contractId: this.dataForm.contractId,
|
|
|
|
|
|
|
|
priceFormulaCode: this.dataForm.priceFormulaCode,
|
|
|
|
|
|
|
|
priceFormulaType: this.dataForm.priceFormulaType,
|
|
|
|
|
|
|
|
fixedProfit1: undefined,
|
|
|
|
|
|
|
|
fixedProfit2: undefined,
|
|
|
|
|
|
|
|
fixedAmount: undefined,
|
|
|
|
|
|
|
|
accountCost: undefined,
|
|
|
|
|
|
|
|
handleCost: undefined,
|
|
|
|
|
|
|
|
reshipmentCost: undefined,
|
|
|
|
|
|
|
|
otherCost1: undefined,
|
|
|
|
|
|
|
|
otherCost2: undefined,
|
|
|
|
|
|
|
|
otherCost3: undefined,
|
|
|
|
|
|
|
|
otherCost4: undefined,
|
|
|
|
|
|
|
|
settlementTonnage: undefined,
|
|
|
|
|
|
|
|
correspondTonnage: undefined,
|
|
|
|
|
|
|
|
saleTonnage: undefined,
|
|
|
|
|
|
|
|
taxRate: undefined,
|
|
|
|
|
|
|
|
taxRateCustomer: undefined,
|
|
|
|
|
|
|
|
taxRateYellowBull: undefined,
|
|
|
|
|
|
|
|
taxRateInvoicingCompany: undefined,
|
|
|
|
|
|
|
|
fundRate: undefined,
|
|
|
|
|
|
|
|
version: 0
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
},
|
|
|
|
getInfo(id) {
|
|
|
|
getInfo(id) {
|
|
|
|
request({
|
|
|
|
request({
|
|
|
|
url: '/api/scm/ContractSetPriceFormula/' + id,
|
|
|
|
url: "/api/scm/ContractSetPriceFormula/" + id,
|
|
|
|
method: 'get'
|
|
|
|
method: "get"
|
|
|
|
}).then(res => {
|
|
|
|
}).then(res => {
|
|
|
|
this.dataInfo(res.data)
|
|
|
|
this.dataInfo(res.data);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
goBack() {
|
|
|
|
goBack() {
|
|
|
|
this.visible = false
|
|
|
|
this.visible = false;
|
|
|
|
this.$emit('refreshDataList', true)
|
|
|
|
this.$emit("refreshDataList", true);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
changeData(model, index) {
|
|
|
|
changeData(model, index) {
|
|
|
|
this.isEdit = false
|
|
|
|
this.isEdit = false;
|
|
|
|
this.childIndex = index
|
|
|
|
this.childIndex = index;
|
|
|
|
let modelAll = model.split("-");
|
|
|
|
let modelAll = model.split("-");
|
|
|
|
let faceMode = "";
|
|
|
|
let faceMode = "";
|
|
|
|
for (let i = 0; i < modelAll.length; i++) {
|
|
|
|
for (let i = 0; i < modelAll.length; i++) {
|
|
|
@ -467,14 +379,14 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (let key in this.interfaceRes) {
|
|
|
|
for (let key in this.interfaceRes) {
|
|
|
|
if (key != faceMode) {
|
|
|
|
if (key != faceMode) {
|
|
|
|
let faceReList = this.interfaceRes[key]
|
|
|
|
let faceReList = this.interfaceRes[key];
|
|
|
|
for (let i = 0; i < faceReList.length; i++) {
|
|
|
|
for (let i = 0; i < faceReList.length; i++) {
|
|
|
|
if (faceReList[i].relationField == model) {
|
|
|
|
if (faceReList[i].relationField == model) {
|
|
|
|
let options = 'get' + key + 'Options';
|
|
|
|
let options = "get" + key + "Options";
|
|
|
|
if (this[options]) {
|
|
|
|
if (this[options]) {
|
|
|
|
this[options]()
|
|
|
|
this[options]();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.changeData(key, index)
|
|
|
|
this.changeData(key, index);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -485,13 +397,13 @@ export default {
|
|
|
|
if (type == 2) {
|
|
|
|
if (type == 2) {
|
|
|
|
for (let i = 0; i < this.dataForm[data].length; i++) {
|
|
|
|
for (let i = 0; i < this.dataForm[data].length; i++) {
|
|
|
|
if (index == -1) {
|
|
|
|
if (index == -1) {
|
|
|
|
this.dataForm[data][i][model] = defaultValue
|
|
|
|
this.dataForm[data][i][model] = defaultValue;
|
|
|
|
} else if (index == i) {
|
|
|
|
} else if (index == i) {
|
|
|
|
this.dataForm[data][i][model] = defaultValue
|
|
|
|
this.dataForm[data][i][model] = defaultValue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.dataForm[data] = defaultValue
|
|
|
|
this.dataForm[data] = defaultValue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -499,198 +411,201 @@ export default {
|
|
|
|
this.getpriceFormulaTypeOptions();
|
|
|
|
this.getpriceFormulaTypeOptions();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
getpriceFormulaTypeOptions() {
|
|
|
|
getpriceFormulaTypeOptions() {
|
|
|
|
getDictionaryDataSelector('529925559430414341').then(res => {
|
|
|
|
getDictionaryDataSelector("529925559430414341").then(res => {
|
|
|
|
this.priceFormulaTypeOptions = res.data.list
|
|
|
|
this.priceFormulaTypeOptions = res.data.list;
|
|
|
|
})
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
goBack() {
|
|
|
|
goBack() {
|
|
|
|
this.$emit('refresh')
|
|
|
|
this.$emit("refresh");
|
|
|
|
},
|
|
|
|
},
|
|
|
|
clearData(contractId) {
|
|
|
|
clearData(contractId) {
|
|
|
|
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
|
|
|
|
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll));
|
|
|
|
this.dataForm.contractId = contractId
|
|
|
|
this.dataForm.contractId = contractId;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
init(id, isDetail, allList, contractId) {
|
|
|
|
init(id, isDetail, allList, contractId) {
|
|
|
|
this.prevDis = false
|
|
|
|
this.prevDis = false;
|
|
|
|
this.nextDis = false
|
|
|
|
this.nextDis = false;
|
|
|
|
this.allList = allList || []
|
|
|
|
this.allList = allList || [];
|
|
|
|
if (allList.length) {
|
|
|
|
if (allList.length) {
|
|
|
|
this.index = this.allList.findIndex(item => item.id === id)
|
|
|
|
this.index = this.allList.findIndex(item => item.id === id);
|
|
|
|
if (this.index == 0) {
|
|
|
|
if (this.index == 0) {
|
|
|
|
this.prevDis = true
|
|
|
|
this.prevDis = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.index == this.allList.length - 1) {
|
|
|
|
if (this.index == this.allList.length - 1) {
|
|
|
|
this.nextDis = true
|
|
|
|
this.nextDis = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.prevDis = true
|
|
|
|
this.prevDis = true;
|
|
|
|
this.nextDis = true
|
|
|
|
this.nextDis = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.dataForm.id = id || 0;
|
|
|
|
this.dataForm.id = id || 0;
|
|
|
|
this.visible = true;
|
|
|
|
this.visible = true;
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
if (this.dataForm.id) {
|
|
|
|
if (this.dataForm.id) {
|
|
|
|
this.loading = true
|
|
|
|
this.loading = true;
|
|
|
|
request({
|
|
|
|
request({
|
|
|
|
url: '/api/scm/ContractSetPriceFormula/' + this.dataForm.id,
|
|
|
|
url: "/api/scm/ContractSetPriceFormula/" + this.dataForm.id,
|
|
|
|
method: 'get'
|
|
|
|
method: "get"
|
|
|
|
}).then(res => {
|
|
|
|
}).then(res => {
|
|
|
|
this.dataInfo(res.data)
|
|
|
|
this.dataInfo(res.data);
|
|
|
|
this.loading = false
|
|
|
|
this.loading = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.clearData(contractId)
|
|
|
|
this.clearData(contractId);
|
|
|
|
this.initDefaultData()
|
|
|
|
this.initDefaultData();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
|
|
|
|
this.$store.commit("generator/UPDATE_RELATION_DATA", {});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//初始化默认数据
|
|
|
|
//初始化默认数据
|
|
|
|
initDefaultData() {
|
|
|
|
initDefaultData() {},
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 表单提交
|
|
|
|
// 表单提交
|
|
|
|
dataFormSubmit(type) {
|
|
|
|
dataFormSubmit(type) {
|
|
|
|
this.dataFormSubmitType = type ? type : 0
|
|
|
|
this.dataFormSubmitType = type ? type : 0;
|
|
|
|
this.$refs['formRef'].validate((valid) => {
|
|
|
|
this.$refs["formRef"].validate(valid => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
this.request()
|
|
|
|
this.request();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
request() {
|
|
|
|
request() {
|
|
|
|
let _data = this.dataList()
|
|
|
|
let _data = this.dataList();
|
|
|
|
if (this.dataFormSubmitType == 2) {
|
|
|
|
if (this.dataFormSubmitType == 2) {
|
|
|
|
this.continueBtnLoading = true
|
|
|
|
this.continueBtnLoading = true;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.btnLoading = true
|
|
|
|
this.btnLoading = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!this.dataForm.id) {
|
|
|
|
if (!this.dataForm.id) {
|
|
|
|
request({
|
|
|
|
request({
|
|
|
|
url: '/api/scm/ContractSetPriceFormula',
|
|
|
|
url: "/api/scm/ContractSetPriceFormula",
|
|
|
|
method: 'post',
|
|
|
|
method: "post",
|
|
|
|
data: _data
|
|
|
|
data: _data
|
|
|
|
}).then((res) => {
|
|
|
|
})
|
|
|
|
|
|
|
|
.then(res => {
|
|
|
|
this.$message({
|
|
|
|
this.$message({
|
|
|
|
message: res.msg,
|
|
|
|
message: res.msg,
|
|
|
|
type: 'success',
|
|
|
|
type: "success",
|
|
|
|
duration: 1000,
|
|
|
|
duration: 1000,
|
|
|
|
onClose: () => {
|
|
|
|
onClose: () => {
|
|
|
|
if (this.dataFormSubmitType == 2) {
|
|
|
|
if (this.dataFormSubmitType == 2) {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.clearData()
|
|
|
|
this.clearData();
|
|
|
|
this.initDefaultData()
|
|
|
|
this.initDefaultData();
|
|
|
|
})
|
|
|
|
});
|
|
|
|
this.continueBtnLoading = false
|
|
|
|
this.continueBtnLoading = false;
|
|
|
|
return
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.visible = false
|
|
|
|
this.visible = false;
|
|
|
|
this.btnLoading = false
|
|
|
|
this.btnLoading = false;
|
|
|
|
this.$emit('refresh', true)
|
|
|
|
this.$emit("refresh", true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}).catch(() => {
|
|
|
|
.catch(() => {
|
|
|
|
this.btnLoading = false
|
|
|
|
this.btnLoading = false;
|
|
|
|
this.continueBtnLoading = false
|
|
|
|
this.continueBtnLoading = false;
|
|
|
|
})
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
request({
|
|
|
|
request({
|
|
|
|
url: '/api/scm/ContractSetPriceFormula/' + this.dataForm.id,
|
|
|
|
url: "/api/scm/ContractSetPriceFormula/" + this.dataForm.id,
|
|
|
|
method: 'PUT',
|
|
|
|
method: "PUT",
|
|
|
|
data: _data
|
|
|
|
data: _data
|
|
|
|
}).then((res) => {
|
|
|
|
})
|
|
|
|
|
|
|
|
.then(res => {
|
|
|
|
this.$message({
|
|
|
|
this.$message({
|
|
|
|
message: res.msg,
|
|
|
|
message: res.msg,
|
|
|
|
type: 'success',
|
|
|
|
type: "success",
|
|
|
|
duration: 1000,
|
|
|
|
duration: 1000,
|
|
|
|
onClose: () => {
|
|
|
|
onClose: () => {
|
|
|
|
if (this.dataFormSubmitType == 2) return this.continueBtnLoading = false
|
|
|
|
if (this.dataFormSubmitType == 2)
|
|
|
|
this.visible = false
|
|
|
|
return (this.continueBtnLoading = false);
|
|
|
|
this.btnLoading = false
|
|
|
|
this.visible = false;
|
|
|
|
this.$emit('refresh', true)
|
|
|
|
this.btnLoading = false;
|
|
|
|
|
|
|
|
this.$emit("refresh", true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}).catch(() => {
|
|
|
|
.catch(() => {
|
|
|
|
this.btnLoading = false
|
|
|
|
this.btnLoading = false;
|
|
|
|
this.continueBtnLoading = false
|
|
|
|
this.continueBtnLoading = false;
|
|
|
|
})
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
openSelectDialog(key) {
|
|
|
|
openSelectDialog(key) {
|
|
|
|
this.currTableConf = this.addTableConf[key]
|
|
|
|
this.currTableConf = this.addTableConf[key];
|
|
|
|
this.currVmodel = key
|
|
|
|
this.currVmodel = key;
|
|
|
|
this.selectDialogVisible = true
|
|
|
|
this.selectDialogVisible = true;
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$refs.selectDialog.init()
|
|
|
|
this.$refs.selectDialog.init();
|
|
|
|
})
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
addForSelect(data) {
|
|
|
|
addForSelect(data) {
|
|
|
|
for (let i = 0; i < data.length; i++) {
|
|
|
|
for (let i = 0; i < data.length; i++) {
|
|
|
|
let t = data[i]
|
|
|
|
let t = data[i];
|
|
|
|
if (this['get' + this.currVmodel]) {
|
|
|
|
if (this["get" + this.currVmodel]) {
|
|
|
|
this['get' + this.currVmodel](t)
|
|
|
|
this["get" + this.currVmodel](t);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
|
|
|
|
dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
|
|
|
|
let timeDataValue = null;
|
|
|
|
let timeDataValue = null;
|
|
|
|
let timeValue = Number(timeValueData)
|
|
|
|
let timeValue = Number(timeValueData);
|
|
|
|
if (timeRule) {
|
|
|
|
if (timeRule) {
|
|
|
|
if (timeType == 1) {
|
|
|
|
if (timeType == 1) {
|
|
|
|
timeDataValue = timeValue
|
|
|
|
timeDataValue = timeValue;
|
|
|
|
} else if (timeType == 2) {
|
|
|
|
} else if (timeType == 2) {
|
|
|
|
timeDataValue = dataValue
|
|
|
|
timeDataValue = dataValue;
|
|
|
|
} else if (timeType == 3) {
|
|
|
|
} else if (timeType == 3) {
|
|
|
|
timeDataValue = new Date().getTime()
|
|
|
|
timeDataValue = new Date().getTime();
|
|
|
|
} else if (timeType == 4) {
|
|
|
|
} else if (timeType == 4) {
|
|
|
|
let previousDate = '';
|
|
|
|
let previousDate = "";
|
|
|
|
if (timeTarget == 1 || timeTarget == 2) {
|
|
|
|
if (timeTarget == 1 || timeTarget == 2) {
|
|
|
|
previousDate = getDateDay(timeTarget, timeType, timeValue)
|
|
|
|
previousDate = getDateDay(timeTarget, timeType, timeValue);
|
|
|
|
timeDataValue = new Date(previousDate).getTime()
|
|
|
|
timeDataValue = new Date(previousDate).getTime();
|
|
|
|
} else if (timeTarget == 3) {
|
|
|
|
} else if (timeTarget == 3) {
|
|
|
|
previousDate = getBeforeData(timeValue)
|
|
|
|
previousDate = getBeforeData(timeValue);
|
|
|
|
timeDataValue = new Date(previousDate).getTime()
|
|
|
|
timeDataValue = new Date(previousDate).getTime();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
|
|
|
|
timeDataValue = getBeforeTime(timeTarget, timeValue).getTime();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (timeType == 5) {
|
|
|
|
} else if (timeType == 5) {
|
|
|
|
let previousDate = '';
|
|
|
|
let previousDate = "";
|
|
|
|
if (timeTarget == 1 || timeTarget == 2) {
|
|
|
|
if (timeTarget == 1 || timeTarget == 2) {
|
|
|
|
previousDate = getDateDay(timeTarget, timeType, timeValue)
|
|
|
|
previousDate = getDateDay(timeTarget, timeType, timeValue);
|
|
|
|
timeDataValue = new Date(previousDate).getTime()
|
|
|
|
timeDataValue = new Date(previousDate).getTime();
|
|
|
|
} else if (timeTarget == 3) {
|
|
|
|
} else if (timeTarget == 3) {
|
|
|
|
previousDate = getLaterData(timeValue)
|
|
|
|
previousDate = getLaterData(timeValue);
|
|
|
|
timeDataValue = new Date(previousDate).getTime()
|
|
|
|
timeDataValue = new Date(previousDate).getTime();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
|
|
|
|
timeDataValue = getLaterTime(timeTarget, timeValue).getTime();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return timeDataValue;
|
|
|
|
return timeDataValue;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
|
|
|
|
time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
|
|
|
|
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
|
|
|
|
let format = formatType == "HH:mm" ? "HH:mm:00" : formatType;
|
|
|
|
let timeDataValue = null
|
|
|
|
let timeDataValue = null;
|
|
|
|
if (timeRule) {
|
|
|
|
if (timeRule) {
|
|
|
|
if (timeType == 1) {
|
|
|
|
if (timeType == 1) {
|
|
|
|
timeDataValue = timeValue || '00:00:00'
|
|
|
|
timeDataValue = timeValue || "00:00:00";
|
|
|
|
if (timeDataValue.split(':').length == 3) {
|
|
|
|
if (timeDataValue.split(":").length == 3) {
|
|
|
|
timeDataValue = timeDataValue
|
|
|
|
timeDataValue = timeDataValue;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
timeDataValue = timeDataValue + ':00'
|
|
|
|
timeDataValue = timeDataValue + ":00";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (timeType == 2) {
|
|
|
|
} else if (timeType == 2) {
|
|
|
|
timeDataValue = dataValue
|
|
|
|
timeDataValue = dataValue;
|
|
|
|
} else if (timeType == 3) {
|
|
|
|
} else if (timeType == 3) {
|
|
|
|
timeDataValue = this.jnpf.toDate(new Date(), format)
|
|
|
|
timeDataValue = this.jnpf.toDate(new Date(), format);
|
|
|
|
} else if (timeType == 4) {
|
|
|
|
} else if (timeType == 4) {
|
|
|
|
let previousDate = '';
|
|
|
|
let previousDate = "";
|
|
|
|
previousDate = getBeforeTime(timeTarget, timeValue)
|
|
|
|
previousDate = getBeforeTime(timeTarget, timeValue);
|
|
|
|
timeDataValue = this.jnpf.toDate(previousDate, format)
|
|
|
|
timeDataValue = this.jnpf.toDate(previousDate, format);
|
|
|
|
} else if (timeType == 5) {
|
|
|
|
} else if (timeType == 5) {
|
|
|
|
let previousDate = '';
|
|
|
|
let previousDate = "";
|
|
|
|
previousDate = getLaterTime(timeTarget, timeValue)
|
|
|
|
previousDate = getLaterTime(timeTarget, timeValue);
|
|
|
|
timeDataValue = this.jnpf.toDate(previousDate, format)
|
|
|
|
timeDataValue = this.jnpf.toDate(previousDate, format);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return timeDataValue;
|
|
|
|
return timeDataValue;
|
|
|
@ -700,15 +615,14 @@ export default {
|
|
|
|
return _data;
|
|
|
|
return _data;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
dataInfo(dataAll) {
|
|
|
|
dataInfo(dataAll) {
|
|
|
|
let _dataAll = dataAll
|
|
|
|
let _dataAll = dataAll;
|
|
|
|
this.dataForm = _dataAll
|
|
|
|
this.dataForm = _dataAll;
|
|
|
|
this.isEdit = true
|
|
|
|
this.isEdit = true;
|
|
|
|
this.dataAll()
|
|
|
|
this.dataAll();
|
|
|
|
this.childIndex = -1
|
|
|
|
this.childIndex = -1;
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
<style>
|
|
|
|