|
@@ -213,7 +213,7 @@ export default {
|
|
prop: 'websitAmount'
|
|
prop: 'websitAmount'
|
|
},
|
|
},
|
|
render: (h, { row, column, index }) => {
|
|
render: (h, { row, column, index }) => {
|
|
- row[column.columnAttributes.prop] = Number(row["amount"]) - Number(row["workerAmount"])
|
|
|
|
|
|
+ row[column.columnAttributes.prop] = (Number(row["amount"]) - Number(row["workerAmount"])).toFixed(2)
|
|
return <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
|
|
return <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -254,7 +254,7 @@ export default {
|
|
this.formData.pgIncreItems.splice(index, 1)
|
|
this.formData.pgIncreItems.splice(index, 1)
|
|
}}>删除</el-button>
|
|
}}>删除</el-button>
|
|
{this.isEditIndex == index && <el-button type="text" onClick={() => {
|
|
{this.isEditIndex == index && <el-button type="text" onClick={() => {
|
|
- if (this.panduancp(row, index)) {
|
|
|
|
|
|
+ if (this.panduancp()) {
|
|
this.$refs.formRef.validateField(this.getVfyKey(index), (valid, invalidFields, errLabels) => {
|
|
this.$refs.formRef.validateField(this.getVfyKey(index), (valid, invalidFields, errLabels) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
this.isEditIndex = -1
|
|
this.isEditIndex = -1
|
|
@@ -290,7 +290,7 @@ export default {
|
|
{
|
|
{
|
|
name: 'el-select',
|
|
name: 'el-select',
|
|
md: 8,
|
|
md: 8,
|
|
- options: [{ label: "延保", value: "1" }, { label: "清洗", value: "2" }],
|
|
|
|
|
|
+ options: [{ label: "延保", value: 1 }, { label: "清洗", value: 2 }],
|
|
attributes: {
|
|
attributes: {
|
|
placeholder: '请选择',
|
|
placeholder: '请选择',
|
|
clearable: true,
|
|
clearable: true,
|
|
@@ -300,6 +300,13 @@ export default {
|
|
label: '服务类型',
|
|
label: '服务类型',
|
|
prop: 'type',
|
|
prop: 'type',
|
|
rules: [...required]
|
|
rules: [...required]
|
|
|
|
+ },
|
|
|
|
+ events: {
|
|
|
|
+ change: (val) => {
|
|
|
|
+ if (val == 1) {
|
|
|
|
+ this.formData.usedType = "YEAR"
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -315,7 +322,8 @@ export default {
|
|
attributes: {
|
|
attributes: {
|
|
placeholder: '请选择',
|
|
placeholder: '请选择',
|
|
clearable: true,
|
|
clearable: true,
|
|
- filterable: true
|
|
|
|
|
|
+ filterable: true,
|
|
|
|
+ disabled: this.formData.type == 1
|
|
},
|
|
},
|
|
formItemAttributes: {
|
|
formItemAttributes: {
|
|
label: '使用类型',
|
|
label: '使用类型',
|
|
@@ -355,7 +363,7 @@ export default {
|
|
<div>
|
|
<div>
|
|
<div style="margin-bottom:8px">
|
|
<div style="margin-bottom:8px">
|
|
<el-button onClick={() => {
|
|
<el-button onClick={() => {
|
|
- if (this.panduancp(this.formData.pgIncreItems[this.isEditIndex], this.isEditIndex)) {
|
|
|
|
|
|
+ if (this.panduancp()) {
|
|
if (this.formData.pgIncreItems.length == 0) {
|
|
if (this.formData.pgIncreItems.length == 0) {
|
|
this.formData.pgIncreItems.push({
|
|
this.formData.pgIncreItems.push({
|
|
"amount": "",
|
|
"amount": "",
|
|
@@ -462,15 +470,17 @@ export default {
|
|
</div>
|
|
</div>
|
|
)
|
|
)
|
|
},
|
|
},
|
|
- panduancp(row, index) {
|
|
|
|
|
|
+ panduancp() {
|
|
try {
|
|
try {
|
|
- this.formData.pgIncreItems.map((item, index_) => {
|
|
|
|
- if (
|
|
|
|
- `${row.brandId}_${row.mainId}_${row.content}` == `${item.brandId}_${item.mainId}_${item.content}` &&
|
|
|
|
- index_ != index
|
|
|
|
- ) {
|
|
|
|
- throw new Error('');
|
|
|
|
- }
|
|
|
|
|
|
+ this.formData.pgIncreItems.map((row, index) => {
|
|
|
|
+ this.formData.pgIncreItems.map((item, index_) => {
|
|
|
|
+ if (
|
|
|
|
+ `${row.brandId}_${row.mainId}_${row.content}` == `${item.brandId}_${item.mainId}_${item.content}` &&
|
|
|
|
+ index_ != index
|
|
|
|
+ ) {
|
|
|
|
+ throw new Error('');
|
|
|
|
+ }
|
|
|
|
+ })
|
|
})
|
|
})
|
|
} catch (error) {
|
|
} catch (error) {
|
|
this.$message.warning('服务内容重复')
|
|
this.$message.warning('服务内容重复')
|
|
@@ -545,7 +555,7 @@ export default {
|
|
this.formDialog = false
|
|
this.formDialog = false
|
|
},
|
|
},
|
|
formConfirm() {
|
|
formConfirm() {
|
|
- if (this.isEditIndex == -1) {
|
|
|
|
|
|
+ if (this.panduancp()) {
|
|
this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
|
|
this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
([increConfigAdd, increConfigUpdate][this.formData.id ? 1 : 0])({
|
|
([increConfigAdd, increConfigUpdate][this.formData.id ? 1 : 0])({
|