|
@@ -21,8 +21,8 @@
|
|
|
</template>
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
<el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)" :disabled="disabled">{{
|
|
|
- row.$cellEdit ? "保存" : "修改"
|
|
|
- }}</el-button>
|
|
|
+ row.$cellEdit ? "保存" : "修改"
|
|
|
+ }}</el-button>
|
|
|
<el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)" :disabled="disabled">删 除
|
|
|
</el-button>
|
|
|
</template>
|
|
@@ -34,14 +34,14 @@
|
|
|
<span v-if="row.$cellEdit && !inCropId" class="required_fields">*</span>
|
|
|
<crop-select ref="corp" style="width: 90% !important;display: inline-block" v-if="row.$cellEdit"
|
|
|
v-model="row.corpId" :cropIndex="index" @getCorpData="getCorpData" corpType="KG"></crop-select>
|
|
|
- <span v-else>{{ row.corpName }}</span>
|
|
|
+ <span v-else>{{ row.corpName }}</span>
|
|
|
</template>
|
|
|
<template slot="feeName" slot-scope="{ row }">
|
|
|
<span v-if="row.$cellEdit" class="required_fields">*</span>
|
|
|
<breakdown-select v-if="row.$cellEdit" v-model="row.itemId" @selectValue="value => selectValue(value, row)"
|
|
|
:configuration="breakConfiguration">
|
|
|
</breakdown-select>
|
|
|
- <span v-else>{{ row.feeName }}</span>
|
|
|
+ <span v-else>{{ row.feeName }}</span>
|
|
|
</template>
|
|
|
<template slot="billNo" slot-scope="{ row }">
|
|
|
<el-select v-if="row.$cellEdit" v-model="row.billNo" size="small" filterable allow-create default-first-option
|
|
@@ -49,25 +49,27 @@
|
|
|
<el-option v-for="(item, index) in billNoList" :key="index" :label="item" :value="item">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- <span v-else>{{ row.billNo }}</span>
|
|
|
+ <span v-else>{{ row.billNo }}</span>
|
|
|
</template>
|
|
|
<template slot="price" slot-scope="{ row }">
|
|
|
<el-input-number v-if="row.$cellEdit" v-model="row.price" placeholder="请输入" size="small" :controls="false"
|
|
|
:precision="2" @input="countChange(row)" style="width: 100%"></el-input-number>
|
|
|
- <span v-else>{{ row.price | micrometerFormat }}</span>
|
|
|
+ <span v-else>{{ row.price | micrometerFormat }}</span>
|
|
|
</template>
|
|
|
<template slot="quantity" slot-scope="{ row }">
|
|
|
- <el-input-number v-if="row.$cellEdit" v-model="row.quantity" size="small" placeholder="请输入" :controls="false"
|
|
|
- :precision="0" @input="countChange(row)" style="width: 100%"></el-input-number>
|
|
|
- <span v-else>{{ row.quantity | decimalFormat }}</span>
|
|
|
+ <el-input-number v-if="row.$cellEdit && !isDecimal" v-model="row.quantity" size="small" placeholder="请输入"
|
|
|
+ :controls="false" :precision="0" @input="countChange(row)" style="width: 100%"></el-input-number>
|
|
|
+ <el-input-number v-if="row.$cellEdit && isDecimal" v-model="row.quantity" size="small" placeholder="请输入"
|
|
|
+ :controls="false" :precision="6" @input="countChange(row)" style="width: 100%"></el-input-number>
|
|
|
+ <span v-else>{{ row.quantity | decimalFormat }}</span>
|
|
|
</template>
|
|
|
<template slot="amount" slot-scope="{ row }">
|
|
|
- <span>{{ row.amount | micrometerFormat }}</span>
|
|
|
+ <span>{{ row.amount | micrometerFormat }}</span>
|
|
|
</template>
|
|
|
<template slot="exchangeRate" slot-scope="{ row }">
|
|
|
<el-input-number v-if="row.$cellEdit" v-model="row.exchangeRate" size="small" :controls="false" :precision="6"
|
|
|
@change="rateChange(row)" style="width: 100%" placeholder="请输入"></el-input-number>
|
|
|
- <span v-else>{{ row.exchangeRate }}</span>
|
|
|
+ <span v-else>{{ row.exchangeRate }}</span>
|
|
|
</template>
|
|
|
<template slot="currency" slot-scope="{ row }">
|
|
|
<el-select v-if="row.$cellEdit" v-model="row.currency" filterable allow-create default-first-option
|
|
@@ -76,14 +78,14 @@
|
|
|
:value="item.dictValue">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- <span v-else>{{ row.currency }}</span>
|
|
|
+ <span v-else>{{ row.currency }}</span>
|
|
|
</template>
|
|
|
<template slot="unit" slot-scope="{ row }">
|
|
|
<el-select v-if="row.$cellEdit" v-model="row.unit" filterable placeholder="请选择" size="small">
|
|
|
<el-option v-for="(item, index) in unitList" :key="index" :label="item.dictValue" :value="item.dictValue">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- <span v-else>{{ row.unit }}</span>
|
|
|
+ <span v-else>{{ row.unit }}</span>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</trade-card>
|
|
@@ -122,7 +124,7 @@
|
|
|
import feeOption from "./config/feeInfo.json";
|
|
|
import option from "./config/feeList.json";
|
|
|
import { getDeptLazyTree, customerList } from "@/api/basicData/basicFeesDesc";
|
|
|
-import { delItem,delItem2 } from "@/api/feeInfo/fee-info";
|
|
|
+import { delItem, delItem2 } from "@/api/feeInfo/fee-info";
|
|
|
import { isPercentage, micrometerFormat, IntegerFormat } from "@/util/validate";
|
|
|
import cropDialog from "@/components/crop-dialog/main";
|
|
|
import _ from "lodash";
|
|
@@ -256,6 +258,10 @@ export default {
|
|
|
type: Number,
|
|
|
default: 1
|
|
|
},
|
|
|
+ isDecimal: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ },
|
|
|
},
|
|
|
filters: {
|
|
|
isPercentage(val) {
|
|
@@ -430,10 +436,10 @@ export default {
|
|
|
this.feeData.splice(index, 1);
|
|
|
});
|
|
|
} else {
|
|
|
- let data={
|
|
|
- srcParentId:row.id,
|
|
|
- billType:this.itemType,
|
|
|
- tradeType:this.optionType
|
|
|
+ let data = {
|
|
|
+ srcParentId: row.id,
|
|
|
+ billType: this.itemType,
|
|
|
+ tradeType: this.optionType
|
|
|
}
|
|
|
delItem2(data, this.feeUrl).then(res => {
|
|
|
this.$message({
|