|
@@ -61,7 +61,7 @@
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<template slot="addressForm" slot-scope="scope">
|
|
|
- <port-info v-model="formTwo.addressId" type="id" :disabled="scope.disabled" @balabalaTow="balabala"/>
|
|
|
+ <port-info v-model="formTwo.addressId" type="id" :disabled="scope.disabled" @balabalaTow="(val)=>{balabala(val,['formTwo','address'])}"/>
|
|
|
</template>
|
|
|
<!-- <template slot="boxMakingCompanyForm" slot-scope="scope">-->
|
|
|
<!-- <crop-select v-model="formTwo.boxMakingCompanyId" :disabled="scope.disabled" :refresh="false"-->
|
|
@@ -71,13 +71,13 @@
|
|
|
<el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '录入'}) == -1?true:false)" type="primary" size="small"
|
|
|
@click="statusUpdate('0','起租')">起租
|
|
|
</el-button>
|
|
|
- <el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '待使用' || item.status == '使用'}) == -1?true:false)" type="primary" size="small"
|
|
|
+ <el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '使用'}) == -1?true:false)" type="primary" size="small"
|
|
|
@click="statusUpdate('1','退租')">退租
|
|
|
</el-button>
|
|
|
- <el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '待使用'}) == -1?true:false)" type="primary" size="small"
|
|
|
+ <el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '使用'}) == -1?true:false)" type="primary" size="small"
|
|
|
@click="statusUpdate('2','计算租金')">计算租金
|
|
|
</el-button>
|
|
|
- <el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '待使用' && item.count > 0}) == -1?true:false)" type="primary" size="small"
|
|
|
+ <el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '使用' && item.count > 0}) == -1?true:false)" type="primary" size="small"
|
|
|
@click="statusUpdate('3','撤销租金')">撤销租金
|
|
|
</el-button>
|
|
|
<el-button :disabled="option.disabled" type="success" size="small" icon="el-icon-bottom" @click="importBox">导入</el-button>
|
|
@@ -170,7 +170,7 @@ import {
|
|
|
tradingBoxFees,
|
|
|
pleaseCheck,
|
|
|
repealCancel,
|
|
|
- statusUpdate, calculateRent, revokeRent
|
|
|
+ statusUpdate, calculateRent, revokeRent, itemDetails
|
|
|
} from "@/api/boxManagement/leaseIn/index.js";
|
|
|
|
|
|
import checkSchedule from "@/components/check/checkSchedule";
|
|
@@ -382,6 +382,7 @@ export default {
|
|
|
index: true,
|
|
|
addBtnText: "录入明细",
|
|
|
refreshBtn: false,
|
|
|
+ dialogDrag: true,
|
|
|
addBtn: true,
|
|
|
span: 8,
|
|
|
selection: true,
|
|
@@ -646,12 +647,7 @@ export default {
|
|
|
overHidden: true,
|
|
|
type: "date",
|
|
|
format: "yyyy-MM-dd",
|
|
|
- valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss"
|
|
|
}, {
|
|
|
label: '箱龄',
|
|
|
prop: 'boxAge',
|
|
@@ -705,6 +701,7 @@ export default {
|
|
|
//下拉箱号带出对应信息
|
|
|
this.findObject(this.option.column, "code").change = ({value, column}) => {
|
|
|
selectArchivesList({code: value}).then(res => {
|
|
|
+ console.log(res)
|
|
|
for (let item of res.data.data) {
|
|
|
if (value == item.code) {
|
|
|
this.formTwo = {
|
|
@@ -712,6 +709,10 @@ export default {
|
|
|
boxStatus: item.boxStatus,
|
|
|
emptyWeight: item.emptyWeight,
|
|
|
grossWeight: item.gorssWeight,
|
|
|
+ boxMakingCompany: item.boxMakingCompany,
|
|
|
+ boxMakingDate: item.boxMakingDate,
|
|
|
+ leaseCommencementDate: item.leaseCommencementDate,
|
|
|
+ boxAge: item.boxAge,
|
|
|
tare: item.tare,
|
|
|
loadingWeight: item.loadingWeight,
|
|
|
volume: item.volume,
|
|
@@ -788,7 +789,7 @@ export default {
|
|
|
if (this.selectionList[0].rentEndDate){
|
|
|
let curDate = new Date(this.selectionList[0].rentEndDate);
|
|
|
let endDateTime = new Date((curDate/1000+86400)*1000)
|
|
|
- this.formState.rentStartDate = new Date((curDate/1000+86400)*1000)
|
|
|
+ this.formState.rentStartDate = dateFormat(endDateTime, "yyyy-MM-dd") + " 00:00:00"
|
|
|
const endDateTwo = new Date(endDateTime.getFullYear(), endDateTime.getMonth() + 1, 0);
|
|
|
this.formState.rentCalculationDate = dateFormat(endDateTwo, "yyyy-MM-dd") + " 23:59:59"
|
|
|
}
|
|
@@ -825,12 +826,12 @@ export default {
|
|
|
done()
|
|
|
if (valid) {
|
|
|
if (this.title === "起租" || this.title === "退租"){
|
|
|
- this.disabledVisible = true
|
|
|
if (this.title === "退租") {
|
|
|
if (Number(new Date(this.selectionList[0].rentEndDate)) > Number(new Date(this.formState.rentDate))) {
|
|
|
return this.$message.error("退租日期不能小于当前租金期间")
|
|
|
}
|
|
|
}
|
|
|
+ this.disabledVisible = true
|
|
|
statusUpdate({
|
|
|
...this.form,
|
|
|
...this.formState,
|
|
@@ -847,10 +848,10 @@ export default {
|
|
|
})
|
|
|
}else {
|
|
|
if (this.title === "计算租金"){
|
|
|
- this.disabledVisible = true
|
|
|
if (Number(new Date(this.selectionList[0].leaseCommencementDate)) > Number(new Date(this.formState.rentStartDate))) {
|
|
|
return this.$message.error("起始日期不能小于起租日期")
|
|
|
}
|
|
|
+ this.disabledVisible = true
|
|
|
calculateRent({
|
|
|
...this.form,
|
|
|
...this.formState,
|
|
@@ -949,12 +950,8 @@ export default {
|
|
|
)
|
|
|
;
|
|
|
},
|
|
|
- balabala(val) {
|
|
|
- if (val === null) {
|
|
|
- this.formTwo.address = ''
|
|
|
- } else {
|
|
|
- this.formTwo.address = val.name
|
|
|
- }
|
|
|
+ balabala(row,type) {
|
|
|
+ this[type[0]][type[1]] = row.name
|
|
|
},
|
|
|
//撤销
|
|
|
repealCancel(){
|
|
@@ -1164,6 +1161,14 @@ export default {
|
|
|
this.findObject(this.option.column, "price").disabled = false
|
|
|
// this.findObject(this.option.column, "amount").disabled = false
|
|
|
}
|
|
|
+ if(['view','edit'].includes(type)){
|
|
|
+ itemDetails({id:this.formTwo.id,type: "ZC"}).then(res=>{
|
|
|
+ if (this.formTwo.tradingBoxFilesList.length === 0){
|
|
|
+ this.formTwo.tradingBoxFilesList = res.data.data.tradingBoxFilesList
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // 查看和编辑逻辑
|
|
|
+ }
|
|
|
done();
|
|
|
},
|
|
|
//删除图片
|