|
@@ -1,10 +1,17 @@
|
|
|
<!-- eslint-disable vue/require-valid-default-prop -->
|
|
<!-- eslint-disable vue/require-valid-default-prop -->
|
|
|
<template>
|
|
<template>
|
|
|
<div>
|
|
<div>
|
|
|
- <el-dialog title="选择数据" :visible.sync="dialogVisible" append-to-body width="80%" :before-close="handleClose">
|
|
|
|
|
|
|
+ <el-dialog title="选择数据" :visible.sync="dialogVisible" append-to-body width="80%" :before-close="handleClose"
|
|
|
|
|
+ :close-on-click-modal="false">
|
|
|
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" id="out-table"
|
|
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" id="out-table"
|
|
|
:header-cell-class-name="headerClassName" @search-change="searchChange" @search-reset="searchReset"
|
|
:header-cell-class-name="headerClassName" @search-change="searchChange" @search-reset="searchReset"
|
|
|
@selection-change="selectionChange" :search.sync="query">
|
|
@selection-change="selectionChange" :search.sync="query">
|
|
|
|
|
+ <template slot="menuLeft">
|
|
|
|
|
+ <el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
|
|
+ <el-tab-pane label="查看数据" name="query" />
|
|
|
|
|
+ <el-tab-pane label="选择数据" name="pick" />
|
|
|
|
|
+ </el-tabs>
|
|
|
|
|
+ </template>
|
|
|
<tempalte slot="currentStlAmountRMB" slot-scope="{ row }">
|
|
<tempalte slot="currentStlAmountRMB" slot-scope="{ row }">
|
|
|
<el-input-number v-if="editSave" v-model="row.currentStlAmountRMB" @change="armbChange(row)"
|
|
<el-input-number v-if="editSave" v-model="row.currentStlAmountRMB" @change="armbChange(row)"
|
|
|
:controls="false" placeholder="请输入 本次对账CNY" size="mini" style="width: 100%;"
|
|
:controls="false" placeholder="请输入 本次对账CNY" size="mini" style="width: 100%;"
|
|
@@ -17,6 +24,12 @@
|
|
|
:disabled="row.curCode == getLocalCurrency() || settlementdistar || !(form.status == '0' || form.status == '4' || form.status == null)"></el-input-number>
|
|
:disabled="row.curCode == getLocalCurrency() || settlementdistar || !(form.status == '0' || form.status == '4' || form.status == null)"></el-input-number>
|
|
|
<span v-else>{{ row.currentStlAmountUSD }}</span>
|
|
<span v-else>{{ row.currentStlAmountUSD }}</span>
|
|
|
</tempalte>
|
|
</tempalte>
|
|
|
|
|
+ <template slot="menu" slot-scope="{ row, index }">
|
|
|
|
|
+ <el-button v-if="activeName == 'query'" size="small" type="text" :disabled="row.disabled"
|
|
|
|
|
+ @click="pick(row, index)">选择</el-button>
|
|
|
|
|
+ <el-button v-if="activeName == 'pick'" size="small" type="text" :disabled="!row.disabled"
|
|
|
|
|
+ @click="cancel(row, index)">取消</el-button>
|
|
|
|
|
+ </template>
|
|
|
</avue-crud>
|
|
</avue-crud>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="dialogVisible = false" size="mini">取 消</el-button>
|
|
<el-button @click="dialogVisible = false" size="mini">取 消</el-button>
|
|
@@ -48,9 +61,12 @@ export default {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ activeName: 'query',
|
|
|
editSave: true,
|
|
editSave: true,
|
|
|
selectionList: [],
|
|
selectionList: [],
|
|
|
data: [],
|
|
data: [],
|
|
|
|
|
+ pickData: [],
|
|
|
|
|
+ queryData: [],
|
|
|
query: {
|
|
query: {
|
|
|
mblno: null,
|
|
mblno: null,
|
|
|
hblno: null,
|
|
hblno: null,
|
|
@@ -76,13 +92,14 @@ export default {
|
|
|
editBtn: false,
|
|
editBtn: false,
|
|
|
refreshBtn: false,
|
|
refreshBtn: false,
|
|
|
columnBtn: false,
|
|
columnBtn: false,
|
|
|
- menu: false,
|
|
|
|
|
|
|
+ menu: true,
|
|
|
|
|
+ menuWidth: 60,
|
|
|
// header: false,
|
|
// header: false,
|
|
|
- tip: false,
|
|
|
|
|
- selection: true,
|
|
|
|
|
- selectable: (row, index) => {
|
|
|
|
|
- return !row.disabled
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // tip: false,
|
|
|
|
|
+ // selection: true,
|
|
|
|
|
+ // selectable: (row, index) => {
|
|
|
|
|
+ // return !row.disabled
|
|
|
|
|
+ // },
|
|
|
column: [
|
|
column: [
|
|
|
{
|
|
{
|
|
|
label: "MB/L NO",
|
|
label: "MB/L NO",
|
|
@@ -239,6 +256,27 @@ export default {
|
|
|
// this.option = await this.getColumnData(this.getColumnName(309.6), this.optionBack);
|
|
// this.option = await this.getColumnData(this.getColumnName(309.6), this.optionBack);
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ handleClick(val) {
|
|
|
|
|
+ if (this.activeName == 'query') {
|
|
|
|
|
+ this.data = this.queryData
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.activeName == 'pick') {
|
|
|
|
|
+ this.data = this.pickData
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ pick(row, index) {
|
|
|
|
|
+ this.$set(row, 'disabled', true)
|
|
|
|
|
+ this.data.splice(index, 1)
|
|
|
|
|
+ this.queryData.splice(index, 1)
|
|
|
|
|
+ this.pickData.push(row)
|
|
|
|
|
+ },
|
|
|
|
|
+ cancel(row, index) {
|
|
|
|
|
+ this.$set(row, 'disabled', false)
|
|
|
|
|
+ if (!this.queryData.find(item => item.accBillNo == row.accBillNo)) {
|
|
|
|
|
+ this.queryData.push(row)
|
|
|
|
|
+ }
|
|
|
|
|
+ this.pickData.splice(index, 1)
|
|
|
|
|
+ },
|
|
|
armbChange(row) {
|
|
armbChange(row) {
|
|
|
if (row.dc == 'C') {
|
|
if (row.dc == 'C') {
|
|
|
if (Number(row.amount - (row.appliedAmount - row.appliedAmountStl) - row.stlTtlAmount) > 0) {
|
|
if (Number(row.amount - (row.appliedAmount - row.appliedAmountStl) - row.stlTtlAmount) > 0) {
|
|
@@ -337,6 +375,8 @@ export default {
|
|
|
},
|
|
},
|
|
|
openDialog() {
|
|
openDialog() {
|
|
|
this.data = []
|
|
this.data = []
|
|
|
|
|
+ this.queryData = []
|
|
|
|
|
+ this.pickData = []
|
|
|
this.dialogVisible = true
|
|
this.dialogVisible = true
|
|
|
// this.query = this.deepClone(this.form)
|
|
// this.query = this.deepClone(this.form)
|
|
|
|
|
|
|
@@ -354,6 +394,7 @@ export default {
|
|
|
}, 200);
|
|
}, 200);
|
|
|
},
|
|
},
|
|
|
searchChange(params, done) {
|
|
searchChange(params, done) {
|
|
|
|
|
+ this.activeName = 'query'
|
|
|
this.finstlbillslistAccBillV1fun()
|
|
this.finstlbillslistAccBillV1fun()
|
|
|
done();
|
|
done();
|
|
|
},
|
|
},
|
|
@@ -428,6 +469,7 @@ export default {
|
|
|
if (arr.length == 0) {
|
|
if (arr.length == 0) {
|
|
|
this.$message.warning('当前检索暂无数据!')
|
|
this.$message.warning('当前检索暂无数据!')
|
|
|
}
|
|
}
|
|
|
|
|
+ this.queryData = arr
|
|
|
this.data = arr
|
|
this.data = arr
|
|
|
}).finally(() => {
|
|
}).finally(() => {
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
@@ -483,6 +525,7 @@ export default {
|
|
|
if (arr.length == 0) {
|
|
if (arr.length == 0) {
|
|
|
this.$message.warning('当前检索暂无数据!')
|
|
this.$message.warning('当前检索暂无数据!')
|
|
|
}
|
|
}
|
|
|
|
|
+ this.queryData = arr
|
|
|
this.data = arr
|
|
this.data = arr
|
|
|
|
|
|
|
|
}).finally(() => {
|
|
}).finally(() => {
|
|
@@ -492,10 +535,10 @@ export default {
|
|
|
},
|
|
},
|
|
|
//debounce为了防止重复点
|
|
//debounce为了防止重复点
|
|
|
submit: _.debounce(function () {
|
|
submit: _.debounce(function () {
|
|
|
- if (this.selectionList.length == 0) {
|
|
|
|
|
|
|
+ if (this.pickData.length == 0) {
|
|
|
return this.$message.error('请选择数据')
|
|
return this.$message.error('请选择数据')
|
|
|
}
|
|
}
|
|
|
- this.$emit('importData', this.selectionList)
|
|
|
|
|
|
|
+ this.$emit('importData', this.pickData)
|
|
|
this.dialogVisible = false
|
|
this.dialogVisible = false
|
|
|
}, 300, {
|
|
}, 300, {
|
|
|
'leading': true,
|
|
'leading': true,
|
|
@@ -548,6 +591,9 @@ export default {
|
|
|
if (this.tableData.some(item => item.accBillNo == row.accBillNo)) {
|
|
if (this.tableData.some(item => item.accBillNo == row.accBillNo)) {
|
|
|
row.disabled = true
|
|
row.disabled = true
|
|
|
}
|
|
}
|
|
|
|
|
+ if (this.pickData.some(item => item.accBillNo == row.accBillNo)) {
|
|
|
|
|
+ row.disabled = true
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
deep: true,
|
|
deep: true,
|