|
|
@@ -230,10 +230,8 @@
|
|
|
:disabled="editDisabled">生成租金</el-button>
|
|
|
<el-button type="danger" plain size="small" @click="allClick('撤销租金')"
|
|
|
:disabled="editDisabled">撤销租金</el-button>
|
|
|
- <el-button type="primary" plain size="small"
|
|
|
- :disabled="editDisabled">计算超期箱使费</el-button>
|
|
|
- <el-button type="warning" plain size="small"
|
|
|
- :disabled="editDisabled">批量导入费用</el-button>
|
|
|
+ <el-button type="primary" plain size="small" :disabled="editDisabled">计算超期箱使费</el-button>
|
|
|
+ <el-button type="warning" plain size="small" :disabled="editDisabled">批量导入费用</el-button>
|
|
|
<!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
|
|
|
</template>
|
|
|
<template slot="indexHeader" slot-scope="{row,index}">
|
|
|
@@ -538,13 +536,14 @@
|
|
|
<span>{{ index + 1 }}</span>
|
|
|
</template>
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
- <el-button size="small" icon="el-icon-edit" type="text" @click="rowEdit(row)">{{ row.$cellEdit ? '保存' : '编辑'
|
|
|
- }}</el-button>
|
|
|
- <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row)">删除</el-button>
|
|
|
+ <el-button size="small" icon="el-icon-edit" type="text" @click="rowEdit(row, index)">{{ row.$cellEdit ? '保存' :
|
|
|
+ '编辑'
|
|
|
+ }}</el-button>
|
|
|
+ <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)">删除</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="rtDialog = false" size="mini">保 存</el-button>
|
|
|
+ <el-button type="primary" @click="rtSubmit" size="mini">保 存</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
@@ -564,7 +563,8 @@ import {
|
|
|
renttermRemove,
|
|
|
copyAgent,
|
|
|
countRent,
|
|
|
- revokeCountRent
|
|
|
+ revokeCountRent,
|
|
|
+ submitRtList
|
|
|
} from "@/api/boxManagement/buyContainer";
|
|
|
import dicSelect from "@/components/dicSelect/main";
|
|
|
import checkSchedule from "@/components/checkH/checkSchedule.vue";
|
|
|
@@ -1921,6 +1921,9 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
openRtDialog() {
|
|
|
+ if (!this.form.id) {
|
|
|
+ return this.$message.error("请保存数据");
|
|
|
+ }
|
|
|
this.rtDialog = true
|
|
|
},
|
|
|
getSum() {
|
|
|
@@ -2283,9 +2286,25 @@ export default {
|
|
|
},
|
|
|
rtAddRow() {
|
|
|
this.form.rentTermList.push({
|
|
|
+ pid: this.form.id,
|
|
|
$cellEdit: true
|
|
|
})
|
|
|
},
|
|
|
+ rtSubmit() {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ submitRtList(this.form.rentTermList).then(res => {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ this.form.rentTermList = res.data.data
|
|
|
+ this.rtDialog = false
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ },
|
|
|
feedAddRow() {
|
|
|
if (!this.form.id) {
|
|
|
return this.$message.error("请保存数据");
|
|
|
@@ -2397,6 +2416,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
rowDel(row, index) {
|
|
|
+ console.log(row.id)
|
|
|
this.$confirm("确定删除数据?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
@@ -2702,7 +2722,7 @@ export default {
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
let obj = {
|
|
|
- id:this.form.id,
|
|
|
+ id: this.form.id,
|
|
|
rentDate: res.data.value
|
|
|
}
|
|
|
const loading = this.$loading({
|
|
|
@@ -2734,7 +2754,7 @@ export default {
|
|
|
spinner: 'el-icon-loading',
|
|
|
background: 'rgba(255,255,255,0.7)'
|
|
|
});
|
|
|
- revokeCountRent({id:this.form.id}).then(res => {
|
|
|
+ revokeCountRent({ id: this.form.id }).then(res => {
|
|
|
this.$message.success("操作成功!");
|
|
|
this.getDetail(this.form.id)
|
|
|
}).finally(() => {
|