Commit f8f14966 by weijiguang

修复bug

parent 60a7675d
......@@ -32,8 +32,8 @@ service.interceptors.response.use(
return { file: data, fileName: headers["content-disposition"] };
}
const { code, msg } = data;
console.log(code);
console.log(msg);
// console.log(code);
// console.log(msg);
switch (code) {
case 1:
return data;
......
......@@ -69,13 +69,13 @@ export const columns = (search, showContract, showDriver, showVehicle, showPayin
minWidth: 120,
},
{
title: "收款时间",
title: "操作时间",
key: "createTime",
align: "center",
minWidth: 140,
},
{
title: "收款人",
title: "操作人",
key: "createByName",
align: "center",
minWidth: 120,
......
......@@ -193,7 +193,7 @@ export const columns = (search, showContract, showVehicle, showReturnDeposit, sh
const params = {
edit: status == 1 ? true : false,
terminate: status == 1 ? true : false,
returnDeposit: depositStatus == 1 || status == 1 ? false : true,
returnDeposit: depositStatus == 2 || status == 1 ? false : true,
};
return h(Actions, {
......
......@@ -4,24 +4,22 @@
<div>
<Form ref="returnForm" :model="returnForm" :rules="returnFormRule" :label-width="80" label-colon>
<Row>
<Col span="24">
<FormItem label="车牌号" prop="plateNo">{{ returnForm.plateNo }}</FormItem>
<Col span="8">
<FormItem label="车牌号">{{ returnForm.plateNo }}</FormItem>
</Col>
</Row>
<Row>
<Col span="24">
<FormItem label="押金状态" prop="status">{{ returnForm.depositStatus }}</FormItem>
<Col span="8">
<FormItem label="押金状态">{{ returnForm.depositStatus }}</FormItem>
</Col>
</Row>
<Row :gutter="10">
<Col span="8">
<FormItem label="应付押金" prop="depositAmount">{{ returnForm.payableDepositAmount }}</FormItem>
<FormItem label="已收押金">{{ returnForm.paidDepositAmount }}</FormItem>
</Col>
<Col span="8">
<FormItem label="已付押金" prop="depositAmount">{{ returnForm.paidDepositAmount }}</FormItem>
<FormItem label="已退押金">{{ returnForm.returnDepositAmount }}</FormItem>
</Col>
<Col span="8">
<FormItem label="已还金额" prop="returnDepositAmount">{{ returnForm.returnDepositAmount }}</FormItem>
<FormItem label="未退押金">{{ returnForm.paidDepositAmount - returnForm.returnDepositAmount }}</FormItem>
</Col>
</Row>
<Row :gutter="10">
......
......@@ -11,14 +11,14 @@ export default {
visible: false,
submitLoading: false,
payingFormRule: {
amount: [{ required: true, message: "请输入返还金额", trigger: "blur" }, { validator: isInteger, trigger: "blur" } ],
delayDateText: [{ type: "date", required: true, message: "请选择开始日期", trigger: "change" }],
},
payingForm: {
planningId: 0,
plateNo: null,
paymentStatus: null,
planDate: null,
delayDate: null,
delayDateText: null,
name: null,
payableAmount: null,
paidAmount: null,
......@@ -43,7 +43,6 @@ export default {
this.payingForm.plateNo = null;
this.payingForm.paymentStatus = null;
this.payingForm.planDate = null;
this.payingForm.delayDate = null;
this.payingForm.name = null;
this.payingForm.payableAmount = null;
this.payingForm.paidAmount = null;
......@@ -56,9 +55,9 @@ export default {
this.payingForm.plateNo = this.planning.plateNo;
this.payingForm.planDate = this.planning.planDate;
if(this.planning.delayDate) {
this.payingForm.delayDate = this.planning.delayDate;
this.payingForm.delayDateText = this.planning.delayDate.substring(0,10);
} else {
this.payingForm.delayDate = this.planning.planDate;
this.payingForm.delayDateText = this.planning.planDate.substring(0,10);
}
this.payingForm.name = this.planning.name;
this.payingForm.payableAmount = this.planning.payableAmount;
......@@ -77,7 +76,7 @@ export default {
if (valid) {
const requestData = {
planningId: this.payingForm.planningId,
delayDate: this.payingForm.delayDate,
delayDate: this.payingForm.delayDateText.valueOf(),
remark: this.payingForm.remark,
}
dispatch("invoke/asyncDelay", requestData).then(({ code }) => {
......
......@@ -32,8 +32,8 @@
</Row>
<Row :gutter="10">
<Col span="24">
<FormItem label="延期日期" prop="delayDate">
<DatePicker v-model="payingForm.delayDate" style="width: 100%" placeholder="请输入延期日期" :options="disabledOption"></DatePicker>
<FormItem label="延期日期" prop="delayDateText">
<DatePicker v-model="payingForm.delayDateText" style="width: 100%" placeholder="请输入延期日期" :options="disabledOption"></DatePicker>
</FormItem>
</Col>
</Row>
......
......@@ -166,7 +166,7 @@ export const columns = (search, showContract, showVehicle, showReturnDeposit) =>
const params = {
edit: status == 1 ? true : false,
terminate: status == 1 ? true : false,
returnDeposit: depositStatus == 1 || status == 1 ? false : true,
returnDeposit: depositStatus == 2 || status == 1 ? false : true,
};
return h(Actions, {
......
......@@ -17,7 +17,7 @@ export default {
returnForm: {
plateNo: null,
depositStatus: null,
depositAmount: null,
paidDepositAmount: null,
returnDepositAmount: null,
returnAmount: null,
remark: null,
......@@ -32,14 +32,14 @@ export default {
this.$refs.returnForm.resetFields();
this.returnForm.plateNo = null;
this.returnForm.depositStatus = null;
this.returnForm.depositAmount = null;
this.returnForm.paidDepositAmount = null;
this.returnForm.returnDepositAmount = null;
this.returnForm.returnAmount = null;
this.returnForm.remark = null;
if(show) {
this.returnForm.plateNo = this.contract.vehicleVo.plateNo;
this.returnForm.depositAmount = this.contract.depositAmount;
this.returnForm.paidDepositAmount = this.contract.paidDepositAmount;
this.returnForm.returnDepositAmount = this.contract.returnDepositAmount;
if (this.contract.depositStatus == 0) {
......@@ -54,7 +54,7 @@ export default {
},
methods: {
setAll() {
this.returnForm.returnAmount = this.returnForm.depositAmount - this.returnForm.returnDepositAmount;
this.returnForm.returnAmount = "" + (this.returnForm.paidDepositAmount - this.returnForm.returnDepositAmount);
},
saveReturnDeposit() {
this.$refs.returnForm.validate(valid => {
......
......@@ -4,29 +4,22 @@
<div>
<Form ref="returnForm" :model="returnForm" :rules="returnFormRule" :label-width="80" label-colon>
<Row>
<Col span="24">
<FormItem label="车牌号" prop="plateNo">
<Input v-model.trim="returnForm.plateNo" disabled />
</FormItem>
<Col span="12">
<FormItem label="车牌号">{{ returnForm.plateNo }}</FormItem>
</Col>
</Row>
<Row>
<Col span="24">
<FormItem label="押金状态" prop="status">
<Input v-model.trim="returnForm.depositStatus" disabled />
</FormItem>
<Col span="12">
<FormItem label="押金状态">{{ returnForm.depositStatus }}</FormItem>
</Col>
</Row>
<Row :gutter="10">
<Col span="12">
<FormItem label="全部押金" prop="depositAmount">
<Input v-model.trim="returnForm.depositAmount" disabled />
</FormItem>
<Col span="8">
<FormItem label="已收押金">{{ returnForm.paidDepositAmount }}</FormItem>
</Col>
<Col span="12">
<FormItem label="已还金额" prop="returnDepositAmount">
<Input v-model.trim="returnForm.returnDepositAmount" disabled />
</FormItem>
<Col span="8">
<FormItem label="已退押金">{{ returnForm.returnDepositAmount }}</FormItem>
</Col>
<Col span="8">
<FormItem label="未退押金">{{ returnForm.paidDepositAmount - returnForm.returnDepositAmount }}</FormItem>
</Col>
</Row>
<Row :gutter="10">
......
......@@ -126,11 +126,11 @@ export default {
saveContract() {
this.$refs.contractForm.validate(valid => {
if (valid) {
this.contractForm.startDate = this.contractForm.startDateText.valueOf();
this.uploadList.forEach(f => {
this.contractForm.files.push(f.id);
})
dispatch("invoke/asyncSignContract", this.contractForm).then(({ code }) => {
this.contractForm.startDate = this.contractForm.startDateText.valueOf();
this.submitLoading = false;
if (code === 1) {
this.$Message.success("合同签订成功");
......
......@@ -69,7 +69,7 @@
</FormItem>
</Col>
<Col span="8">
<FormItem label="首次实租金" prop="firstPaidAmount">
<FormItem label="首次实租金" prop="firstPaidAmount">
<Input v-model.trim="contractForm.firstPaidAmount" type="number" />
</FormItem>
</Col>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment