|
|
@@ -17,6 +17,8 @@
|
|
|
@click="inEdit"
|
|
|
>编 辑
|
|
|
</el-button>
|
|
|
+ <el-button v-if="form.whetherEnable != '是'" type="info" size="small" @click="allClick('启用')">启用</el-button>
|
|
|
+ <el-button v-if="form.whetherEnable == '是'" type="danger" size="small" @click="allClick('撤销启用')">撤销启用</el-button>
|
|
|
<el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small" :disabled="isSaveBtn" @click="submit"
|
|
|
>保 存
|
|
|
</el-button>
|
|
|
@@ -155,7 +157,7 @@
|
|
|
key="id"
|
|
|
label="cnName"
|
|
|
res="records"
|
|
|
- url="/blade-los/bcntrtypes/list?current=1&size=100"
|
|
|
+ url="/blade-los/bcntrtypes/list?current=1&size=100"
|
|
|
:filterable="true"
|
|
|
:remote="true"
|
|
|
dataName="cnName"
|
|
|
@@ -202,6 +204,9 @@
|
|
|
:header-cell-class-name="headerClassName"
|
|
|
:row-style="{ height: '20px', padding: '0px' }"
|
|
|
:cell-style="{ height: '20px', padding: '0px' }"
|
|
|
+ :search.sync="query"
|
|
|
+ @search-change="searchChange"
|
|
|
+ @search-reset="searchReset"
|
|
|
@selection-change="selectionChange"
|
|
|
@select="selectHandle"
|
|
|
@row-update="rowUpdate"
|
|
|
@@ -209,7 +214,7 @@
|
|
|
@saveColumn="saveColumn('crud', 'option', 'optionBack', 475)"
|
|
|
>
|
|
|
<template slot="menuLeft">
|
|
|
- <el-button type="info" plain size="small" :disabled="editDisabled || !form.id" @click="allClick('一键保存')">一键保存</el-button>
|
|
|
+ <!-- <el-button type="info" plain size="small" :disabled="editDisabled || !form.id" @click="allClick('一键保存')">一键保存</el-button>
|
|
|
<el-button
|
|
|
type="info"
|
|
|
plain
|
|
|
@@ -217,17 +222,15 @@
|
|
|
:disabled="editDisabled || form.tradingBoxItemsList.length == 0"
|
|
|
@click="allClick('一键编辑')"
|
|
|
>一键编辑</el-button
|
|
|
- >
|
|
|
+ > -->
|
|
|
<el-button type="danger" plain size="small" :disabled="editDisabled || selectionList.length == 0" @click="allClick('批量删除')"
|
|
|
>批量删除</el-button
|
|
|
>
|
|
|
- <el-button type="success" size="small" @click="allClick('导入')" :disabled="!form.id">导入</el-button>
|
|
|
+ <!-- <el-button type="success" size="small" @click="allClick('导入')" :disabled="!form.id">导入</el-button> -->
|
|
|
<!-- <el-button type="info" size="small" @click="allClick('启用')"
|
|
|
:disabled="selectionList.length == 0">启用</el-button> -->
|
|
|
- <el-button v-if="form.whetherEnable != '是'" type="info" size="small" @click="allClick('启用')">启用</el-button>
|
|
|
- <el-button v-if="form.whetherEnable == '是'" type="danger" size="small" @click="allClick('撤销启用')">撤销启用</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()">打印报表 </el-button>
|
|
|
+ <!-- <el-button size="small" style="margin-right: 8px" :disabled="!form.id || true" @click="$refs.print.openDialog()">打印报表 </el-button> -->
|
|
|
<span style="margin: 0 20px;color:#67C23A;"> 金额本币合计:{{ CNYSUM }} </span>
|
|
|
<span style="margin: 0 20px;color:#F56C6C;"> 金额外币合计:{{ USDSUM }} </span>
|
|
|
</template>
|
|
|
@@ -263,7 +266,7 @@
|
|
|
key="id"
|
|
|
label="cnName"
|
|
|
res="records"
|
|
|
- url="/blade-los/bcntrtypes/list?current=1&size=100"
|
|
|
+ url="/blade-los/bcntrtypes/list?current=1&size=100"
|
|
|
:filterable="true"
|
|
|
:remote="true"
|
|
|
dataName="cnName"
|
|
|
@@ -719,6 +722,8 @@ export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
|
return {
|
|
|
+ searchStatus: false,
|
|
|
+ query: {},
|
|
|
CNYSUM: 0,
|
|
|
USDSUM: 0,
|
|
|
boxSelectionList: [],
|
|
|
@@ -1092,6 +1097,7 @@ export default {
|
|
|
menuWidth: 60,
|
|
|
searchMenuSpan: 18,
|
|
|
tip: false,
|
|
|
+ index:true,
|
|
|
border: true,
|
|
|
addBtn: false,
|
|
|
viewBtn: false,
|
|
|
@@ -1103,13 +1109,6 @@ export default {
|
|
|
menu: false,
|
|
|
column: [
|
|
|
{
|
|
|
- label: "index",
|
|
|
- prop: "index",
|
|
|
- width: "55",
|
|
|
- fixed: true,
|
|
|
- headerslot: true
|
|
|
- },
|
|
|
- {
|
|
|
label: "是否启用",
|
|
|
prop: "whetherEnable",
|
|
|
overHidden: true
|
|
|
@@ -1124,6 +1123,7 @@ export default {
|
|
|
label: "箱号",
|
|
|
prop: "code",
|
|
|
width: 140,
|
|
|
+ search: true,
|
|
|
cell: true,
|
|
|
slot: true,
|
|
|
formslot: true,
|
|
|
@@ -2159,6 +2159,24 @@ export default {
|
|
|
selectionChange(list) {
|
|
|
this.selectionList = list;
|
|
|
},
|
|
|
+ searchChange(params, done) {
|
|
|
+ done();
|
|
|
+ if (!this.form.id) {
|
|
|
+ return this.$message.error("请保存数据");
|
|
|
+ }
|
|
|
+ if (this.searchStatus) {
|
|
|
+ return this.$message.error("请清空数据再检索");
|
|
|
+ }
|
|
|
+ if (this.query.code) {
|
|
|
+ this.searchStatus = true;
|
|
|
+ let boxNums = this.query.code.split(" ");
|
|
|
+ this.form.tradingBoxItemsList = this.form.tradingBoxItemsList.filter(item => boxNums.includes(item.code));
|
|
|
+ }
|
|
|
+ },
|
|
|
+ searchReset() {
|
|
|
+ this.searchStatus = false;
|
|
|
+ this.getDetail(this.form.id);
|
|
|
+ },
|
|
|
boxSelectionChange(list) {
|
|
|
this.boxSelectionList = list;
|
|
|
},
|
|
|
@@ -2197,21 +2215,28 @@ export default {
|
|
|
this.optionForm.disabled = true;
|
|
|
}
|
|
|
});
|
|
|
- this.form = res.data.data;
|
|
|
- this.updateFormKey = new Date().getTime();
|
|
|
if (res.data.data.whetherEnable == "是") {
|
|
|
+ this.editDisabled = true;
|
|
|
this.optionForm.column.forEach(e => {
|
|
|
if (e.prop == "contractNo" || e.prop == "effectiveDate" || e.prop == "expiryDate" || e.prop == "containerNumber") {
|
|
|
e.disabled = true;
|
|
|
}
|
|
|
});
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ if (res.data.data.whetherEnable != "是") {
|
|
|
+ this.editDisabled = false;
|
|
|
this.optionForm.column.forEach(e => {
|
|
|
if (e.prop == "contractNo" || e.prop == "effectiveDate" || e.prop == "expiryDate" || e.prop == "containerNumber") {
|
|
|
e.disabled = false;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.updateFormKey = new Date().getTime();
|
|
|
+ if (this.query.code) {
|
|
|
+ this.searchStatus = false;
|
|
|
+ this.searchChange(this.query);
|
|
|
+ }
|
|
|
})
|
|
|
.finally(() => {
|
|
|
loading.close();
|
|
|
@@ -2479,11 +2504,6 @@ export default {
|
|
|
this.excelBox = true;
|
|
|
}
|
|
|
if (name == "启用") {
|
|
|
- for (let item of this.selectionList) {
|
|
|
- if (item.whetherEnable == "是") {
|
|
|
- return this.$message.error("请勿重复启用");
|
|
|
- }
|
|
|
- }
|
|
|
this.form.cyTextOne = this.form.cyText;
|
|
|
this.activationForm = {
|
|
|
containerNumber: null,
|