|
|
@@ -29,10 +29,14 @@
|
|
|
</el-button> -->
|
|
|
<!-- <el-button type="success" size="small" @click="outExport" icon="el-icon-printer">导出</el-button> -->
|
|
|
</template>
|
|
|
- <template slot-scope="scope" slot="menu">
|
|
|
- <el-button type="text" icon="el-icon-view" size="small" @click.stop="rowView(scope.row, scope.index)">查看 </el-button>
|
|
|
- <el-button type="text" icon="el-icon-edit" size="small" @click.stop="rowEdit(scope.row, scope.index)">编辑 </el-button>
|
|
|
- <el-button type="text" icon="el-icon-delete" size="small" @click.stop="rowDel(scope.row, scope.index)">删除 </el-button>
|
|
|
+ <template slot-scope="{ row, index }" slot="menu">
|
|
|
+ <el-button type="text" icon="el-icon-view" size="small" @click.stop="rowView(row, scope.index)">查看 </el-button>
|
|
|
+ <el-button type="text" icon="el-icon-edit" size="small" @click.stop="rowEdit(row, scope.index)" :disabled="row.usedAmount != 0"
|
|
|
+ >编辑
|
|
|
+ </el-button>
|
|
|
+ <el-button type="text" icon="el-icon-delete" size="small" @click.stop="rowDel(row, scope.index)" :disabled="row.usedAmount != 0"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
<template slot-scope="{ type, disabled }" slot="corpNameForm">
|
|
|
<dic-select
|
|
|
@@ -51,18 +55,19 @@
|
|
|
</template>
|
|
|
<template slot-scope="{ type, disabled }" slot="prepaidAmountForm">
|
|
|
<el-input-number
|
|
|
- style="width: 100%;"
|
|
|
+ style="width: 100%"
|
|
|
v-model="form.prepaidAmount"
|
|
|
@change="calculateChange(form)"
|
|
|
placeholder="请输入 预付金额"
|
|
|
size="small"
|
|
|
:controls="false"
|
|
|
+ :disabled="disabled"
|
|
|
></el-input-number>
|
|
|
</template>
|
|
|
<template slot="usedAmount" slot-scope="{ row }">
|
|
|
<el-popover width="700" trigger="click">
|
|
|
<avue-crud :data="uaData" :option="uaOption"></avue-crud>
|
|
|
- <span style="color: #409EFF;cursor: pointer" slot="reference" @click="viewUA(row)">{{ row.usedAmount }}</span>
|
|
|
+ <span style="color: #409eff; cursor: pointer" slot="reference" @click="viewUA(row)">{{ row.usedAmount }}</span>
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
@@ -72,50 +77,48 @@
|
|
|
<el-button type="primary" @click="download"> 点击下载<i class="el-icon-download el-icon--right"></i> </el-button>
|
|
|
</template>
|
|
|
</avue-form>
|
|
|
- <p style="text-align: center;color: #DC0505">
|
|
|
- 温馨提示 第一次导入时请先下载模板
|
|
|
- </p>
|
|
|
+ <p style="text-align: center; color: #dc0505">温馨提示 第一次导入时请先下载模板</p>
|
|
|
</el-dialog>
|
|
|
</basic-container>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getList, getDetail, submit, remove,getUaList } from "@/api/iosBasicData/advancePayment.js";
|
|
|
+import { getList, getDetail, submit, remove, getUaList } from "@/api/iosBasicData/advancePayment.js";
|
|
|
import { getToken } from "@/util/auth";
|
|
|
import dicSelect from "@/components/dicSelect/main";
|
|
|
export default {
|
|
|
components: {
|
|
|
- dicSelect
|
|
|
+ dicSelect,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- uaData:[],
|
|
|
- uaOption:{
|
|
|
+ uaData: [],
|
|
|
+ uaOption: {
|
|
|
header: false,
|
|
|
menu: false,
|
|
|
align: "center",
|
|
|
column: [
|
|
|
- {
|
|
|
+ {
|
|
|
label: "销账单号",
|
|
|
prop: "srcNo",
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "币别",
|
|
|
prop: "curCode",
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "使用金额",
|
|
|
prop: "usedAmount",
|
|
|
- overHidden: true
|
|
|
- }
|
|
|
- ]
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
form: {
|
|
|
prepaidAmount: 0,
|
|
|
usedAmount: 0,
|
|
|
- balanceAmount: 0
|
|
|
+ balanceAmount: 0,
|
|
|
},
|
|
|
query: {},
|
|
|
loading: true,
|
|
|
@@ -131,7 +134,7 @@ export default {
|
|
|
label: "模板下载",
|
|
|
prop: "excelTemplate",
|
|
|
formslot: true,
|
|
|
- span: 24
|
|
|
+ span: 24,
|
|
|
},
|
|
|
{
|
|
|
label: "模板上传",
|
|
|
@@ -141,22 +144,22 @@ export default {
|
|
|
loadText: "模板上传中,请稍等",
|
|
|
span: 24,
|
|
|
propsHttp: {
|
|
|
- res: "data"
|
|
|
+ res: "data",
|
|
|
},
|
|
|
tip: "请上传 .xls,.xlsx 标准格式文件",
|
|
|
- action: "/api/blade-los/bpackages/importBPackages"
|
|
|
- }
|
|
|
- ]
|
|
|
+ action: "/api/blade-los/bpackages/importBPackages",
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
page: {
|
|
|
pageSize: 20,
|
|
|
currentPage: 1,
|
|
|
total: 0,
|
|
|
- pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
|
|
|
+ pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500],
|
|
|
},
|
|
|
selectionList: [],
|
|
|
option: {
|
|
|
- dialogDrag: true
|
|
|
+ dialogDrag: true,
|
|
|
},
|
|
|
optionBack: {
|
|
|
dialogDrag: true,
|
|
|
@@ -185,8 +188,8 @@ export default {
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请选择客户名称",
|
|
|
- trigger: "blur"
|
|
|
- }
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
],
|
|
|
type: "select",
|
|
|
filterable: true,
|
|
|
@@ -195,9 +198,9 @@ export default {
|
|
|
props: {
|
|
|
label: "cnName",
|
|
|
value: "cnName",
|
|
|
- res: "data.records"
|
|
|
+ res: "data.records",
|
|
|
},
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "币别",
|
|
|
@@ -206,7 +209,7 @@ export default {
|
|
|
props: {
|
|
|
label: "code",
|
|
|
value: "code",
|
|
|
- res: "data.records"
|
|
|
+ res: "data.records",
|
|
|
},
|
|
|
dicUrl: "/api/blade-los/bcurrency/page?current=1&size=10",
|
|
|
width: 150,
|
|
|
@@ -214,10 +217,10 @@ export default {
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请选择币别",
|
|
|
- trigger: "blur"
|
|
|
- }
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
],
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "预付金额",
|
|
|
@@ -229,65 +232,65 @@ export default {
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请输入预付金额",
|
|
|
- trigger: "blur"
|
|
|
- }
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
],
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "使用金额",
|
|
|
prop: "usedAmount",
|
|
|
width: 150,
|
|
|
disabled: true,
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "余额",
|
|
|
prop: "balanceAmount",
|
|
|
width: 150,
|
|
|
disabled: true,
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "预付款日期",
|
|
|
prop: "advancePaymentDate",
|
|
|
width: 150,
|
|
|
type: "date",
|
|
|
- format: "yyyy-MM-dd 00:00:00",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
valueFormat: "yyyy-MM-dd 00:00:00",
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "创建人",
|
|
|
prop: "createUserName",
|
|
|
display: false,
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "创建部门",
|
|
|
prop: "createDeptName",
|
|
|
display: false,
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "创建时间",
|
|
|
prop: "createTime",
|
|
|
width: 160,
|
|
|
display: false,
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "修改人",
|
|
|
prop: "updateUserName",
|
|
|
display: false,
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "修改时间",
|
|
|
prop: "updateTime",
|
|
|
width: 160,
|
|
|
display: false,
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "备注",
|
|
|
@@ -297,11 +300,11 @@ export default {
|
|
|
slot: true,
|
|
|
span: 24,
|
|
|
minRows: 3,
|
|
|
- overHidden: true
|
|
|
- }
|
|
|
- ]
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
- data: []
|
|
|
+ data: [],
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
|
@@ -312,9 +315,9 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
- viewUA(row){
|
|
|
- this.uaData=[]
|
|
|
- getUaList({ pid: row.id }).then(res => {
|
|
|
+ viewUA(row) {
|
|
|
+ this.uaData = [];
|
|
|
+ getUaList({ pid: row.id }).then((res) => {
|
|
|
this.uaData = res.data.data.records;
|
|
|
});
|
|
|
},
|
|
|
@@ -344,7 +347,7 @@ export default {
|
|
|
this.$confirm("是否导出预付款?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
+ type: "warning",
|
|
|
})
|
|
|
.then(() => {
|
|
|
window.open(`/api/blade-los/bpackages/exportBPackages??whetherDg=1&${this.website.tokenHeader}=${getToken()}${condition}`);
|
|
|
@@ -352,7 +355,7 @@ export default {
|
|
|
.catch(() => {
|
|
|
this.$message({
|
|
|
type: "info",
|
|
|
- message: "已取消" //
|
|
|
+ message: "已取消", //
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
@@ -378,11 +381,11 @@ export default {
|
|
|
this.onLoad(this.page);
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
- message: "操作成功!"
|
|
|
+ message: "操作成功!",
|
|
|
});
|
|
|
done();
|
|
|
},
|
|
|
- error => {
|
|
|
+ (error) => {
|
|
|
loading();
|
|
|
}
|
|
|
);
|
|
|
@@ -393,7 +396,7 @@ export default {
|
|
|
this.onLoad(this.page);
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
- message: "操作成功!"
|
|
|
+ message: "操作成功!",
|
|
|
});
|
|
|
done();
|
|
|
})
|
|
|
@@ -406,7 +409,7 @@ export default {
|
|
|
this.form = {
|
|
|
prepaidAmount: 0,
|
|
|
usedAmount: 0,
|
|
|
- balanceAmount: 0
|
|
|
+ balanceAmount: 0,
|
|
|
};
|
|
|
this.$refs.crud.rowAdd();
|
|
|
},
|
|
|
@@ -416,7 +419,7 @@ export default {
|
|
|
},
|
|
|
// 编辑
|
|
|
rowEdit(row, index) {
|
|
|
- getDetail({ id: row.id }).then(res => {
|
|
|
+ getDetail({ id: row.id }).then((res) => {
|
|
|
this.form = res.data.data;
|
|
|
this.$refs.crud.rowEdit(row, index);
|
|
|
});
|
|
|
@@ -426,13 +429,13 @@ export default {
|
|
|
this.$confirm("确定将选择数据删除?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
+ type: "warning",
|
|
|
}).then(() => {
|
|
|
remove(row.id).then(() => {
|
|
|
this.onLoad(this.page);
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
- message: "操作成功!"
|
|
|
+ message: "操作成功!",
|
|
|
});
|
|
|
this.$refs.crud.toggleSelection();
|
|
|
});
|
|
|
@@ -446,20 +449,20 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
let ids = [];
|
|
|
- this.selectionList.forEach(ele => {
|
|
|
+ this.selectionList.forEach((ele) => {
|
|
|
ids.push(ele.id);
|
|
|
});
|
|
|
this.$confirm("确定将选择数据删除?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
+ type: "warning",
|
|
|
}).then(() => {
|
|
|
this.$refs.crud.toggleSelection();
|
|
|
remove(ids.join(",")).then(() => {
|
|
|
this.onLoad(this.page);
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
- message: "操作成功!"
|
|
|
+ message: "操作成功!",
|
|
|
});
|
|
|
this.$refs.crud.toggleSelection();
|
|
|
});
|
|
|
@@ -495,7 +498,7 @@ export default {
|
|
|
onLoad(page, params = {}) {
|
|
|
this.loading = true;
|
|
|
getList(page.currentPage, page.pageSize, Object.assign(params, this.query))
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
this.data = res.data.data.records;
|
|
|
this.page.total = res.data.data.total;
|
|
|
})
|
|
|
@@ -538,8 +541,8 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
return back;
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|