|
|
@@ -8,7 +8,7 @@
|
|
|
</div>
|
|
|
<div class="add-customer-btn">
|
|
|
<el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small" v-if="editButton"
|
|
|
- :disabled="showLock || !(roleName.indexOf('admin') != -1 || roleName.indexOf('允许修改他人业务') != -1 || saberUserInfo.user_id == form.createUser)"
|
|
|
+ :disabled="!(roleName.indexOf('admin') != -1 || roleName.indexOf('允许修改他人业务') != -1 || saberUserInfo.user_id == form.createUser)"
|
|
|
@click="inEdit">编 辑
|
|
|
</el-button>
|
|
|
<el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
|
|
|
@@ -40,31 +40,11 @@
|
|
|
<template slot="index" slot-scope="{row,index}">
|
|
|
<span>{{ index + 1 }}</span>
|
|
|
</template>
|
|
|
- <template slot="boxTypeForm" slot-scope="{ row }">
|
|
|
- <dic-select v-if="row.$cellEdit" v-model="row.boxType" key="id" label="cnName" res="records"
|
|
|
- url="/blade-los/bcntrtypes/list?status=0¤t=1&size=20" :filterable="true" :remote="true"
|
|
|
- dataName="cnName" @selectChange="rowDicChange('boxType', $event, row)"></dic-select>
|
|
|
- <span v-else>{{ row.boxType }}</span>
|
|
|
- </template>
|
|
|
- <template slot="oceanFreightForm" slot-scope="{ row }">
|
|
|
- <el-input-number v-if="row.$cellEdit" v-model="row.oceanFreight" :controls="false" placeholder="请输入 海运费"
|
|
|
- size="small" style="width: 100%;" :precision="2" @change="countChange(row)"></el-input-number>
|
|
|
- <span v-else>{{ row.oceanFreight }}</span>
|
|
|
- </template>
|
|
|
- <template slot="inlandFreightForm" slot-scope="{ row }">
|
|
|
- <el-input-number v-if="row.$cellEdit" v-model="row.inlandFreight" :controls="false" placeholder="请输入 陆运费"
|
|
|
- size="small" style="width: 100%;" :precision="2" @change="countChange(row)"></el-input-number>
|
|
|
- <span v-else>{{ row.inlandFreight }}</span>
|
|
|
- </template>
|
|
|
- <template slot="loloForm" slot-scope="{ row }">
|
|
|
- <el-input-number v-if="row.$cellEdit" v-model="row.lolo" :controls="false" placeholder="请输入 LOLO"
|
|
|
- size="small" style="width: 100%;" :precision="2" @change="countChange(row)"></el-input-number>
|
|
|
- <span v-else>{{ row.lolo }}</span>
|
|
|
- </template>
|
|
|
- <template slot="otherAmountForm" slot-scope="{ row }">
|
|
|
- <el-input-number v-if="row.$cellEdit" v-model="row.otherAmount" :controls="false" placeholder="请输入 其他金额"
|
|
|
- size="small" style="width: 100%;" :precision="2" @change="countChange(row)"></el-input-number>
|
|
|
- <span v-else>{{ row.otherAmount }}</span>
|
|
|
+ <template slot="menu" slot-scope="{ row, index }">
|
|
|
+ <el-button size="small" :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" type="text"
|
|
|
+ :disabled="editDisabled" @click="rowCell(row, index)">{{ row.$cellEdit ? '保 存' : '编 辑' }}</el-button>
|
|
|
+ <el-button size="small" icon="el-icon-delete" type="text" :disabled="editDisabled"
|
|
|
+ @click="rowDel(row, index)">删 除</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</trade-card>
|
|
|
@@ -80,13 +60,15 @@
|
|
|
import {
|
|
|
detail,
|
|
|
submit,
|
|
|
- itemRevoke,
|
|
|
+ itemRemove,
|
|
|
} from "@/api/iosBasicData/overdueFee.js";
|
|
|
import dicSelect from "@/components/dicSelect/main";
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
|
return {
|
|
|
+ editButton: false,
|
|
|
+ editDisabled: false,
|
|
|
form: {
|
|
|
status: 0,
|
|
|
storageFeesItemsList: [],
|
|
|
@@ -132,19 +114,6 @@ export default {
|
|
|
}],
|
|
|
},
|
|
|
{
|
|
|
- label: "状态",
|
|
|
- prop: "status",
|
|
|
- disabled: false,
|
|
|
- type: 'select',
|
|
|
- dicData: [{
|
|
|
- label: '启用',
|
|
|
- value: 0
|
|
|
- }, {
|
|
|
- label: '停用',
|
|
|
- value: 1
|
|
|
- }],
|
|
|
- },
|
|
|
- {
|
|
|
label: '备注',
|
|
|
prop: 'remarks',
|
|
|
type: 'textarea',
|
|
|
@@ -184,7 +153,7 @@ export default {
|
|
|
optionBack: {
|
|
|
// height: 'auto',
|
|
|
calcHeight: 30,
|
|
|
- menuWidth: 60,
|
|
|
+ menuWidth: 120,
|
|
|
searchMenuSpan: 18,
|
|
|
tip: false,
|
|
|
border: true,
|
|
|
@@ -195,7 +164,7 @@ export default {
|
|
|
refreshBtn: false,
|
|
|
selection: true,
|
|
|
align: 'center',
|
|
|
- menu: false,
|
|
|
+ menu: true,
|
|
|
column: [
|
|
|
{
|
|
|
label: "index",
|
|
|
@@ -214,6 +183,13 @@ export default {
|
|
|
cell: true,
|
|
|
type: 'number',
|
|
|
controls: false,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '请输入起始天数',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
label: '结束天数',
|
|
|
@@ -221,6 +197,13 @@ export default {
|
|
|
cell: true,
|
|
|
type: 'number',
|
|
|
controls: false,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '请输入结束天数',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
label: '币别',
|
|
|
@@ -245,11 +228,6 @@ export default {
|
|
|
type: 'number',
|
|
|
controls: false,
|
|
|
overHidden: true,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入20GP",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
},
|
|
|
{
|
|
|
label: '40GP',
|
|
|
@@ -258,11 +236,6 @@ export default {
|
|
|
type: 'number',
|
|
|
controls: false,
|
|
|
overHidden: true,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入40GP",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
},
|
|
|
{
|
|
|
label: '40HC',
|
|
|
@@ -271,11 +244,6 @@ export default {
|
|
|
type: 'number',
|
|
|
controls: false,
|
|
|
overHidden: true,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入40HC",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
},
|
|
|
{
|
|
|
label: "制单人",
|
|
|
@@ -330,8 +298,35 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- dicChange(name, row) {
|
|
|
+ rowCell(row, index) {
|
|
|
+ if (!row.startDay || !row.endDay || !row.curCode) {
|
|
|
+ this.$refs.crud.rowCell(row, index)
|
|
|
+ return this.$message.error("请完善明细信息");
|
|
|
+ }
|
|
|
+ if (row.$cellEdit == true) {
|
|
|
+ this.$set(row, "$cellEdit", false);
|
|
|
+ } else {
|
|
|
+ this.$set(row, "$cellEdit", true);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ rowDel(row, index) {
|
|
|
+ this.$confirm("确定删除数据?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ if (row.id) {
|
|
|
+ itemRemove({ ids: row.id }).then(res => {
|
|
|
+ this.form.storageFeesItemsList.splice(index, 1);
|
|
|
+ this.$message.success("成功删除");
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.form.storageFeesItemsList.splice(index, 1);
|
|
|
+ }
|
|
|
|
|
|
+ });
|
|
|
+ },
|
|
|
+ dicChange(name, row) {
|
|
|
if (name == 'branchName') {
|
|
|
if (row) {
|
|
|
this.form.branchId = row.id
|
|
|
@@ -341,18 +336,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- rowDicChange(name, row, el, index) {
|
|
|
- if (name == 'boxType') {
|
|
|
- if (row) {
|
|
|
- el.boxTypeId = row.id
|
|
|
- } else {
|
|
|
- el.boxTypeId = null
|
|
|
- el.boxType = null
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
rowEdit(row) {
|
|
|
if (row.$cellEdit == true) {
|
|
|
this.$set(row, "$cellEdit", false);
|
|
|
@@ -360,21 +343,16 @@ export default {
|
|
|
this.$set(row, "$cellEdit", true);
|
|
|
}
|
|
|
},
|
|
|
- rowItemEdit(row) {
|
|
|
- if (row.$cellEdit == true) {
|
|
|
- this.$set(row, "$cellEdit", false);
|
|
|
- } else {
|
|
|
- this.$set(row, "$cellEdit", true);
|
|
|
- }
|
|
|
- },
|
|
|
addRow() {
|
|
|
if (!this.form.id) {
|
|
|
return this.$message.error("请保存数据");
|
|
|
}
|
|
|
-
|
|
|
this.$refs.crud.dicInit();
|
|
|
this.form.storageFeesItemsList.push({
|
|
|
pid: this.form.id,
|
|
|
+ price20gp: 0,
|
|
|
+ price40gp: 0,
|
|
|
+ price40hc: 0,
|
|
|
$cellEdit: true
|
|
|
})
|
|
|
},
|
|
|
@@ -396,19 +374,17 @@ export default {
|
|
|
},
|
|
|
inEdit() {
|
|
|
this.editButton = false
|
|
|
- if (this.form.status == '录入') {
|
|
|
- this.editDisabled = false
|
|
|
- this.optionForm.disabled = false
|
|
|
- }
|
|
|
+ this.editDisabled = false
|
|
|
+ this.optionForm.disabled = false
|
|
|
},
|
|
|
submit(type) {
|
|
|
this.$refs["form"].validate((valid, done) => {
|
|
|
done();
|
|
|
if (valid) {
|
|
|
for (let row of this.form.storageFeesItemsList) {
|
|
|
- if (!row.boxType || !row.curCode || !row.oceanFreight || !row.inlandFreight || !row.lolo) {
|
|
|
+ if (!row.startDay || !row.endDay || !row.curCode) {
|
|
|
this.$refs.crud.rowCell(row, row.$index)
|
|
|
- return this.$message.error("请完善箱明细信息");
|
|
|
+ return this.$message.error("请完善基础明细信息");
|
|
|
}
|
|
|
}
|
|
|
const loading = this.$loading({
|
|
|
@@ -423,7 +399,6 @@ export default {
|
|
|
}).finally(() => {
|
|
|
loading.close();
|
|
|
})
|
|
|
-
|
|
|
} else {
|
|
|
return false;
|
|
|
}
|