|
|
|
@ -380,6 +380,71 @@
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
:title="formMap[formName]"
|
|
|
|
|
append-to-body
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
:visible.sync="subFormVisible"
|
|
|
|
|
width="60%"
|
|
|
|
|
top="5vh"
|
|
|
|
|
>
|
|
|
|
|
<el-form :model="subData" ref="dataForm" label-width="80px">
|
|
|
|
|
<el-row :gutter="20" class="el-row" type="flex">
|
|
|
|
|
<el-col :span="12" class="el-col">
|
|
|
|
|
<el-form-item label="上级菜单" prop="parentCode">
|
|
|
|
|
<el-select v-model="subData.parentCode" placeholder="选择上级菜单"
|
|
|
|
|
style="width: 80%"
|
|
|
|
|
clearable
|
|
|
|
|
disabled
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in fromDeptOptions"
|
|
|
|
|
:key="item.parentCode"
|
|
|
|
|
:label="item.parentName"
|
|
|
|
|
:value="item.parentCode">
|
|
|
|
|
<span style="float: left">{{ item.parentName }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12" class="el-col">
|
|
|
|
|
<el-form-item label="名称" prop="name" class="query-form-item">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="subData.name" style="width: 80%"
|
|
|
|
|
placeholder="请输入名称"
|
|
|
|
|
auto-complete="off"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row class="el-row" type="flex">
|
|
|
|
|
<el-col class="el-col">
|
|
|
|
|
<el-form-item label="备注:" prop="remark" class="query-form-item">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="subData.remark"
|
|
|
|
|
type="textarea"
|
|
|
|
|
style="width: 90%"
|
|
|
|
|
auto-complete="off"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click.native="subFormVisible = false">取消</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
@click.native="forInvSubmit()"
|
|
|
|
|
:loading="subLoading"
|
|
|
|
|
>提交
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -392,7 +457,7 @@ import {
|
|
|
|
|
createWorkplaceId, printWorkLabel,getUsers
|
|
|
|
|
} from '@/api/basic/sysWorkplaceManage'
|
|
|
|
|
import { getInvListByUser } from '@/api/system/invWarehouse'
|
|
|
|
|
import { getTree } from '@/api/basic/collectPoint/collectPointManage'
|
|
|
|
|
import { addTree, deleteTree, getTree } from '@/api/basic/collectPoint/collectPointManage'
|
|
|
|
|
import { getCollectBusType } from '@/api/basic/collectPoint/gatherOrderType'
|
|
|
|
|
import panelGroup from '@/views/dashboard/PanelGroup'
|
|
|
|
|
import { delUserBindWork, getUserBindWork } from '@/api/basic/collectPoint/userWorkplace'
|
|
|
|
@ -461,7 +526,14 @@ export default {
|
|
|
|
|
userList: [],
|
|
|
|
|
userLoading: false,
|
|
|
|
|
rowData: null,
|
|
|
|
|
userQuery: {}
|
|
|
|
|
userQuery: {},
|
|
|
|
|
formName: 'add',
|
|
|
|
|
formMap: {
|
|
|
|
|
add: "新增",
|
|
|
|
|
edit: "编辑"
|
|
|
|
|
},
|
|
|
|
|
subFormVisible: false,
|
|
|
|
|
subData: {},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
@ -715,7 +787,45 @@ export default {
|
|
|
|
|
this.query.code = null
|
|
|
|
|
}
|
|
|
|
|
this.getList()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
append(data, formName) {//新增 编辑
|
|
|
|
|
this.formName = formName;
|
|
|
|
|
if (formName === "edit") {
|
|
|
|
|
this.subData = JSON.parse(JSON.stringify(data));
|
|
|
|
|
this.subData.name = JSON.parse(JSON.stringify(data.label));
|
|
|
|
|
} else if (formName === "add") {
|
|
|
|
|
this.subData = {
|
|
|
|
|
parentCode: JSON.parse(JSON.stringify(data)).code
|
|
|
|
|
};
|
|
|
|
|
let parentData = {
|
|
|
|
|
parentCode: JSON.parse(JSON.stringify(data)).code,
|
|
|
|
|
parentName: JSON.parse(JSON.stringify(data.label))
|
|
|
|
|
}
|
|
|
|
|
this.fromDeptOptions.push(parentData)
|
|
|
|
|
}
|
|
|
|
|
this.subFormVisible = true;
|
|
|
|
|
},
|
|
|
|
|
delTree(row){
|
|
|
|
|
deleteTree(row).then(res => {
|
|
|
|
|
if (res.code == 20000){
|
|
|
|
|
this.$message.success("删除成功")
|
|
|
|
|
this.getLstTree()
|
|
|
|
|
}else {
|
|
|
|
|
this.$message.error("删除失败")
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
forInvSubmit(){
|
|
|
|
|
addTree(this.subData).then(res => {
|
|
|
|
|
if (res.code == 20000){
|
|
|
|
|
this.subFormVisible = false
|
|
|
|
|
this.getLstTree()
|
|
|
|
|
this.$message.success("成功")
|
|
|
|
|
}else {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getList()
|
|
|
|
|