|
|
@@ -41,19 +41,19 @@
|
|
|
</tempalte>
|
|
|
<tempalte slot="polStationCname">
|
|
|
<dic-select v-model="form.polStationCname" placeholder="退/还箱地" key="id" label="cnName" res="records"
|
|
|
- url="/blade-los/blocations/list" :filterable="true" :remote="true" dataName="cnName"
|
|
|
+ url="/blade-los/bcorps/selectList?corpTypeName=场站" :filterable="true" :remote="true" dataName="cnName"
|
|
|
@selectChange="dicChange('polStationCname', $event)"></dic-select>
|
|
|
</tempalte>
|
|
|
- <tempalte slot="stationCname">
|
|
|
- <dic-select v-model="form.stationCname" placeholder="场站" key="id" label="cnName" res="records"
|
|
|
- url="/blade-los/blocations/list" :filterable="true" :remote="true" dataName="cnName"
|
|
|
- @selectChange="dicChange('stationCname', $event)"></dic-select>
|
|
|
- </tempalte>
|
|
|
<tempalte slot="addressCname">
|
|
|
<dic-select v-model="form.addressCname" placeholder="港口" key="id" label="cnName" res="records"
|
|
|
url="/blade-los/bports/list" :filterable="true" :remote="true" dataName="cnName"
|
|
|
@selectChange="dicChange('addressCname', $event)" :disabled="editDisabled"></dic-select>
|
|
|
</tempalte>
|
|
|
+ <tempalte slot="stationCname">
|
|
|
+ <dic-select v-model="form.stationCname" placeholder="场站" :key="updateFormKey" label="cnName" res="records"
|
|
|
+ :url="'/blade-los/bcorps/selectList?corpTypeName=场站&addressId='+(form.addressId?form.addressId:'')" :filterable="true" :remote="true" dataName="cnName"
|
|
|
+ @selectChange="dicChange('stationCname', $event)" :disabled="editDisabled||!form.addressId"></dic-select>
|
|
|
+ </tempalte>
|
|
|
</avue-form>
|
|
|
</trade-card>
|
|
|
<trade-card title="箱型箱量">
|
|
|
@@ -127,14 +127,18 @@
|
|
|
<el-button type="danger" plain size="small" :disabled="editDisabled || selectionList.length == 0"
|
|
|
@click="allClick('批量删除')">批量删除</el-button>
|
|
|
<el-button type="primary" plain size="small" @click="allClick('起租')"
|
|
|
- :disabled="selectionList.length == 0">起租</el-button>
|
|
|
+ :disabled="form.buxStaus != '录入' || form.tradingBoxItemsList.length == 0">起租</el-button>
|
|
|
<el-button type="success" plain size="small" @click="allClick('生成租金')"
|
|
|
- :disabled="selectionList.length == 0">生成租金</el-button>
|
|
|
+ :disabled="form.buxStaus != '已启租'">生成租金</el-button>
|
|
|
+ <el-button type="danger" plain size="small" @click="allClick('撤销租金')"
|
|
|
+ :disabled="form.buxStaus != '已启租'">撤销租金</el-button>
|
|
|
<el-button type="warning" plain size="small" @click="allClick('退租')"
|
|
|
- :disabled="selectionList.length == 0">退租</el-button>
|
|
|
+ :disabled="form.buxStaus != '已启租'">退租</el-button>
|
|
|
+ <el-button type="danger" plain size="small" @click="allClick('撤销退租')"
|
|
|
+ :disabled="form.buxStaus != '已退租'">撤销退租</el-button>
|
|
|
<el-button type="success" size="small">导入</el-button>
|
|
|
<el-button type="info" size="small" @click="allClick('启用')"
|
|
|
- :disabled="selectionList.length == 0">启用</el-button>
|
|
|
+ :disabled="selectionList.length == 0 || form.buxStaus != '已启租'">启用</el-button>
|
|
|
<!-- <el-button type="primary" size="small" @click="allClick('卖箱')">卖箱</el-button> -->
|
|
|
<el-button size="small" style="margin-right: 8px" :disabled="!form.id || true"
|
|
|
@click="$refs.print.openDialog()">打印账单
|
|
|
@@ -169,7 +173,7 @@
|
|
|
</tempalte>
|
|
|
<tempalte slot="stationCnameForm" slot-scope="{ row }">
|
|
|
<dic-select v-if="row.$cellEdit" v-model="row.stationCname" placeholder="场站" key="id" label="cnName"
|
|
|
- res="records" url="/blade-los/blocations/list" :filterable="true" :remote="true" dataName="cnName"
|
|
|
+ res="records" url="/blade-los/bcorps/selectList?corpTypeName=场站" :filterable="true" :remote="true" dataName="cnName"
|
|
|
@selectChange="rowDicChange('stationCname', $event, row)"></dic-select>
|
|
|
<span v-else>{{ row.stationCname }}</span>
|
|
|
</tempalte>
|
|
|
@@ -354,7 +358,11 @@ import {
|
|
|
submitFeeList,
|
|
|
enable,
|
|
|
submitBoxList,
|
|
|
- boxRemove
|
|
|
+ boxRemove,
|
|
|
+ startingRent,
|
|
|
+ revokeRentingOut,
|
|
|
+ rentCalculation,
|
|
|
+ revokeRentCalculation
|
|
|
} from "@/api/boxManagement/buyContainer/index.js";
|
|
|
import dicSelect from "@/components/dicSelect/main";
|
|
|
import checkSchedule from "@/components/checkH/checkSchedule.vue";
|
|
|
@@ -534,7 +542,7 @@ export default {
|
|
|
}],
|
|
|
},
|
|
|
{
|
|
|
- label: '启用港',
|
|
|
+ label: '起用港',
|
|
|
prop: 'polCname',
|
|
|
span: 24,
|
|
|
rules: [{
|
|
|
@@ -668,16 +676,6 @@ export default {
|
|
|
}]
|
|
|
},
|
|
|
{
|
|
|
- label: '场站',
|
|
|
- prop: 'stationCname',
|
|
|
- disabled: false,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
label: '港口',
|
|
|
prop: 'addressCname',
|
|
|
disabled: false,
|
|
|
@@ -688,6 +686,11 @@ export default {
|
|
|
}]
|
|
|
},
|
|
|
{
|
|
|
+ label: '场站',
|
|
|
+ prop: 'stationCname',
|
|
|
+ disabled: false
|
|
|
+ },
|
|
|
+ {
|
|
|
label: '备注',
|
|
|
prop: 'remarks',
|
|
|
type: 'textarea',
|
|
|
@@ -1225,6 +1228,30 @@ export default {
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
+ label: "租金天数",
|
|
|
+ prop: "days",
|
|
|
+ width: "80",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "租金起始",
|
|
|
+ prop: "storageDate",
|
|
|
+ width: "100",
|
|
|
+ overHidden: true,
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "租金截止",
|
|
|
+ prop: "outboundDate",
|
|
|
+ width: "100",
|
|
|
+ overHidden: true,
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss"
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "制单人",
|
|
|
prop: "createUserName",
|
|
|
width: "100",
|
|
|
@@ -1258,6 +1285,7 @@ export default {
|
|
|
},
|
|
|
roleName: [],
|
|
|
updateSearchKey: new Date().getTime(),
|
|
|
+ updateFormKey: new Date().getTime(),
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
@@ -1366,23 +1394,20 @@ export default {
|
|
|
this.form.addressId = row.id
|
|
|
this.form.addressCode = row.code
|
|
|
this.form.addressEname = row.enName
|
|
|
+ this.form.stationId = null
|
|
|
+ this.form.stationCode = null
|
|
|
+ this.form.stationCname = null
|
|
|
+ this.form.stationEname = null
|
|
|
+ this.updateFormKey=new Date().getTime()
|
|
|
} else {
|
|
|
this.form.addressId = null
|
|
|
this.form.addressCode = null
|
|
|
this.form.addressEname = null
|
|
|
this.form.addressCname = null
|
|
|
- }
|
|
|
- }
|
|
|
- if (name == 'polStationCname') {
|
|
|
- if (row) {
|
|
|
- this.form.polStationId = row.id
|
|
|
- this.form.polStationCode = row.code
|
|
|
- this.form.polStationEname = row.enName
|
|
|
- } else {
|
|
|
- this.form.polStationId = null
|
|
|
- this.form.polStationCode = null
|
|
|
- this.form.polStationEname = null
|
|
|
- this.form.polStationCname = null
|
|
|
+ this.form.stationId = null
|
|
|
+ this.form.stationCode = null
|
|
|
+ this.form.stationCname = null
|
|
|
+ this.form.stationEname = null
|
|
|
}
|
|
|
}
|
|
|
if (name == 'stationCname') {
|
|
|
@@ -1390,19 +1415,23 @@ export default {
|
|
|
this.form.stationId = row.id
|
|
|
this.form.stationCode = row.code
|
|
|
this.form.stationEname = row.enName
|
|
|
- this.form.addressId = row.addressId
|
|
|
- this.form.addressCode = row.addressCode
|
|
|
- this.form.addressEname = row.addressEname
|
|
|
- this.form.addressCname = row.addressCname
|
|
|
} else {
|
|
|
this.form.stationId = null
|
|
|
this.form.stationCode = null
|
|
|
this.form.stationCname = null
|
|
|
this.form.stationEname = null
|
|
|
- this.form.addressId = null
|
|
|
- this.form.addressCode = null
|
|
|
- this.form.addressEname = null
|
|
|
- this.form.addressCname = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == 'polStationCname') {
|
|
|
+ if (row) {
|
|
|
+ this.form.polStationId = row.id
|
|
|
+ this.form.polStationCode = row.code
|
|
|
+ this.form.polStationEname = row.enName
|
|
|
+ } else {
|
|
|
+ this.form.polStationId = null
|
|
|
+ this.form.polStationCode = null
|
|
|
+ this.form.polStationEname = null
|
|
|
+ this.form.polStationCname = null
|
|
|
}
|
|
|
}
|
|
|
// if (name == 'podCname') {
|
|
|
@@ -1530,6 +1559,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if (name == 'restrictingShippingCompaniesName') {
|
|
|
+ console.log(row)
|
|
|
if (row) {
|
|
|
el.restrictingShippingCompaniesIds = row.ids
|
|
|
el.restrictingShippingCompaniesName = row.names
|
|
|
@@ -1658,6 +1688,7 @@ export default {
|
|
|
});
|
|
|
detail({ id: id }).then(res => {
|
|
|
this.form = res.data.data
|
|
|
+ this.updateFormKey=new Date().getTime()
|
|
|
// if (res.data.data.status != '录入') {
|
|
|
// this.editButton = true
|
|
|
// this.editDisabled = true
|
|
|
@@ -1814,7 +1845,7 @@ export default {
|
|
|
return this.$message.error("请添加数据");
|
|
|
}
|
|
|
for (let row of this.form.tradingBoxItemsList) {
|
|
|
- if (!row.code || !row.boxType || !row.boxBelongsTo || !row.boxCategory || !row.boxStatus || !row.boxCondition || !row.amount || !row.currency || !row.exrate || !row.stationCname || !row.restrictedPortsName || !row.restrictingShippingCompaniesName || !row.status) {
|
|
|
+ if (!row.code || !row.boxType || !row.boxBelongsTo || !row.boxCategory || !row.boxStatus || !row.boxCondition || !row.amount || !row.currency || !row.exrate || !row.stationCname || !row.status) {
|
|
|
this.$refs.crud.rowCell(row, row.$index)
|
|
|
return this.$message.error("请完善明细信息");
|
|
|
}
|
|
|
@@ -1882,30 +1913,223 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
if (name == '起租') {
|
|
|
- this.$confirm('是否起租?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
+ this.$DialogForm.show({
|
|
|
+ title: '起租',
|
|
|
+ width: '30%',
|
|
|
+ menuPosition: 'right',
|
|
|
+ option: {
|
|
|
+ submitText: '确定',
|
|
|
+ emptyText: '取消',
|
|
|
+ span: 24,
|
|
|
+ column: [{
|
|
|
+ label: "起租日期",
|
|
|
+ prop: "value",
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请选择起租日期",
|
|
|
+ trigger: "blur",
|
|
|
|
|
|
+ }],
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ beforeClose: (done) => {
|
|
|
+ done()
|
|
|
+ },
|
|
|
+ callback: (res) => {
|
|
|
+ res.done()
|
|
|
+ this.$confirm('是否起租?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ let obj = {
|
|
|
+ ...this.form,
|
|
|
+ rentType: 1,
|
|
|
+ rentDate: res.data.value
|
|
|
+ }
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ startingRent(obj).then(res => {
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ this.getDetail(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ res.close()
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
if (name == '生成租金') {
|
|
|
- this.$confirm('是否生成租金?', '提示', {
|
|
|
+ let _this=this
|
|
|
+ this.$DialogForm.show({
|
|
|
+ title: '生成租金',
|
|
|
+ width: '30%',
|
|
|
+ menuPosition: 'right',
|
|
|
+ option: {
|
|
|
+ submitText: '确定',
|
|
|
+ emptyText: '取消',
|
|
|
+ span: 24,
|
|
|
+ column: [{
|
|
|
+ label: "日期",
|
|
|
+ prop: "value",
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ pickerOptions: {
|
|
|
+ disabledDate(time) {
|
|
|
+ const date=new Date(_this.form.rentEndDate)
|
|
|
+ date.setDate(date.getDate() + 1);
|
|
|
+ return time.getTime() < date.getTime();
|
|
|
+ },
|
|
|
+ },
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请选择日期",
|
|
|
+ trigger: "blur",
|
|
|
+
|
|
|
+ }],
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ beforeClose: (done) => {
|
|
|
+ done()
|
|
|
+ },
|
|
|
+ callback: (res) => {
|
|
|
+ res.done()
|
|
|
+ this.$confirm('是否生成租金?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ let obj = {
|
|
|
+ ...this.form,
|
|
|
+ rentDate: res.data.value
|
|
|
+ }
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ rentCalculation(obj).then(res => {
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ this.getDetail(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ res.close()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (name == '撤销租金') {
|
|
|
+ this.$confirm('是否撤销租金?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
-
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ revokeRentCalculation(this.form).then(res => {
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ this.getDetail(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
})
|
|
|
}
|
|
|
if (name == '退租') {
|
|
|
- this.$confirm('是否退租?', '提示', {
|
|
|
+ let _this=this
|
|
|
+ this.$DialogForm.show({
|
|
|
+ title: '退租',
|
|
|
+ width: '30%',
|
|
|
+ menuPosition: 'right',
|
|
|
+ option: {
|
|
|
+ submitText: '确定',
|
|
|
+ emptyText: '取消',
|
|
|
+ span: 24,
|
|
|
+ column: [{
|
|
|
+ label: "退租日期",
|
|
|
+ prop: "value",
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ pickerOptions: {
|
|
|
+ disabledDate(time) {
|
|
|
+ const date=new Date(_this.form.rentEndDate)
|
|
|
+ date.setDate(date.getDate() + 1);
|
|
|
+ return time.getTime() < date.getTime();
|
|
|
+ },
|
|
|
+ },
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请选择退租起租日期",
|
|
|
+ trigger: "blur",
|
|
|
+
|
|
|
+ }],
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ beforeClose: (done) => {
|
|
|
+ done()
|
|
|
+ },
|
|
|
+ callback: (res) => {
|
|
|
+ res.done()
|
|
|
+ this.$confirm('是否退租?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ let obj = {
|
|
|
+ ...this.form,
|
|
|
+ rentType: 2,
|
|
|
+ rentDate: res.data.value
|
|
|
+ }
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ startingRent(obj).then(res => {
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ this.getDetail(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ res.close()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (name == '撤销退租') {
|
|
|
+ this.$confirm('是否撤销退租?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
-
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ revokeRentingOut(this.form).then(res => {
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ this.getDetail(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
})
|
|
|
}
|
|
|
if (name == '导入') {
|
|
|
@@ -1997,7 +2221,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
for (let row of this.form.tradingBoxItemsList) {
|
|
|
- if (!row.code || !row.boxType || !row.boxBelongsTo || !row.boxCategory || !row.boxStatus || !row.boxCondition || !row.amount || !row.currency || !row.exrate || !row.stationCname || !row.restrictedPortsName || !row.restrictingShippingCompaniesName || !row.status) {
|
|
|
+ if (!row.code || !row.boxType || !row.boxBelongsTo || !row.boxCategory || !row.boxStatus || !row.boxCondition || !row.amount || !row.currency || !row.exrate || !row.stationCname || !row.status) {
|
|
|
this.$refs.crud.rowCell(row, row.$index)
|
|
|
return this.$message.error("请完善明细信息");
|
|
|
}
|
|
|
@@ -2122,6 +2346,9 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+::v-deep .el-form-item__error {
|
|
|
+ display: none !important;
|
|
|
+}
|
|
|
::v-deep .el-form-item {
|
|
|
margin-bottom: 8px !important;
|
|
|
}
|