Commit f8f14966 by weijiguang

修复bug

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