|
|
@@ -23,6 +23,12 @@ |
|
|
|
<el-switch v-model="item.scope.row.isCheck" :active-value="1" :inactive-value="0" active-color="#13ce66" |
|
|
|
inactive-color="#ff4949" @click="handleBeforeChange1(item.scope.row.isCheck, item.scope.row)"></el-switch> |
|
|
|
</template> |
|
|
|
<template #parentIdSlot> |
|
|
|
<el-select v-model="crudRef.form.parentId" placeholder="请选择上级仓库"> |
|
|
|
<el-option v-for="it in upperWarehouseIdList.filter(it => it.value !== crudRef.form.id)" :key="it.value" :value="it.value" :label="it.label"/> |
|
|
|
<!-- <el-option><span>{{addForm.id}}</span></el-option>--> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</crud-template> |
|
|
|
<el-dialog title="详情" v-model="dialogVisible"> |
|
|
|
<el-descriptions direction="vertical" :column="3" border> |
|
|
@@ -60,7 +66,155 @@ const allHallList = ref([]) |
|
|
|
const upperWarehouseIdList = ref([]) |
|
|
|
const info = ref({}) |
|
|
|
const dialogVisible = ref(false) |
|
|
|
const field = ref(getZxqdFindConfig(route, agencyIdList, branchIdList, upperWarehouseIdList,hallList,allHallList)); |
|
|
|
// const field = ref(getZxqdFindConfig(route, agencyIdList, branchIdList, upperWarehouseIdList,hallList,allHallList)); |
|
|
|
let formLabelWidth = '150px'; |
|
|
|
const field = ref({ |
|
|
|
tabSize: "small", //Table 的尺寸 large / default /small (默认default) |
|
|
|
searchShow: true, //是否显示搜索模块(默认false) IsPermission(route, 'QUERY_BASE') |
|
|
|
border: true, //是否添加边框(默认false) |
|
|
|
dialogCustom: false, //自定义Dialog (默认false) |
|
|
|
dialogFooter: false, //隐藏弹窗页脚显示 (默认false) |
|
|
|
dialogWidth: "40%", //dialog宽度 (默认40%) |
|
|
|
dialogInfoWidth: "60%", |
|
|
|
crudShow: true, //是否显示CURD操作栏 (默认true) |
|
|
|
crudChildShow: true, //是否显示CURD子操作栏 (默认true) |
|
|
|
paginStart: true, //是否显示分页查询 (默认false) |
|
|
|
dataListLoading: false, |
|
|
|
paging: { |
|
|
|
pageSize: 10, |
|
|
|
currentPage: 1, |
|
|
|
total: 0 |
|
|
|
}, |
|
|
|
crud: { |
|
|
|
add: true, |
|
|
|
edit: false, |
|
|
|
delete: false, |
|
|
|
derive: false, |
|
|
|
search: false, |
|
|
|
refresh: false, |
|
|
|
}, |
|
|
|
searchOperation: { |
|
|
|
isDownload: false, |
|
|
|
isAdd: false, |
|
|
|
isTransferMachine: false, |
|
|
|
}, |
|
|
|
tableSize: -1, |
|
|
|
operateShow: true, //是否为表格添加操作栏(默认true) |
|
|
|
operateTitle: "操作", //操作栏标题(默认为"") |
|
|
|
operateFixed: true, //操作栏是否固定(默认false) |
|
|
|
operateWidth: "140", //操作栏宽度 |
|
|
|
operate: { |
|
|
|
edit: false, //是否编辑(默认true) IsPermission(route, 'EDIT_LIST') |
|
|
|
info: false, //是否编辑(默认true) IsPermission(route, 'INFO_LIST') |
|
|
|
delete: false, //是否删除(默认true) IsPermission(route, 'DEL_LIST') |
|
|
|
announcement: false, // 公告 |
|
|
|
remark: false, // 详情 |
|
|
|
forbidden: false, // 禁用 |
|
|
|
enable: false, // 启用 |
|
|
|
authorization: false, // 授权 |
|
|
|
cancel: false, // 取消订单 |
|
|
|
writeOff: false, // 注销 |
|
|
|
make: false, // 补缴 |
|
|
|
}, |
|
|
|
extend: [ |
|
|
|
{ |
|
|
|
label: "序号", |
|
|
|
type: "index", //类型:selection,index,expand |
|
|
|
width: "50", //表头宽度 |
|
|
|
}, |
|
|
|
], |
|
|
|
field: [ |
|
|
|
{ |
|
|
|
prop: "agencyId", |
|
|
|
label: "渠道", |
|
|
|
form: { |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
type: 'select', |
|
|
|
required: true, |
|
|
|
listData: agencyIdList |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
prop: "channelId", |
|
|
|
label: "网点", |
|
|
|
listData: allHallList, |
|
|
|
form: { |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
type: 'select', |
|
|
|
required: false, |
|
|
|
listData: hallList |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
prop: "code", |
|
|
|
label: "仓库编号", |
|
|
|
width: "160", |
|
|
|
}, |
|
|
|
{ |
|
|
|
prop: "name", |
|
|
|
label: "仓库名称", |
|
|
|
form: { |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
disabled: false |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
prop: "warehouseLevel", |
|
|
|
label: "仓库等级", |
|
|
|
width: "80" |
|
|
|
}, |
|
|
|
{ |
|
|
|
prop: "parentId", |
|
|
|
label: "上级仓库", |
|
|
|
hide: true, |
|
|
|
form: { |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
// type: 'select', |
|
|
|
required: true, |
|
|
|
// listData: upperWarehouseIdList, |
|
|
|
slotSetEdit: true, // 是否启用编辑插槽 |
|
|
|
slotSetNameEdit: 'parentIdSlot', // 编辑插槽名 |
|
|
|
} |
|
|
|
}, { |
|
|
|
prop: "parentCode", |
|
|
|
label: "上级仓库编号", |
|
|
|
width: "160" |
|
|
|
}, |
|
|
|
{ |
|
|
|
prop: "parentName", |
|
|
|
label: "上级仓库名称" |
|
|
|
}, { |
|
|
|
prop: "insertTime", |
|
|
|
label: "创建时间", |
|
|
|
width: "140", |
|
|
|
}, |
|
|
|
{ |
|
|
|
prop: "isCheck", |
|
|
|
label: "库存校验", |
|
|
|
width: "80", |
|
|
|
slotSet: true, |
|
|
|
slotSetName: 'isCheck', |
|
|
|
form: { |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
hide: true, |
|
|
|
type: 'select', |
|
|
|
required: true, |
|
|
|
listData: [ |
|
|
|
{ |
|
|
|
label: '否', |
|
|
|
value: '0', |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '是', |
|
|
|
value: '1', |
|
|
|
}, |
|
|
|
], |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}) |
|
|
|
onMounted(() => { |
|
|
|
getList() |
|
|
|
getAgenCy() |
|
|
@@ -121,13 +275,10 @@ function getUpperWarehouseIdList() { |
|
|
|
"type": "8" |
|
|
|
}).then((res: any) => { |
|
|
|
if (res && res.statusCode === 0) { |
|
|
|
//数据转换 .agencyQueryAllModels |
|
|
|
let bizContent = res.data.idNames |
|
|
|
upperWarehouseIdList.value = bizContent.map((item) => { |
|
|
|
return { label: item.name, value: item.id } |
|
|
|
}) |
|
|
|
} else { |
|
|
|
ElMessage.error(res.message) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
@@ -153,12 +304,18 @@ function toEdit(row) { |
|
|
|
crudRef.value.dialogFormVisible = true |
|
|
|
crudRef.value.title = '编辑' |
|
|
|
itemStartValue.value = 2 |
|
|
|
crudRef.value.form={ |
|
|
|
...data |
|
|
|
} |
|
|
|
nextTick(() => { |
|
|
|
crudRef.value.form={ |
|
|
|
...data |
|
|
|
} |
|
|
|
|
|
|
|
customSelectorSelection(row.agencyId, 'agencyId',null, null, null) |
|
|
|
// upperWarehouseIdList.value = upperWarehouseIdList.value.filter(item => item.value !== row.id) |
|
|
|
}) |
|
|
|
// console.log("==>",row.id) |
|
|
|
// console.log("==>",upperWarehouseIdList.value) |
|
|
|
// console.log("==>field.value",field.value) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//详情 |