Commit c02ff50e by yubin
parents 9aad480f c573b8ff
...@@ -21,7 +21,7 @@ export const getPendingBorrowList = (param) => { ...@@ -21,7 +21,7 @@ export const getPendingBorrowList = (param) => {
// 获取历史列表 // 获取历史列表
export const getHistoryBorrowList = (param) => { export const getHistoryBorrowList = (param) => {
return axios.request({ return axios.request({
url: '/api/keyDmBorrow/selectHistoryList', url: '/api/ac/jilinsscgsdp/keyDmBorrow/selectHistoryList',
method: 'post', method: 'post',
data: param data: param
}) })
......
...@@ -137,7 +137,7 @@ export const materialTemplateDownload = (param) => { ...@@ -137,7 +137,7 @@ export const materialTemplateDownload = (param) => {
// 使用统计 // 使用统计
export const getUsageStats = (param) => { export const getUsageStats = (param) => {
return axios.request({ return axios.request({
url: '/api/ac/jilinsscgsdp/keyDmStats/selectUsageStats', url: '/api/ac/jilinsscgsdp/keyDmUserCategory/selectUsageStats',
method: 'post', method: 'post',
data: param data: param
}) })
...@@ -145,7 +145,7 @@ export const getUsageStats = (param) => { ...@@ -145,7 +145,7 @@ export const getUsageStats = (param) => {
export const getUsageDetails = (param) => { export const getUsageDetails = (param) => {
return axios.request({ return axios.request({
url: '/api/ac/jilinsscgsdp/keyDmStats/selectUsageDetails', url: '/api/ac/jilinsscgsdp/keyDmUserCategory/selectUsageDetails',
method: 'post', method: 'post',
data: param data: param
}) })
...@@ -154,7 +154,7 @@ export const getUsageDetails = (param) => { ...@@ -154,7 +154,7 @@ export const getUsageDetails = (param) => {
// 工作量统计 // 工作量统计
export const getWorkloadStats = (param) => { export const getWorkloadStats = (param) => {
return axios.request({ return axios.request({
url: '/api/ac/jilinsscgsdp/keyDmStats/selectWorkloadStats', url: '/api/ac/jilinsscgsdp/keyDmUserCategory/selectWorkloadStats',
method: 'post', method: 'post',
data: param data: param
}) })
...@@ -162,7 +162,7 @@ export const getWorkloadStats = (param) => { ...@@ -162,7 +162,7 @@ export const getWorkloadStats = (param) => {
export const getWorkloadDetails = (param) => { export const getWorkloadDetails = (param) => {
return axios.request({ return axios.request({
url: '/api/ac/jilinsscgsdp/keyDmStats/selectWorkloadDetails', url: '/api/ac/jilinsscgsdp/keyDmUserCategory/selectWorkloadDetails',
method: 'post', method: 'post',
data: param data: param
}) })
......
...@@ -1041,7 +1041,7 @@ export default { ...@@ -1041,7 +1041,7 @@ export default {
} else { } else {
this.$Notice.error({ title: '保存失败', desc: ret.data && ret.data.errmsg }) this.$Notice.error({ title: '保存失败', desc: ret.data && ret.data.errmsg })
} }
}).finally(() => { }) }).finally(() => {})
} }
} }
} }
......
...@@ -2,23 +2,19 @@ ...@@ -2,23 +2,19 @@
<Modal v-model="visible" title="选择物料" width="900" :mask-closable="false"> <Modal v-model="visible" title="选择物料" width="900" :mask-closable="false">
<div class="search-div"> <div class="search-div">
<Row type="flex" :gutter="16" align="middle"> <Row type="flex" :gutter="16" align="middle">
<Col :span="6"> <Col :span="18">
<span>分类:</span> <span>分类:</span>
<Select v-model="filters.category_id" clearable style="width: 100%"> <Select v-model="filters.category_id" clearable style="width: 130px" class="mr10">
<Option v-for="c in categoryOptions" :key="c.id" :value="c.id">{{ c.category_Name }}</Option> <Option v-for="c in categoryOptions" :key="c.id" :value="c.id">{{ c.category_name }}</Option>
</Select> </Select>
</Col>
<Col :span="6">
<span>物料编码:</span> <span>物料编码:</span>
<Input v-model="filters.material_code" placeholder="物料编码" /> <Input v-model="filters.material_code" placeholder="物料编码" style="width: 150px" class="mr10" />
</Col>
<Col :span="8">
<span>物料名称:</span> <span>物料名称:</span>
<Input v-model="filters.material_name" placeholder="物料名称" /> <Input v-model="filters.material_name" placeholder="物料名称" style="width: 150px" />
</Col> </Col>
<Col :span="4" class="text-right"> <Col :span="6" class="text-right">
<Button type="primary" class="mr10" @click="handleSearch">搜索</Button> <Button type="primary" class="mr10" @click="handleSearch">搜索</Button>
<Button @click="handleReset">重置</Button> <Button type="primary" @click="handleReset">重置</Button>
</Col> </Col>
</Row> </Row>
</div> </div>
...@@ -58,11 +54,11 @@ export default { ...@@ -58,11 +54,11 @@ export default {
categoryOptions: [], categoryOptions: [],
columns: [ columns: [
{ type: 'selection', width: 60 }, { type: 'selection', width: 60 },
{ title: '物料编码', key: 'material_code', align: 'center' }, { title: '分类', key: 'category_name', align: 'center', minWidth: 80 },
{ title: '物料名称', key: 'material_name', align: 'center' }, { title: '物料编码', key: 'material_code', align: 'center', minWidth: 100 },
{ title: '单位', key: 'unit', align: 'center', width: 80 }, { title: '物料名称', key: 'material_name', align: 'center', minWidth: 100 },
{ title: '可用库存', key: 'available_quantity', align: 'center', width: 120 }, { title: '单位', key: 'unit', align: 'center', minWidth: 80 },
{ title: '分类', key: 'category_Name', align: 'center' } { title: '可用库存', key: 'available_quantity', align: 'center', minWidth: 120 }
] ]
} }
}, },
...@@ -95,7 +91,7 @@ export default { ...@@ -95,7 +91,7 @@ export default {
}, },
fetchList () { fetchList () {
this.loading = true this.loading = true
const payload = { pageNo: this.pager.pageNo, pageSize: this.pager.pageSize, params: this.filters } const payload = Object.assign({ pageNo: this.pager.pageNo, pageSize: this.pager.pageSize }, this.filters)
getMaterialList(payload).then(ret => { getMaterialList(payload).then(ret => {
if (ret.data && ret.data.errcode === 0) { if (ret.data && ret.data.errcode === 0) {
const data = ret.data.data || {} const data = ret.data.data || {}
...@@ -146,4 +142,5 @@ export default { ...@@ -146,4 +142,5 @@ export default {
.search-div { border: 1px solid #dce1e7; padding: 12px; margin-bottom: 12px; background-color: #f8fbff; } .search-div { border: 1px solid #dce1e7; padding: 12px; margin-bottom: 12px; background-color: #f8fbff; }
.mr10 { margin-right: 10px; } .mr10 { margin-right: 10px; }
.page_style { margin-top: 12px; text-align: right; } .page_style { margin-top: 12px; text-align: right; }
.text-right { text-align: right; }
</style> </style>
...@@ -67,12 +67,12 @@ ...@@ -67,12 +67,12 @@
</div> </div>
<Table :data="tables.inbound" :loading="loading.inbound" :columns="inboundColumns" border> <Table :data="tables.inbound" :loading="loading.inbound" :columns="inboundColumns" border>
<template slot="action" slot-scope="{ row }"> <template slot="action" slot-scope="{ row }">
<Poptip confirm title="确认执行入库?" transfer @on-ok="doInbound(row)" v-if="row.inbound_status === 0"> <Poptip confirm title="确认执行入库?" transfer @on-ok="doInbound(row)" v-if="canEdit(row)">
<Button size="small" type="success">入库</Button> <Button size="small" type="success">入库</Button>
</Poptip> </Poptip>
<Button size="small" @click="openDetail(row)">详细</Button> <Button size="small" @click="openDetail(row)">详细</Button>
<Button size="small" type="primary" @click="openEdit(row)" v-if="canEdit(row)">修改</Button> <Button size="small" type="primary" @click="openEdit(row)" v-if="canEdit(row)">修改</Button>
<Poptip confirm title="确认删除?" transfer @on-ok="deleteInbound(row)"> <Poptip confirm title="确认删除?" transfer @on-ok="deleteInbound(row)" v-if="canEdit(row)">
<Button size="small" type="error">删除</Button> <Button size="small" type="error">删除</Button>
</Poptip> </Poptip>
</template> </template>
...@@ -609,8 +609,21 @@ export default { ...@@ -609,8 +609,21 @@ export default {
this.inboundModal.saving = false this.inboundModal.saving = false
}) })
}, },
canEdit (row) { return row.inbound_status === 0 }, canEdit (row) {
deleteInbound (row) { deleteInbound({ id: row.id }).then(ret => { if (ret.data && ret.data.errcode === 0) { this.$Message.success('删除成功'); this.fetchList('inbound') } else this.$Notice.error({ title: '删除失败', desc: ret.data && ret.data.errmsg }) }) }, const userId = this.$store.state.user.userId
return row.inbound_status === 0 && row.create_by === userId
},
deleteInbound (row) {
deleteInbound({ id: row.id }).then(ret => {
if (ret.data && ret.data.errcode === 0) {
this.$Message.success('删除成功'); this.fetchList('inbound')
} else {
this.$Notice.error({
title: '删除失败', desc: ret.data && ret.data.errmsg
})
}
})
},
doInbound (row) { doInbound (row) {
doInbound({ id: row.id }).then(ret => { doInbound({ id: row.id }).then(ret => {
if (ret.data && ret.data.errcode === 0) { if (ret.data && ret.data.errcode === 0) {
......
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
<script> <script>
import { getDmUserList, syncDmUsersByOffice, saveDmUser } from '@/api/key-dm-user' import { getDmUserList, syncDmUsersByOffice, saveDmUser } from '@/api/key-dm-user'
import UserSelector from './userSelector.vue' import UserSelector from './userSelector.vue'
import { normalizeVisitTimeValue } from '@/view/key-person/key_dm_conf/dates.js'
export default { export default {
name: 'key-dm-user-index', name: 'key-dm-user-index',
...@@ -226,7 +227,7 @@ export default { ...@@ -226,7 +227,7 @@ export default {
const params = { office_code: this.officeCode } const params = { office_code: this.officeCode }
this.$Modal.confirm({ this.$Modal.confirm({
title: '确认同步', title: '确认同步',
content: '将同步本机构及下属机构的用户,已存在的记录会被更新(不覆盖 null 值),是否继续?', content: '将同步本机构及下属机构的用户,已存在的记录会被更新,是否继续?',
onOk: () => { onOk: () => {
this.loading = true this.loading = true
syncDmUsersByOffice(params).then(ret => { syncDmUsersByOffice(params).then(ret => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论