|
@@ -13,9 +13,11 @@
|
|
|
</avue-text-ellipsis>
|
|
|
</template>
|
|
|
<template slot="cnName" slot-scope="scope">
|
|
|
- <avue-text-ellipsis :text="scope.row.cnName" :height="30" use-tooltip placement="top">
|
|
|
- <small slot="more">...</small>
|
|
|
- </avue-text-ellipsis>
|
|
|
+ <div style="color: #1e9fff;cursor: pointer;" @click.stop="rowViewfun(scope.row,scope.index)">
|
|
|
+ <avue-text-ellipsis :text="scope.row.cnName" :height="30" use-tooltip placement="top">
|
|
|
+ <small slot="more">...</small>
|
|
|
+ </avue-text-ellipsis>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<template slot="enName" slot-scope="scope">
|
|
|
<avue-text-ellipsis :text="scope.row.enName" :height="30" use-tooltip placement="top">
|
|
@@ -36,18 +38,32 @@
|
|
|
</el-button>
|
|
|
<el-button type="text" icon="el-icon-edit" size="small" @click.stop="rowEditfun(scope.row, scope.index)">编辑
|
|
|
</el-button>
|
|
|
- <el-button type="text" icon="el-icon-edit" size="small" @click.stop="rowDel(scope.row, scope.index)">删除
|
|
|
+ <el-button type="text" icon="el-icon-delete" size="small" @click.stop="rowDel(scope.row, scope.index)">删除
|
|
|
</el-button>
|
|
|
-
|
|
|
+ <el-button v-if="scope.row.status == 1" type="text" icon="el-icon-turn-off" style="color: #85e967" size="small"
|
|
|
+ @click.stop="statusfun(scope.row.id,0)">
|
|
|
+ 启用
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="scope.row.status == 0" type="text" icon="el-icon-turn-off" style="color: #e83c3a" size="small"
|
|
|
+ @click.stop="statusfun(scope.row.id,1)">
|
|
|
+ 停用
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
<template slot="remarks" slot-scope="scope">
|
|
|
<avue-text-ellipsis :text="scope.row.remarks" :height="30" use-tooltip placement="top">
|
|
|
<small slot="more">...</small>
|
|
|
</avue-text-ellipsis>
|
|
|
</template>
|
|
|
+ <template slot="carrierName" slot-scope="scope">
|
|
|
+ <avue-text-ellipsis :text="scope.row.carrierName" :height="30" use-tooltip placement="top">
|
|
|
+ <small slot="more">...</small>
|
|
|
+ </avue-text-ellipsis>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template slot="carrierNameForm">
|
|
|
- <search-query ref="SearchQuery" :datalist="corpData" title="船公司" :filterable="true" :clearable="true"
|
|
|
- :remote="true" :forParameter="{ key: 'id', label: 'cnName', value: 'id' }" @remoteMethod="getBcorpsListfun"
|
|
|
+ <search-query ref="SearchQuery" :disabled="extendedDisabled" :selectValue="form.carrierName"
|
|
|
+ :datalist="corpData" title="船公司" :filterable="true" :clearable="true"
|
|
|
+ :remote="true" :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }" @remoteMethod="getBcorpsListfun"
|
|
|
@corpChange="corpCorpChange">
|
|
|
<bcorps></bcorps>
|
|
|
</search-query>
|
|
@@ -95,7 +111,7 @@
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="dialogVisible = false; extendedDisabled = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="dialogVisible = false; extendedDisabled = false">确 定</el-button>
|
|
|
+ <el-button type="primary" @click="extendedDatafun">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
|
|
@@ -173,7 +189,8 @@ export default {
|
|
|
page: {
|
|
|
pageSize: 10,
|
|
|
currentPage: 1,
|
|
|
- total: 0
|
|
|
+ total: 0,
|
|
|
+ ageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
|
|
|
},
|
|
|
selectionList: [],
|
|
|
option: {
|
|
@@ -197,6 +214,7 @@ export default {
|
|
|
viewBtn: true,
|
|
|
selection: true,
|
|
|
dialogClickModal: false,
|
|
|
+ menuWidth:260,
|
|
|
column: [
|
|
|
{
|
|
|
label: "编码",
|
|
@@ -231,21 +249,21 @@ export default {
|
|
|
trigger: "blur"
|
|
|
}]
|
|
|
},
|
|
|
- {
|
|
|
- label: "船公司 Id",
|
|
|
- prop: "carrierId",
|
|
|
- hide: true,
|
|
|
- display: false,
|
|
|
- // rules: [{
|
|
|
- // required: true,
|
|
|
- // message: "请输入船公司 Id",
|
|
|
- // trigger: "blur"
|
|
|
- // }]
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // label: "船公司 Id",
|
|
|
+ // prop: "carrierId",
|
|
|
+ // hide: true,
|
|
|
+ // display: false,
|
|
|
+ // // rules: [{
|
|
|
+ // // required: true,
|
|
|
+ // // message: "请输入船公司 Id",
|
|
|
+ // // trigger: "blur"
|
|
|
+ // // }]
|
|
|
+ // },
|
|
|
{
|
|
|
label: "船公司名称",
|
|
|
prop: "carrierName",
|
|
|
- width: 100,
|
|
|
+ width: "180",
|
|
|
formslot: true,
|
|
|
// rules: [{
|
|
|
// required: true,
|
|
@@ -254,7 +272,7 @@ export default {
|
|
|
// }]
|
|
|
},
|
|
|
{
|
|
|
- label: "扩展数据",
|
|
|
+ label: "EDI CODE",
|
|
|
prop: "extendedDataArr",
|
|
|
formslot: true,
|
|
|
// rules: [{
|
|
@@ -264,12 +282,6 @@ export default {
|
|
|
// }]
|
|
|
},
|
|
|
{
|
|
|
- label: "版本",
|
|
|
- prop: "version",
|
|
|
- hide: true,
|
|
|
- display: false,
|
|
|
- },
|
|
|
- {
|
|
|
label: "状态",
|
|
|
prop: "status",
|
|
|
type: 'select',
|
|
@@ -288,29 +300,11 @@ export default {
|
|
|
display: false,
|
|
|
},
|
|
|
{
|
|
|
- label: "主键",
|
|
|
- prop: "id",
|
|
|
- hide: true,
|
|
|
- display: false,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "创建人 Id",
|
|
|
- prop: "createUser",
|
|
|
- hide: true,
|
|
|
- display: false,
|
|
|
- },
|
|
|
- {
|
|
|
label: "创建人",
|
|
|
prop: "createUserName",
|
|
|
display: false,
|
|
|
},
|
|
|
{
|
|
|
- label: "创建部门 Id",
|
|
|
- prop: "createDept",
|
|
|
- hide: true,
|
|
|
- display: false,
|
|
|
- },
|
|
|
- {
|
|
|
label: "创建部门",
|
|
|
prop: "createDeptName",
|
|
|
display: false,
|
|
@@ -318,13 +312,7 @@ export default {
|
|
|
{
|
|
|
label: "创建时间",
|
|
|
prop: "createTime",
|
|
|
- width: 160,
|
|
|
- display: false,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "修改人 Id",
|
|
|
- prop: "updateUser",
|
|
|
- hide: true,
|
|
|
+ width: "160",
|
|
|
display: false,
|
|
|
},
|
|
|
{
|
|
@@ -336,7 +324,7 @@ export default {
|
|
|
{
|
|
|
label: "修改时间",
|
|
|
prop: "updateTime",
|
|
|
- width: 160,
|
|
|
+ width: "160",
|
|
|
display: false,
|
|
|
},
|
|
|
{
|
|
@@ -376,6 +364,26 @@ export default {
|
|
|
this.getBcorpsListfun()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 禁用启用按钮
|
|
|
+ statusfun(id,status){
|
|
|
+ this.$confirm("确定将选择数据更改状态?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(()=>{
|
|
|
+ blinesDetail(id).then(res=>{
|
|
|
+ let obj = res.data.data;
|
|
|
+ obj.status = status
|
|
|
+ blinesSubmit(obj).then(()=>{
|
|
|
+ this.onLoad(this.page);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
// 导出
|
|
|
handleExport() {
|
|
|
var condition = ''
|
|
@@ -437,9 +445,9 @@ export default {
|
|
|
},
|
|
|
// 扩展数据添加
|
|
|
extendedDataAdd() {
|
|
|
- this.form.extendedDataArr.map(item => {
|
|
|
- item.edit = false
|
|
|
- })
|
|
|
+ // this.form.extendedDataArr.map(item => {
|
|
|
+ // item.edit = false
|
|
|
+ // })
|
|
|
this.form.extendedDataArr.push({
|
|
|
edit: true
|
|
|
})
|
|
@@ -453,6 +461,30 @@ export default {
|
|
|
extendedDataDelete(index, row) {
|
|
|
this.form.extendedDataArr.splice(index, 1)
|
|
|
},
|
|
|
+ // 扩展数据的确认
|
|
|
+ extendedDatafun(){
|
|
|
+ for(let item of this.form.extendedDataArr) {
|
|
|
+ if (!item.name) {
|
|
|
+ this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message: "请填写名称!"
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!item.value) {
|
|
|
+ this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message: "请填写键值!"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.dialogVisible = false;
|
|
|
+ this.extendedDisabled = false
|
|
|
+ this.form.extendedDataArr.map(item => {
|
|
|
+ item.edit = false
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
// 获取客户(船公司)数据
|
|
|
getBcorpsListfun(cnName) {
|
|
@@ -463,7 +495,7 @@ export default {
|
|
|
// 船公司选中的回调
|
|
|
corpCorpChange(value) {
|
|
|
for (let item of this.corpData) {
|
|
|
- if (item.id == value) {
|
|
|
+ if (item.cnName == value) {
|
|
|
this.$set(this.form, 'carrierId', item.id)
|
|
|
this.$set(this.form, 'carrierName', item.cnName)
|
|
|
}
|