Browse Source

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

zhanglei
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-input v-model="queryParams.params.warehouseContract" placeholder="请输入负责人" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="分组"> <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-item>
</el-form> </el-form>
<div class="btn" style="text-align: center;"> <div class="btn" style="text-align: center;">
@ -63,7 +66,7 @@
<el-table-column width="240px" prop="useOrg" label="使用组织" align="center"/> <el-table-column width="240px" prop="useOrg" label="使用组织" align="center"/>
<el-table-column prop="warehouseAttribute" 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="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> </el-table>
</div> </div>
<!--End 项目列表--> <!--End 项目列表-->
@ -99,6 +102,7 @@ import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import divAdd from './scmwarehouseAdd' import divAdd from './scmwarehouseAdd'
import divInfo from './scmwarehouseInfo' import divInfo from './scmwarehouseInfo'
import { typeValues } from '@/api/cheliang/dictcommons'
export default { export default {
name: 'ScmWarehouseIndex', name: 'ScmWarehouseIndex',
@ -117,6 +121,7 @@ export default {
tableLoading: false, tableLoading: false,
dataList: [], dataList: [],
useOrg_list:[], useOrg_list:[],
warehouseGroup_list:[],
useOrg: '', // 使 useOrg: '', // 使
useOrgSid: '', // 使sid useOrgSid: '', // 使sid
queryParams: { queryParams: {
@ -170,6 +175,7 @@ export default {
// this.loadList() // this.loadList()
this.getUseOrg() this.getUseOrg()
this.getListOrgAll() this.getListOrgAll()
this.getType()
}, },
mounted() { mounted() {
this.$refs['btnbar'].setButtonList(this.btnList) this.$refs['btnbar'].setButtonList(this.btnList)
@ -294,6 +300,13 @@ export default {
this.multipleSelection = val this.multipleSelection = val
console.log('点击数据', this.multipleSelection) console.log('点击数据', this.multipleSelection)
}, },
getType(){
typeValues({type:'locationGroup'}).then((res) => {
if (res.success){
this.warehouseGroup_list = res.data
}
})
},
// sid // sid
getUseOrg() { getUseOrg() {
const userSid = window.sessionStorage.getItem('userSid') 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-form-item><span slot="label"><span class="icon">*</span>分组</span></el-form-item>
</el-col> </el-col>
<el-col :span="6" class="trightb"> <el-col :span="6" class="trightb">
<el-form-item prop="warehouseGroup"> <el-form-item prop="warehouseGroupKey">
<el-input v-model="formobj.warehouseGroup" placeholder="分组" class="addinputw" clearable/> <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-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -80,6 +84,7 @@
<script> <script>
import req from '@/api/anruiscm/scmwarehouse' import req from '@/api/anruiscm/scmwarehouse'
import { getUseOrgByUserSid } from '@/api/cheliang/basevehicle' import { getUseOrgByUserSid } from '@/api/cheliang/basevehicle'
import { typeValues } from '@/api/cheliang/dictcommons'
export default { export default {
name: 'ScmWarehouseAdd', name: 'ScmWarehouseAdd',
@ -107,6 +112,7 @@ export default {
}, },
orgOptions: [], orgOptions: [],
orgArr: [], orgArr: [],
warehouseGroup_list:[],
formobj: { formobj: {
id: '', id: '',
sid: '', sid: '',
@ -117,7 +123,8 @@ export default {
warehouseAttribute: '', // warehouseAttribute: '', //
warehouseContract: '', // warehouseContract: '', //
warehouseContractSid: '', // sid warehouseContractSid: '', // sid
warehouseGroup: '' // warehouseGroupValue:'',
warehouseGroupKey:''
}, },
rules: { rules: {
useOrg: [{ required: true, message: '使用组织不能为空', trigger: 'change' }], // 使 useOrg: [{ required: true, message: '使用组织不能为空', trigger: 'change' }], // 使
@ -127,7 +134,7 @@ export default {
warehouseAttribute: [{ required: true, message: '存放地点详细地址不能为空', trigger: 'blur' }], // warehouseAttribute: [{ required: true, message: '存放地点详细地址不能为空', trigger: 'blur' }], //
warehouseContract: [{ required: true, message: '存放地点负责人不能为空', trigger: 'blur' }], // warehouseContract: [{ required: true, message: '存放地点负责人不能为空', trigger: 'blur' }], //
warehouseContractSid: [{ required: true, message: '存放地点负责人sid不能为空', trigger: 'blur' }], // sid warehouseContractSid: [{ required: true, message: '存放地点负责人sid不能为空', trigger: 'blur' }], // sid
warehouseGroup: [{ required: true, message: '分组不能为空', trigger: 'blur' }] // warehouseGroupKey: [{ required: true, message: '分组不能为空', trigger: 'blur' }] //
}, },
submitdisabled: false 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) { // useOrgChange(e) {
// console.log('' + JSON.stringify(e)) // console.log('' + JSON.stringify(e))
@ -280,6 +302,7 @@ export default {
this.dialogStatus = 'add' this.dialogStatus = 'add'
this.viewTitle = '【新增】存放地点' this.viewTitle = '【新增】存放地点'
this.getUseOrg() this.getUseOrg()
this.getType()
}, },
showEdit(row) { showEdit(row) {
this.$nextTick(() => { this.$nextTick(() => {
@ -306,6 +329,7 @@ export default {
this.formobj = row this.formobj = row
}) })
this.getUseOrg() this.getUseOrg()
this.getType()
}, },
saveAdd() { saveAdd() {
const _this = this 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) { export function putOrgtree(data) {
return request({ return request({
url: '/portal/v1/sysorganization/update/' + data.sid, url: '/portal/v1/sysorganization/update/' + data.sid,

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

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

Loading…
Cancel
Save