部门管理
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
"bpmn-js-properties-panel": "^0.33.0",
|
"bpmn-js-properties-panel": "^0.33.0",
|
||||||
"camunda-bpmn-moddle": "^4.3.0",
|
"camunda-bpmn-moddle": "^4.3.0",
|
||||||
"echarts": "^5.4.2",
|
"echarts": "^5.4.2",
|
||||||
"element-ui": "2.8.2",
|
"element-ui": "^2.15.14",
|
||||||
"gulp": "4.0.2",
|
"gulp": "4.0.2",
|
||||||
"gulp-concat": "2.6.1",
|
"gulp-concat": "2.6.1",
|
||||||
"gulp-load-plugins": "2.0.5",
|
"gulp-load-plugins": "2.0.5",
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
"babel-preset-stage-2": "6.22.0",
|
"babel-preset-stage-2": "6.22.0",
|
||||||
"babel-register": "6.22.0",
|
"babel-register": "6.22.0",
|
||||||
"chalk": "2.3.0",
|
"chalk": "2.3.0",
|
||||||
"chromedriver": "2.27.2",
|
"chromedriver": "^2.27.2",
|
||||||
"copy-webpack-plugin": "4.0.1",
|
"copy-webpack-plugin": "4.0.1",
|
||||||
"cross-spawn": "5.0.1",
|
"cross-spawn": "5.0.1",
|
||||||
"css-loader": "0.28.0",
|
"css-loader": "0.28.0",
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ import App from '@/App'
|
|||||||
import router from '@/router' // api: https://github.com/vuejs/vue-router
|
import router from '@/router' // api: https://github.com/vuejs/vue-router
|
||||||
import store from '@/store' // api: https://github.com/vuejs/vuex
|
import store from '@/store' // api: https://github.com/vuejs/vuex
|
||||||
import VueCookie from 'vue-cookie' // api: https://github.com/alfhen/vue-cookie
|
import VueCookie from 'vue-cookie' // api: https://github.com/alfhen/vue-cookie
|
||||||
import '@/element-ui' // api: https://github.com/ElemeFE/element
|
import ElementUI from 'element-ui'
|
||||||
import '@/icons' // api: http://www.iconfont.cn/
|
import '@/icons' // api: http://www.iconfont.cn/
|
||||||
import '@/element-ui-theme'
|
import 'element-ui/lib/theme-chalk/index.css'
|
||||||
import '@/assets/scss/index.scss'
|
import '@/assets/scss/index.scss'
|
||||||
import httpRequest from '@/utils/httpRequest' // api: https://github.com/axios/axios
|
import httpRequest from '@/utils/httpRequest' // api: https://github.com/axios/axios
|
||||||
import { isAuth } from '@/utils'
|
import { isAuth } from '@/utils'
|
||||||
@@ -23,6 +23,7 @@ import './style/bpmn-custom-color.css' // 导入自定义的样式文件
|
|||||||
|
|
||||||
Vue.prototype.$echarts = echarts;
|
Vue.prototype.$echarts = echarts;
|
||||||
Vue.use(VueCookie)
|
Vue.use(VueCookie)
|
||||||
|
Vue.use(ElementUI)
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
// 非生产环境, 适配mockjs模拟数据 // api: https://github.com/nuysoft/Mock
|
// 非生产环境, 适配mockjs模拟数据 // api: https://github.com/nuysoft/Mock
|
||||||
|
|||||||
@@ -101,6 +101,8 @@ export default {
|
|||||||
marker: null,
|
marker: null,
|
||||||
keyword: "",
|
keyword: "",
|
||||||
local: null,
|
local: null,
|
||||||
|
dataListLoading: false,
|
||||||
|
dataListSelections: [],
|
||||||
dataList:[]
|
dataList:[]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -115,6 +117,10 @@ export default {
|
|||||||
this.dataList = data.notices
|
this.dataList = data.notices
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
// 多选
|
||||||
|
selectionChangeHandle (val) {
|
||||||
|
this.dataListSelections = val
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
|
|||||||
@@ -98,8 +98,8 @@
|
|||||||
width="150"
|
width="150"
|
||||||
label="操作">
|
label="操作">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="assignHandle(scope.row.id)">模板生成</el-button>
|
<el-button type="text" size="small" @click="addTempHandle(scope.row.id)">模板生成</el-button>
|
||||||
<el-button type="text" size="small">上传附近</el-button>
|
<el-button type="text" size="small">上传附件</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -114,14 +114,17 @@
|
|||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
|
<temp-add v-if="tempVisible" ref="tempAdd"></temp-add>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AddOrUpdate from './contract-add-or-update'
|
import AddOrUpdate from './contract-add-or-update'
|
||||||
|
import TempAdd from './temp-add'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
AddOrUpdate
|
AddOrUpdate,
|
||||||
|
TempAdd
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -136,7 +139,8 @@ export default {
|
|||||||
totalPage: 0,
|
totalPage: 0,
|
||||||
dataListLoading: false,
|
dataListLoading: false,
|
||||||
dataListSelections: [],
|
dataListSelections: [],
|
||||||
addOrUpdateVisible: false
|
addOrUpdateVisible: false,
|
||||||
|
tempVisible: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
activated () {
|
activated () {
|
||||||
@@ -187,7 +191,13 @@ export default {
|
|||||||
this.$refs.addOrUpdate.init(id)
|
this.$refs.addOrUpdate.init(id)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
assignHandle (id) {}
|
// 生成模板
|
||||||
|
addTempHandle (id) {
|
||||||
|
this.tempVisible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.tempAdd.init(id)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
117
base-vue/src/views/modules/contract/temp-add.vue
Normal file
117
base-vue/src/views/modules/contract/temp-add.vue
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="产品供应合同"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="visible">
|
||||||
|
<section class="content">
|
||||||
|
<el-descriptions :column="2">
|
||||||
|
<el-descriptions-item label="需方">kooriookami</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合同编号">18100000000</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="供方">上海诺力智能科技有限公司</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="签订时间">2025年1月14日</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<h2>一、产品明细单</h2>
|
||||||
|
<el-table
|
||||||
|
:data="dataList"
|
||||||
|
border
|
||||||
|
style="width: 100%;">
|
||||||
|
<el-table-column
|
||||||
|
type="index"
|
||||||
|
width="50"/>
|
||||||
|
<el-table-column
|
||||||
|
prop="materialCode"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="物料编号"/>
|
||||||
|
<el-table-column
|
||||||
|
prop="materialName"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="物料名称"/>
|
||||||
|
<el-table-column
|
||||||
|
prop="materialName"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="型号"/>
|
||||||
|
<el-table-column
|
||||||
|
prop="materialName"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="数量"/>
|
||||||
|
<el-table-column
|
||||||
|
prop="materialName"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="单位"/>
|
||||||
|
<el-table-column
|
||||||
|
prop="materialName"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="单价(元)"/>
|
||||||
|
<el-table-column
|
||||||
|
prop="materialName"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="总价(元)"/>
|
||||||
|
<el-table-column
|
||||||
|
prop="materialName"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="备注"/>
|
||||||
|
</el-table>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">共计人民币金额:(大写) XXXXXXX</el-col>
|
||||||
|
<el-col :span="12">含13%增值税</el-col>
|
||||||
|
</el-row>
|
||||||
|
<p class="tip_p">二、质量要求、技术标准、供方对质量负责的条件和期限:技术标准符合行业标准。</p>
|
||||||
|
<p class="tip_p">三、售后服务:保修期6个月,人为造成的损坏不在质保范围内。</p>
|
||||||
|
<p class="tip_p">四、交货时间、地点:货期:待定;交货地:待客户通知。</p>
|
||||||
|
<p class="tip_p">五、运输方式及到达站和费用负担:由供方负担。</p>
|
||||||
|
<p class="tip_p">六、包装标准:按国内标准包装。</p>
|
||||||
|
<p class="tip_p">八、结算方式:款到发货,付款方式:电汇。</p>
|
||||||
|
<p class="tip_p">八、违约责任:按《中华人民共和国民法典》执行。</p>
|
||||||
|
<p class="tip_p">九、解决合同纠纷的方式:买卖双方首先友好协商解决,协商不成,任何一方均可向有管辖权法院起诉。</p>
|
||||||
|
<p class="tip_p">十、其它约定事项:合同扫描件有效,签字盖章之日起生效。</p>
|
||||||
|
<el-descriptions direction="vertical" :column="2" border>
|
||||||
|
<el-descriptions-item label="需方">
|
||||||
|
<div>单位名称:</div>
|
||||||
|
<div>地址:</div>
|
||||||
|
<div>委托代理电话:</div>
|
||||||
|
<div>传真:</div>
|
||||||
|
<div>开户银行:</div>
|
||||||
|
<div>帐号:</div>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="供方">
|
||||||
|
<div>单位名称:上海诺力智能科技有限公司(盖章)</div>
|
||||||
|
<div>地址:上海青浦区徐泾镇高光路215弄99号4号楼302室</div>
|
||||||
|
<div>委托代理电话:</div>
|
||||||
|
<div>传真:</div>
|
||||||
|
<div>开户银行:招商银行虹桥支行</div>
|
||||||
|
<div>帐号:12191702501091</div>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</section>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="visible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
dataList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init (id) {
|
||||||
|
this.visible = true
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit () {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -21,9 +21,9 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="顶级部门" prop="isTop">
|
<el-form-item label="顶级部门" prop="isTop">
|
||||||
<el-radio-group v-model="dataForm.isTop" style="width: 140px">
|
<el-radio-group v-model="dataForm.isTop" style="width: 140px" @change="handleChange">
|
||||||
<el-radio label="1">是</el-radio>
|
<el-radio :label="'1'">是</el-radio>
|
||||||
<el-radio label="0">否</el-radio>
|
<el-radio :label="'0'">否</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -68,10 +68,8 @@
|
|||||||
name: null,
|
name: null,
|
||||||
deptSort: 999,
|
deptSort: 999,
|
||||||
isTop: '1',
|
isTop: '1',
|
||||||
isUsed: true
|
isUsed: true,
|
||||||
// ext_id: null,
|
pid: null
|
||||||
// sub_count: 0,
|
|
||||||
// pid: null
|
|
||||||
},
|
},
|
||||||
depts: [],
|
depts: [],
|
||||||
dataRule: {
|
dataRule: {
|
||||||
@@ -88,20 +86,20 @@
|
|||||||
Treeselect
|
Treeselect
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleChange () {
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
init (row) {
|
init (row) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs['dataForm'].resetFields()
|
this.$refs['dataForm'].resetFields()
|
||||||
if (row) {
|
if (row) {
|
||||||
this.dataForm = {...row}
|
this.dataForm = {...row}
|
||||||
// if (this.dataForm.pid !== null) {
|
if (this.dataForm.pid !== null) {
|
||||||
// this.dataForm.isTop = '0'
|
this.dataForm.isTop = '0'
|
||||||
// } else {
|
|
||||||
// this.dataForm.isTop = '1'
|
|
||||||
// }
|
|
||||||
if (this.dataForm.pid != null) {
|
|
||||||
this.getSupDepts(this.dataForm.pid)
|
this.getSupDepts(this.dataForm.pid)
|
||||||
} else {
|
} else {
|
||||||
|
this.dataForm.isTop = '1'
|
||||||
this.getDepts()
|
this.getDepts()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,7 +122,7 @@
|
|||||||
if (data.children) {
|
if (data.children) {
|
||||||
this.buildDepts(data.children)
|
this.buildDepts(data.children)
|
||||||
}
|
}
|
||||||
if (data.has_children && !data.children) {
|
if (data.hasChildren && !data.children) {
|
||||||
data.children = null
|
data.children = null
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -133,25 +131,33 @@
|
|||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl('/api/dept/vo'),
|
url: this.$http.adornUrl('/api/dept/vo'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({is_used: true})
|
params: this.$http.adornParams({isUsed: true})
|
||||||
}).then(({data}) => {
|
}).then(({data}) => {
|
||||||
if (data && data.code === 200) {
|
if (data && data.code === 200) {
|
||||||
this.depts = data.content.map(function(obj) {
|
this.depts = data.content.map(function(obj) {
|
||||||
if (obj.has_children) {
|
if (obj.hasChildren) {
|
||||||
obj.children = null
|
obj.children = null
|
||||||
}
|
}
|
||||||
return obj
|
return obj
|
||||||
})
|
})
|
||||||
|
console.log(this.depts)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
normalizer(node) {
|
||||||
|
return {
|
||||||
|
id: node.deptId,
|
||||||
|
label: node.name,
|
||||||
|
children: node.children
|
||||||
|
}
|
||||||
|
},
|
||||||
// 获取弹窗内部门数据
|
// 获取弹窗内部门数据
|
||||||
loadDepts({ action, parentNode, callback }) {
|
loadDepts({ action, parentNode, callback }) {
|
||||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl('/api/dept/vo'),
|
url: this.$http.adornUrl('/api/dept/vo'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({is_used: true, pid: parentNode.dept_id})
|
params: this.$http.adornParams({isUsed: true, pid: parentNode.deptId})
|
||||||
}).then(({res}) => {
|
}).then(({res}) => {
|
||||||
parentNode.children = res.content.map(function(obj) {
|
parentNode.children = res.content.map(function(obj) {
|
||||||
obj.children = null
|
obj.children = null
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">查询</el-button>
|
<el-button @click="getDataList()">查询</el-button>
|
||||||
<el-button v-if="isAuth('sys:dept:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
<el-button v-if="isAuth('sys:dept:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||||
<el-button v-if="isAuth('sys:dept:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="isAuth('sys:dept:delete')" type="danger" @click="deleteHandle(1)" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
label="操作">
|
label="操作">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button v-if="isAuth('sys:dept:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row)">修改</el-button>
|
<el-button v-if="isAuth('sys:dept:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row)">修改</el-button>
|
||||||
<el-button v-if="isAuth('sys:dept:delete')" type="text" size="small" @click="deleteHandle(scope.row.deptId)">删除</el-button>
|
<el-button v-if="isAuth('sys:dept:delete')" type="text" size="small" @click="deleteHandle(2, scope.row.deptId)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -104,8 +104,8 @@ export default {
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
dataForm: {
|
dataForm: {
|
||||||
name: '',
|
name: null,
|
||||||
isUsed: ''
|
isUsed: null
|
||||||
},
|
},
|
||||||
enabledTypeOptions: [
|
enabledTypeOptions: [
|
||||||
{ key: true, displayName: '启用' },
|
{ key: true, displayName: '启用' },
|
||||||
@@ -136,7 +136,7 @@ export default {
|
|||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
'page': this.pageIndex,
|
||||||
'size': this.pageSize,
|
'size': this.pageSize,
|
||||||
'sort': 'id,desc',
|
'sort': 'create_time',
|
||||||
'name': this.dataForm.name,
|
'name': this.dataForm.name,
|
||||||
'isUsed': this.dataForm.isUsed
|
'isUsed': this.dataForm.isUsed
|
||||||
})
|
})
|
||||||
@@ -174,11 +174,11 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle (id) {
|
deleteHandle (type, id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id ? [id] : this.dataListSelections.map(item => {
|
||||||
return item.deptId
|
return item.deptId
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(type === 1 ? `确认删除选中的${this.dataListSelections.length}条数据?` : '确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
@@ -186,7 +186,7 @@ export default {
|
|||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl('/api/dept'),
|
url: this.$http.adornUrl('/api/dept'),
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
data: this.$http.adornData(ids)
|
data: ids
|
||||||
}).then(({data}) => {
|
}).then(({data}) => {
|
||||||
if (data && data.code === 200) {
|
if (data && data.code === 200) {
|
||||||
this.$message({
|
this.$message({
|
||||||
|
|||||||
Reference in New Issue
Block a user