|
@@ -22,9 +22,9 @@
|
|
|
@on-load="onLoad"
|
|
|
@tree-load="treeLoad"
|
|
|
@resetColumn="
|
|
|
- resetColumnTwo('crud', 'option', 'optionList', 341)
|
|
|
+ resetColumnTwo('crud')
|
|
|
"
|
|
|
- @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 341)"
|
|
|
+ @saveColumn="saveColumnTwo('crud')"
|
|
|
>
|
|
|
<template slot="menuLeft">
|
|
|
<el-button
|
|
@@ -51,36 +51,6 @@
|
|
|
<el-tag>{{ row.deptCategoryName }}</el-tag>
|
|
|
</template>
|
|
|
|
|
|
- <template slot-scope="{ row }" slot="polCnNameForm">
|
|
|
- <search-query
|
|
|
- :datalist="polData"
|
|
|
- :selectValue="form.polCnName"
|
|
|
- :filterable="true"
|
|
|
- :clearable="true"
|
|
|
- :remote="true"
|
|
|
- :buttonIf="false"
|
|
|
- :forParameter="{
|
|
|
- key: 'id',
|
|
|
- label: 'cnName',
|
|
|
- value: 'cnName'
|
|
|
- }"
|
|
|
- @remoteMethod="polBportsListfun($event, 'polCnName')"
|
|
|
- @corpChange="corpChange($event, 'polCnName')"
|
|
|
- @corpFocus="polBportsListfun($event, 'polCnName')"
|
|
|
- >
|
|
|
- </search-query>
|
|
|
- </template>
|
|
|
- <template slot="regionForm">
|
|
|
- <avue-cascader
|
|
|
- :emit-path="true"
|
|
|
- showAllLevelss
|
|
|
- v-model="form.region"
|
|
|
- placeholder="请选择产品分类"
|
|
|
- :dic="regionList"
|
|
|
- :props="regionProps"
|
|
|
- @change="regionChange"
|
|
|
- ></avue-cascader>
|
|
|
- </template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
</div>
|
|
@@ -97,7 +67,6 @@ import {
|
|
|
} from "@/api/system/dept";
|
|
|
import {mapGetters} from "vuex";
|
|
|
import website from "@/config/website";
|
|
|
-import {getToken} from "@/util/auth";
|
|
|
|
|
|
export default {
|
|
|
components: {},
|
|
@@ -120,8 +89,7 @@ export default {
|
|
|
value: "name"
|
|
|
},
|
|
|
regionList: [],
|
|
|
- option: {},
|
|
|
- optionList: {
|
|
|
+ option: {
|
|
|
lazy: true,
|
|
|
tip: false,
|
|
|
simplePage: true,
|
|
@@ -214,38 +182,13 @@ export default {
|
|
|
dataType: "number",
|
|
|
width: 120,
|
|
|
prop: "deptCategory",
|
|
|
- slot: true /*,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入机构类型",
|
|
|
- trigger: "blur"
|
|
|
- }]*/
|
|
|
- },
|
|
|
- {
|
|
|
- label: "积分余额",
|
|
|
- prop: "pointsBalance",
|
|
|
- disabled: true,
|
|
|
- hide: true, // 表格里是否可见
|
|
|
- addDisplay: false, //当前行数据在新增表单中是否可见
|
|
|
- editDisplay: false, //当前行数据在编辑表单中是否可见
|
|
|
- viewDisplay: false, // 当前行数据在查看表单中是否可见
|
|
|
- value: 0
|
|
|
- },
|
|
|
- {
|
|
|
- label: "装货港",
|
|
|
- prop: "polCnName",
|
|
|
- type: "select",
|
|
|
- formslot: true,
|
|
|
- disabled: true,
|
|
|
- hide: true, // 表格里是否可见
|
|
|
- addDisplay: false, //当前行数据在新增表单中是否可见
|
|
|
- editDisplay: false, //当前行数据在编辑表单中是否可见
|
|
|
- viewDisplay: false // 当前行数据在查看表单中是否可见
|
|
|
+ slot: true
|
|
|
},
|
|
|
{
|
|
|
label: "英文全称",
|
|
|
prop: "englishFullName",
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
+ hide: true
|
|
|
},
|
|
|
{
|
|
|
label: "联系电话",
|
|
@@ -258,75 +201,6 @@ export default {
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
- label: "所属区域",
|
|
|
- prop: "region",
|
|
|
- formslot: true,
|
|
|
- overHidden: true
|
|
|
- // dicData: [],
|
|
|
- // dataType: "string",
|
|
|
- // type: "cascader",
|
|
|
- // // type: "async-cascader", // 修改为 "async-cascader"
|
|
|
- // props: {
|
|
|
- // label: 'name',
|
|
|
- // value: 'name'
|
|
|
- // },
|
|
|
- // lazy: true,
|
|
|
- // filterable: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "fax",
|
|
|
- prop: "fax",
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "邮箱",
|
|
|
- prop: "email",
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "网站",
|
|
|
- prop: "website",
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "开户银行",
|
|
|
- prop: "bankOfDeposit",
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "银行地址",
|
|
|
- prop: "bankAddress",
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "开户银行美金",
|
|
|
- prop: "bankOfDepositUsd",
|
|
|
- width: "100",
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "银行地址美金",
|
|
|
- prop: "bankAddressUsd",
|
|
|
- width: "100",
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "人民币账号",
|
|
|
- prop: "rmbAccount",
|
|
|
- width: "100",
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "美金账号",
|
|
|
- prop: "usdAccount",
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "swift代码",
|
|
|
- prop: "swiftCode",
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
label: "logo",
|
|
|
prop: "logoUrl",
|
|
|
type: "upload",
|
|
@@ -344,12 +218,8 @@ export default {
|
|
|
prop: "sort",
|
|
|
type: "number",
|
|
|
align: "right",
|
|
|
- width: 60
|
|
|
- // rules: [{
|
|
|
- // required: true,
|
|
|
- // message: "请输入排序",
|
|
|
- // trigger: "blur"
|
|
|
- // }]
|
|
|
+ width: 60,
|
|
|
+ hide: true
|
|
|
},
|
|
|
{
|
|
|
label: "备注",
|
|
@@ -369,67 +239,6 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
|
- this.option = await this.getColumnData(
|
|
|
- this.getColumnName(341),
|
|
|
- this.optionList
|
|
|
- );
|
|
|
- // this.findObject(this.option.column, "region").dicData = JSON.parse(localStorage.getItem('areaTypeTree'))
|
|
|
- this.regionList = JSON.parse(localStorage.getItem("areaTypeTree"));
|
|
|
- // 判断是否是admin 权限
|
|
|
- let arr = localStorage.getItem("roleName").split(",");
|
|
|
- // 根据 企业好判断是否要显示 积分余额
|
|
|
- const content = JSON.parse(localStorage.getItem("saber-tenantId"))
|
|
|
- .content;
|
|
|
- this.$nextTick(() => {
|
|
|
- if (arr.indexOf("admin") != -1) {
|
|
|
- this.findObject(
|
|
|
- this.option.column,
|
|
|
- "pointsBalance"
|
|
|
- ).disabled = false;
|
|
|
- }
|
|
|
- this.findObject(this.option.column, "pointsBalance").hide = false;
|
|
|
- this.findObject(
|
|
|
- this.option.column,
|
|
|
- "pointsBalance"
|
|
|
- ).addDisplay = true;
|
|
|
- this.findObject(
|
|
|
- this.option.column,
|
|
|
- "pointsBalance"
|
|
|
- ).editDisplay = true;
|
|
|
- this.findObject(
|
|
|
- this.option.column,
|
|
|
- "pointsBalance"
|
|
|
- ).viewDisplay = true;
|
|
|
- });
|
|
|
- // if (content == 171757) {
|
|
|
- // this.$nextTick(()=>{
|
|
|
- // if (arr.indexOf('admin') != -1) {
|
|
|
- // this.findObject(this.option.column, "pointsBalance").disabled = false
|
|
|
- // }
|
|
|
- // this.findObject(this.option.column, "pointsBalance").hide = false
|
|
|
- // this.findObject(this.option.column, "pointsBalance").addDisplay = true
|
|
|
- // this.findObject(this.option.column, "pointsBalance").editDisplay = true
|
|
|
- // this.findObject(this.option.column, "pointsBalance").viewDisplay = true
|
|
|
- // })
|
|
|
- // }
|
|
|
- // 判断是否显示装货港
|
|
|
- if (localStorage.getItem("sysitemType") == 12) {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.findObject(this.option.column, "polCnName").hide = false;
|
|
|
- this.findObject(
|
|
|
- this.option.column,
|
|
|
- "polCnName"
|
|
|
- ).addDisplay = true;
|
|
|
- this.findObject(
|
|
|
- this.option.column,
|
|
|
- "polCnName"
|
|
|
- ).editDisplay = true;
|
|
|
- this.findObject(
|
|
|
- this.option.column,
|
|
|
- "polCnName"
|
|
|
- ).viewDisplay = true;
|
|
|
- });
|
|
|
- }
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(["userInfo", "permission"]),
|
|
@@ -450,21 +259,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- regionChange(value) {
|
|
|
- console.log(value, 404);
|
|
|
- },
|
|
|
- // 装货港回调数据
|
|
|
- corpChange(value, name) {
|
|
|
- for (let item of this.polData) {
|
|
|
- if (item.cnName == value) {
|
|
|
- this.form.polId = item.id;
|
|
|
- this.form.polCnName = item.cnName;
|
|
|
- this.form.polEnName = item.enName;
|
|
|
- this.form.polCode = item.code;
|
|
|
- this.form.polNamePrint = item.enName;
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
|
|
|
initData() {
|
|
|
getDeptTree().then(res => {
|
|
@@ -633,33 +427,161 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
//自定义列保存
|
|
|
- async saveColumnTwo(ref, option, optionBack, code) {
|
|
|
- /**
|
|
|
- * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
|
|
|
- * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
|
- * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
- */
|
|
|
- const inSave = await this.saveColumnData(
|
|
|
- this.getColumnName(code),
|
|
|
- this[option]
|
|
|
- );
|
|
|
- if (inSave) {
|
|
|
- this.$message.success("保存成功");
|
|
|
- //关闭窗口
|
|
|
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
- }
|
|
|
+ async saveColumnTwo(ref) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
},
|
|
|
//自定义列重置
|
|
|
- async resetColumnTwo(ref, option, optionBack, code) {
|
|
|
- this[option] = this[optionBack];
|
|
|
- const inSave = await this.delColumnData(
|
|
|
- this.getColumnName(code),
|
|
|
- this[optionBack]
|
|
|
- );
|
|
|
- if (inSave) {
|
|
|
- this.$message.success("重置成功");
|
|
|
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
+ async resetColumnTwo(ref) {
|
|
|
+ this.option = {
|
|
|
+ lazy: true,
|
|
|
+ tip: false,
|
|
|
+ simplePage: true,
|
|
|
+ searchShow: true,
|
|
|
+ searchMenuSpan: 6,
|
|
|
+ tree: true,
|
|
|
+ border: true,
|
|
|
+ index: true,
|
|
|
+ selection: true,
|
|
|
+ viewBtn: true,
|
|
|
+ menuWidth: 300,
|
|
|
+ dialogClickModal: false,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "机构名称",
|
|
|
+ prop: "deptName",
|
|
|
+ search: true,
|
|
|
+ width: "100",
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请输入机构名称",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "所属企业",
|
|
|
+ prop: "tenantId",
|
|
|
+ type: "tree",
|
|
|
+ dicUrl: "/api/blade-system/tenant/select",
|
|
|
+ addDisplay: false,
|
|
|
+ editDisplay: false,
|
|
|
+ viewDisplay: website.tenantMode,
|
|
|
+ span: 24,
|
|
|
+ props: {
|
|
|
+ label: "tenantName",
|
|
|
+ value: "tenantId"
|
|
|
+ },
|
|
|
+ hide: !website.tenantMode,
|
|
|
+ search: website.tenantMode,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请输入所属企业",
|
|
|
+ trigger: "click"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "机构全称",
|
|
|
+ prop: "fullName",
|
|
|
+ search: true,
|
|
|
+ overHidden: true,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请输入机构全称",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "上级机构",
|
|
|
+ prop: "parentId",
|
|
|
+ dicData: [],
|
|
|
+ type: "tree",
|
|
|
+ hide: true,
|
|
|
+ addDisabled: false,
|
|
|
+ props: {
|
|
|
+ label: "title"
|
|
|
+ },
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: false,
|
|
|
+ message: "请选择上级机构",
|
|
|
+ trigger: "click"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "机构类型",
|
|
|
+ type: "select",
|
|
|
+ dicUrl:
|
|
|
+ "/api/blade-system/dict/dictionary?code=org_category",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictKey"
|
|
|
+ },
|
|
|
+ dataType: "number",
|
|
|
+ width: 120,
|
|
|
+ prop: "deptCategory",
|
|
|
+ slot: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "英文全称",
|
|
|
+ prop: "englishFullName",
|
|
|
+ overHidden: true,
|
|
|
+ hide: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "联系电话",
|
|
|
+ prop: "tel",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "公司地址",
|
|
|
+ prop: "address",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "logo",
|
|
|
+ prop: "logoUrl",
|
|
|
+ type: "upload",
|
|
|
+ listType: "picture-img",
|
|
|
+ tip: "只能上传jpg/png/jpeg文件,且不超过2M",
|
|
|
+ action: "/api/blade-resource/oss/endpoint/put-file",
|
|
|
+ dataType: "string",
|
|
|
+ propsHttp: {
|
|
|
+ res: "data",
|
|
|
+ url: "link"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "排序",
|
|
|
+ prop: "sort",
|
|
|
+ type: "number",
|
|
|
+ align: "right",
|
|
|
+ width: 60,
|
|
|
+ hide: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "备注",
|
|
|
+ prop: "remark",
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: false,
|
|
|
+ message: "请输入备注",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ hide: true
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
}
|
|
|
}
|
|
|
};
|