Browse Source

供应链--地点变更,系统管理--新增编辑部门

master
Zhao Qiqi 3 years ago
parent
commit
ea65cd8ddf
  1. 17
      anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouse.vue
  2. 32
      anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouseAdd.vue
  3. 2
      anrui-system-ui/src/api/system/departments/departments.js
  4. 58
      anrui-system-ui/src/views/organizationManage/organizationManage.vue

17
anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouse.vue

@ -28,7 +28,10 @@
<el-input v-model="queryParams.params.warehouseContract" placeholder="请输入负责人" clearable/>
</el-form-item>
<el-form-item label="分组">
<el-input v-model="queryParams.params.warehouseGroup" placeholder="请输入分组" clearable/>
<el-select v-model="queryParams.params.warehouseGroupKey" placeholder="请选择" clearable
class="addinputw">
<el-option v-for="item in warehouseGroup_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
@ -63,7 +66,7 @@
<el-table-column width="240px" prop="useOrg" label="使用组织" align="center"/>
<el-table-column prop="warehouseAttribute" label="详细地址" align="center"/>
<el-table-column width="200px" prop="warehouseContract" label="负责人及电话" align="center"/>
<el-table-column width="140px" prop="warehouseGroup" label="分组" align="center"/>
<el-table-column width="140px" prop="warehouseGroupValue" label="分组" align="center"/>
</el-table>
</div>
<!--End 项目列表-->
@ -99,6 +102,7 @@ import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import divAdd from './scmwarehouseAdd'
import divInfo from './scmwarehouseInfo'
import { typeValues } from '@/api/cheliang/dictcommons'
export default {
name: 'ScmWarehouseIndex',
@ -117,6 +121,7 @@ export default {
tableLoading: false,
dataList: [],
useOrg_list:[],
warehouseGroup_list:[],
useOrg: '', // 使
useOrgSid: '', // 使sid
queryParams: {
@ -170,6 +175,7 @@ export default {
// this.loadList()
this.getUseOrg()
this.getListOrgAll()
this.getType()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
@ -294,6 +300,13 @@ export default {
this.multipleSelection = val
console.log('点击数据', this.multipleSelection)
},
getType(){
typeValues({type:'locationGroup'}).then((res) => {
if (res.success){
this.warehouseGroup_list = res.data
}
})
},
// sid
getUseOrg() {
const userSid = window.sessionStorage.getItem('userSid')

32
anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouseAdd.vue

@ -56,8 +56,12 @@
<el-form-item><span slot="label"><span class="icon">*</span>分组</span></el-form-item>
</el-col>
<el-col :span="6" class="trightb">
<el-form-item prop="warehouseGroup">
<el-input v-model="formobj.warehouseGroup" placeholder="分组" class="addinputw" clearable/>
<el-form-item prop="warehouseGroupKey">
<el-select v-model="formobj.warehouseGroupKey" placeholder="请选择" @change="changeWarehouseGroup" clearable
class="addinputw">
<el-option v-for="item in warehouseGroup_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
<!-- <el-input v-model="formobj.warehouseGroup" placeholder="分组" class="addinputw" clearable/>-->
</el-form-item>
</el-col>
</el-row>
@ -80,6 +84,7 @@
<script>
import req from '@/api/anruiscm/scmwarehouse'
import { getUseOrgByUserSid } from '@/api/cheliang/basevehicle'
import { typeValues } from '@/api/cheliang/dictcommons'
export default {
name: 'ScmWarehouseAdd',
@ -107,6 +112,7 @@ export default {
},
orgOptions: [],
orgArr: [],
warehouseGroup_list:[],
formobj: {
id: '',
sid: '',
@ -117,7 +123,8 @@ export default {
warehouseAttribute: '', //
warehouseContract: '', //
warehouseContractSid: '', // sid
warehouseGroup: '' //
warehouseGroupValue:'',
warehouseGroupKey:''
},
rules: {
useOrg: [{ required: true, message: '使用组织不能为空', trigger: 'change' }], // 使
@ -127,7 +134,7 @@ export default {
warehouseAttribute: [{ required: true, message: '存放地点详细地址不能为空', trigger: 'blur' }], //
warehouseContract: [{ required: true, message: '存放地点负责人不能为空', trigger: 'blur' }], //
warehouseContractSid: [{ required: true, message: '存放地点负责人sid不能为空', trigger: 'blur' }], // sid
warehouseGroup: [{ required: true, message: '分组不能为空', trigger: 'blur' }] //
warehouseGroupKey: [{ required: true, message: '分组不能为空', trigger: 'blur' }] //
},
submitdisabled: false
}
@ -209,6 +216,21 @@ export default {
}
})
},
getType(){
typeValues({type:'locationGroup'}).then((res) => {
if (res.success){
this.warehouseGroup_list = res.data
}
})
},
changeWarehouseGroup(val){
if (val) {
const choosetItem = this.warehouseGroup_list.filter((item) => item.dictKey == val)
this.formobj.warehouseGroupValue = choosetItem[0].dictValue
console.log('name:', this.formobj.warehouseGroupValue, 'key:', this.formobj.warehouseGroupKey)
}
},
// //
// useOrgChange(e) {
// console.log('' + JSON.stringify(e))
@ -280,6 +302,7 @@ export default {
this.dialogStatus = 'add'
this.viewTitle = '【新增】存放地点'
this.getUseOrg()
this.getType()
},
showEdit(row) {
this.$nextTick(() => {
@ -306,6 +329,7 @@ export default {
this.formobj = row
})
this.getUseOrg()
this.getType()
},
saveAdd() {
const _this = this

2
anrui-system-ui/src/api/system/departments/departments.js

@ -39,7 +39,7 @@ export function postOrgtree(data) {
}
})
}
// 获取 机构分页列表
// 获取 机构分页列表(编辑部门信息)
export function putOrgtree(data) {
return request({
url: '/portal/v1/sysorganization/update/' + data.sid,

58
anrui-system-ui/src/views/organizationManage/organizationManage.vue

@ -52,16 +52,19 @@
<td>分管人员</td>
<td>
<el-autocomplete v-model="form.fgStaffName" :fetch-suggestions="querySearchAsync" class="addinputw"
placeholder="请选择" @select="handleSelect">
<i slot="suffix" class="el-icon-edit el-input__icon" @click="inputclear"/>
<template slot-scope="{ item }">
<div style="paddingg:5px;background-color:Azure;">
<span>品牌名称</span>
<span style="color:red">{{ item.name }}</span><br>
</div>
</template>
</el-autocomplete>
<el-select v-model="form.fgStaffSid" style="width:300px" filterable multiple>
<el-option v-for="(item,index) in staffdata2" :key="item.sid" :label="item.name" :value="item.sid"/>
</el-select>
<!-- <el-autocomplete v-model="form.fgStaffName" :fetch-suggestions="querySearchAsync" class="addinputw"-->
<!-- placeholder="请选择" @select="handleSelect">-->
<!-- <i slot="suffix" class="el-icon-edit el-input__icon" @click="inputclear"/>-->
<!-- <template slot-scope="{ item }">-->
<!-- <div style="paddingg:5px;background-color:Azure;">-->
<!-- <span>分管人员</span>-->
<!-- <span style="color:red">{{ item.name }}</span><br>-->
<!-- </div>-->
<!-- </template>-->
<!-- </el-autocomplete>-->
<!-- <el-select v-model="form.fgStaffSid" style="width:300px">-->
<!-- <el-option v-for="(item, i) in staffdata2" :key="i" :label="item.name" :value="item.sid">-->
<!-- </el-option>-->
@ -222,20 +225,9 @@
<td>分管人员</td>
<td>
<el-autocomplete v-model="form.fgStaffName" :fetch-suggestions="querySearchAsync" style="width:300px"
placeholder="请选择" @select="handleSelect">
<i slot="suffix" class="el-icon-edit el-input__icon" @click="inputclear"/>
<template slot-scope="{ item }">
<div style="paddingg:5px;background-color:Azure;">
<span>品牌名称</span>
<span style="color:red">{{ item.name }}</span><br>
</div>
</template>
</el-autocomplete>
<!-- <el-select v-model="form.fgStaffSid" style="width:300px" @change="fgStaffSidChange">-->
<!-- <el-option v-for="(item, i) in staffdata2" :key="i" :label="item.name" :value="item.sid">-->
<!-- </el-option>-->
<!-- </el-select>-->
<el-select v-model="form.fgStaffSid" style="width:300px" filterable multiple>
<el-option v-for="(item,index) in staffdata2" :key="item.sid" :label="item.name" :value="item.sid"/>
</el-select>
</td>
</tr>
<tr>
@ -384,6 +376,7 @@ export default {
})
},
save() {
this.form.fgStaffSid = this.form.fgStaffSid.join()
this.form.organizationSid = this.$store.getters.userInfo.orgSid
// this.form.dlxx = typeof(this.form.dlxx) == 'string' ? this.form.dlxx : this.form.dlxx.join()
if (this.form.sid) {
@ -422,15 +415,17 @@ export default {
this.getStaff2()
},
editRow(row) {
this.getStaff(row.sid)
this.getStaff2()
this.dialogTitle = '编辑'
this.isshow = 'edit'
selectBySid(row.sid).then((response) => {
if (response.success) {
this.form = response.data
this.form.fgStaffName = response.data.fgNames
this.form.fgStaffSid = response.data.fgSids
this.form.fgStaffSid = response.data.fgStaffSid.split(',')
this.form.zgStaffName = response.data.zgNames
this.form.zgStaffSid = response.data.zgSids
this.form.zgStaffSid = response.data.zgStaffSid
console.log('112233445566', this.form)
}
})
@ -450,10 +445,10 @@ export default {
// this.form.sort = row.sort
// this.form.zgStaffSid = row.zgSids
// this.form.fgStaffSid = row.fgSids
this.getStaff(row.sid)
this.getStaff2()
},
deit(data) { //
this.getStaff(data.sid)
this.getStaff2()
console.log(data, 8888)
this.dialogVisible = true
// this.form = Object.assign({}, data)
@ -467,11 +462,10 @@ export default {
this.form.linkPhone = data.linkPhone
this.form.sort = data.sort
this.form.zgStaffSid = data.zgSids
this.form.fgStaffSid = data.fgSids
this.getStaff(data.sid)
this.getStaff2()
this.form.fgStaffSid = data.fgSids.split(',')
},
nodeSave() { //
this.form.fgStaffSid = this.form.fgStaffSid.join()
postOrgtree(this.form).then(res => {
this.getOrgTree()
this.dialogVisible = false
@ -539,12 +533,12 @@ export default {
},
//
getStaff2() {
// let params = {}
getStaffName().then(res => {
this.staffdata2 = res.data
console.log('分管人员', this.staffdata2)
})
},
querySearchAsync(queryString, cb) {
console.log('查询条件:', queryString)
if (

Loading…
Cancel
Save