295 lines
9.8 KiB
Vue
295 lines
9.8 KiB
Vue
<template>
|
||
<div class="app-container" >
|
||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
||
<el-col :span="24">
|
||
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
||
<el-col :span="6">
|
||
<el-form-item label="账单号" prop="settleBillNo">
|
||
<el-input v-model="form.settleBillNo" placeholder="请输入总结算账单编号" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="6">
|
||
<el-form-item label="账单名称" prop="settleBillName">
|
||
<el-input v-model="form.settleBillName" placeholder="请输入结算账单名称" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="6">
|
||
<el-form-item label="结算账单类型" prop="settleType">
|
||
<el-input v-model="form.settleType" placeholder="请输入结算账单类型" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="6">
|
||
<el-form-item label="账单开始时间" prop="settleStartDate">
|
||
<el-date-picker clearable
|
||
v-model="form.settleStartDate"
|
||
type="date"
|
||
value-format="yyyy-MM-dd"
|
||
placeholder="请选择结算开始时间">
|
||
</el-date-picker>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="6">
|
||
<el-form-item label="账单结束时间" prop="settleEndDate">
|
||
<el-date-picker clearable
|
||
v-model="form.settleEndDate"
|
||
type="date"
|
||
value-format="yyyy-MM-dd"
|
||
placeholder="请选择结算结束时间">
|
||
</el-date-picker>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="6">
|
||
<el-form-item label="账单月份" prop="billMonth">
|
||
<el-input v-model="form.billMonth" placeholder="请输入账单月份" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<!-- <el-col :span="24">
|
||
<el-form-item label="应收款金额" prop="recMoney">
|
||
<el-input v-model="form.recMoney" placeholder="请输入应收款金额" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="24">
|
||
<el-form-item label="已收款金额" prop="recedMoney">
|
||
<el-input v-model="form.recedMoney" placeholder="请输入已收款金额" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="24">
|
||
<el-form-item label="月结编号" prop="custNo">
|
||
<el-input v-model="form.custNo" placeholder="请输入月结编号" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="24">
|
||
<el-form-item label="客户编码" prop="customerCode">
|
||
<el-input v-model="form.customerCode" placeholder="请输入客户编码" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="24">
|
||
<el-form-item label="客户名称" prop="customerName">
|
||
<el-input v-model="form.customerName" placeholder="请输入客户名称" />
|
||
</el-form-item>
|
||
</el-col>
|
||
|
||
<el-col :span="24">
|
||
<el-form-item label="总票数" prop="sendPieceSum">
|
||
<el-input v-model="form.sendPieceSum" placeholder="请输入总票数" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="24">
|
||
<el-form-item label="总件数" prop="pieceNumber">
|
||
<el-input v-model="form.pieceNumber" placeholder="请输入总件数" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="24">
|
||
<el-form-item label="总重量" prop="feeWeight">
|
||
<el-input v-model="form.feeWeight" placeholder="请输入总重量" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="24">
|
||
<el-form-item label="未结数量" prop="uncollectedAmount">
|
||
<el-input v-model="form.uncollectedAmount" placeholder="请输入未结数量" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="24">
|
||
<el-form-item label="合计金额" prop="sendMoneySum">
|
||
<el-input v-model="form.sendMoneySum" placeholder="请输入合计金额" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="24">
|
||
<el-form-item label="退款数量" prop="refundAmount">
|
||
<el-input v-model="form.refundAmount" placeholder="请输入退款数量" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="24">
|
||
<el-form-item label="退款金额" prop="refundMoney">
|
||
<el-input v-model="form.refundMoney" placeholder="请输入退款金额" />
|
||
</el-form-item>
|
||
</el-col> -->
|
||
|
||
</el-row>
|
||
</el-col>
|
||
<el-col :span="24">
|
||
|
||
</el-col>
|
||
</el-row>
|
||
|
||
</el-form>
|
||
<div style="text-align: center;margin-bottom: 10px;">
|
||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||
<el-button @click="cancel">取 消</el-button>
|
||
</div>
|
||
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
import { listEmisSettleBill, getEmisSettleBill, delEmisSettleBill, addEmisSettleBill, updateEmisSettleBill } from "@/api/emis/emisSettleBill";
|
||
|
||
export default {
|
||
name: "emisSettleBillForm",
|
||
props:{
|
||
id:{
|
||
type:Number
|
||
}
|
||
},
|
||
components: { },
|
||
dicts: [
|
||
],
|
||
data() {
|
||
return {
|
||
emisSettleBillOptions: [],
|
||
// 遮罩层
|
||
loading: true,
|
||
// 表单参数
|
||
form: {},
|
||
// 表单校验
|
||
rules: {
|
||
id: [
|
||
{ required: true, message: "id不能为空", trigger: "blur" }
|
||
],
|
||
openBillStatus: [
|
||
{ required: true, message: "开票状态不能为空", trigger: "blur" }
|
||
],
|
||
paymentStatus: [
|
||
{ required: true, message: "付款状态不能为空", trigger: "blur" }
|
||
],
|
||
delFlag: [
|
||
{ required: true, message: "删除标志(0代表存在不能为空", trigger: "blur" }
|
||
],
|
||
}
|
||
};
|
||
},
|
||
watch: {
|
||
"id": {
|
||
handler (newValue, oldValue) {
|
||
this.id = newValue;
|
||
this.initData();
|
||
},
|
||
deep: true
|
||
}
|
||
},
|
||
created() {
|
||
this.initData();
|
||
},
|
||
|
||
methods: {
|
||
initData() {
|
||
|
||
if(this.id !=null) {
|
||
this.loading = true;
|
||
getEmisSettleBill(this.id).then(response => {
|
||
this.form = response.data;
|
||
this.loading = false;
|
||
});
|
||
}else{
|
||
this.reset();
|
||
}
|
||
// this.getTreeselect();
|
||
},
|
||
// 取消按钮
|
||
cancel() {
|
||
this.reset();
|
||
this.$emit("on-cancel");
|
||
},
|
||
// 表单重置
|
||
reset() {
|
||
this.form = {
|
||
id: null,
|
||
settleBillNo: null,
|
||
settleBillName: null,
|
||
settleType: null,
|
||
settleStartDate: null,
|
||
settleEndDate: null,
|
||
billMonth: null,
|
||
recMoney: null,
|
||
recedMoney: null,
|
||
custNo: null,
|
||
customerCode: null,
|
||
customerName: null,
|
||
siteCode: null,
|
||
siteName: null,
|
||
satisfyMoney: null,
|
||
allowanceMoney: null,
|
||
deductionMoney: null,
|
||
otherMoney: null,
|
||
satisfyReason: null,
|
||
allowanceReason: null,
|
||
deductionReason: null,
|
||
otherReason: null,
|
||
openBillStatus: null,
|
||
paymentStatus: null,
|
||
sendPieceSum: null,
|
||
pieceNumber: null,
|
||
feeWeight: null,
|
||
uncollectedAmount: null,
|
||
sendMoneySum: null,
|
||
refundAmount: null,
|
||
refundMoney: null,
|
||
blConfirm: null,
|
||
confirmDate: null,
|
||
confirmSite: null,
|
||
confirmManCode: null,
|
||
blSiteConfirm: null,
|
||
confirmNote: null,
|
||
siteConfirmDate: null,
|
||
siteConfirmManCode: null,
|
||
siteConfirmNote: null,
|
||
remark: null,
|
||
delFlag: null,
|
||
createBy: null,
|
||
createTime: null,
|
||
updateBy: null,
|
||
updateTime: null,
|
||
createSite: null,
|
||
updateSite: null
|
||
};
|
||
this.resetForm("form");
|
||
},
|
||
/** 提交按钮 */
|
||
submitForm() {
|
||
this.$refs["form"].validate(valid => {
|
||
if (valid) {
|
||
if (this.form.id != null) {
|
||
updateEmisSettleBill(this.form).then(response => {
|
||
this.$modal.msgSuccess("修改成功");
|
||
this.$emit("on-changed");
|
||
});
|
||
} else {
|
||
addEmisSettleBill(this.form).then(response => {
|
||
this.$modal.msgSuccess("新增成功");
|
||
this.$emit("on-changed");
|
||
});
|
||
}
|
||
}
|
||
});
|
||
},
|
||
// /** 转换菜单数据结构 */
|
||
// normalizer(node) {
|
||
// if (node.children && !node.children.length) {
|
||
// delete node.children;
|
||
// }
|
||
// return {
|
||
// id: node.id,
|
||
// label: node.idName,
|
||
// children: node.children
|
||
// };
|
||
// },
|
||
// /** 查询菜单下拉树结构 */
|
||
// getTreeselect() {
|
||
// const queryParams = {}
|
||
// listEmisSettleBill(queryParams).then(response => {
|
||
// this.emisSettleBillOptions = [];
|
||
// const rootItem = { idId: 0, emisSettleBillName: '-', children: [] };
|
||
// rootItem.children = this.handleTree(response.data, "id");
|
||
// this.emisSettleBillOptions.push(rootItem);
|
||
|
||
// if(this.parentId != undefined) {
|
||
// this.form.parentId = this.parentId;
|
||
// }
|
||
|
||
// });
|
||
// },
|
||
}
|
||
};
|
||
</script>
|