Browse Source

完善盘库管理部分代码

master
yunuo970428 3 years ago
parent
commit
0ce146093a
  1. 29
      anrui-scm/anrui-scm-ui/src/api/kucunguanli/panku.js
  2. 28
      anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankuAdd.vue
  3. 129
      anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankuguanli.vue

29
anrui-scm/anrui-scm-ui/src/api/kucunguanli/panku.js

@ -0,0 +1,29 @@
import request from '@/utils/request'
export default {
// 查询分页列表
listPage: function(data) {
return request({
url: '/scm/v1/scmvehicleinventory/listPage',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 保存修改记录
saveOrUpdate: function(data) {
return request({
url: '/base/v1/basemodelmodprice/saveOrUpdate',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 通过sid查询一条记录
fetchBySid: function(sid) {
return request({
url: '/base/v1/basemodelmodprice/fetchBySid/' + sid,
method: 'get'
})
}
}

28
anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankuAdd.vue

@ -100,7 +100,7 @@
</template>
<script>
import req from '@/api/weishoumaiduan/unsold'
import req from '@/api/kucunguanli/panku'
import { typeValues } from '@/api/cheliang/dictcommons'
export default {
@ -124,6 +124,16 @@ export default {
userSid: window.sessionStorage.getItem('userSid'),
detailsList: []
},
listQuery: {
params: {
locationSid: '',
mainSid: '',
createOrgSid: ''
},
current: 1,
size: 10,
total: 0
},
rules: {},
submitdisabled: false
}
@ -142,21 +152,13 @@ export default {
var pageindex = index + 1 + pagestart
return pageindex
},
showEdit(row) {
showEdit(createOrgSid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
console.log('编辑回显', row.sid)
req.fetchBySid(row.sid).then((resp) => {
const data = resp.data
this.formobj.applicationName = data.applicationName
this.formobj.sid = data.sid
this.formobj.reason = data.reason
this.formobj.createTime = data.createTime
this.formobj.detailsList = data.voList
}).catch((e) => {
this.formobj = row
})
this.formobj.createOrgSid = createOrgSid
this.formobj.useOrgSid = createOrgSid
this.listQuery.params.createOrgSid = createOrgSid
},
save() {
this.$refs['form_obj'].validate((valid) => {

129
anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankuguanli.vue

@ -10,21 +10,27 @@
<el-form ref="listQueryform" :inline="true" :model="listQuery" class="tab-header">
<el-form-item label="最新盘库日期">
<div class="block" style="float: left;">
<el-date-picker v-model="listQuery.params.warehousingStartTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<el-date-picker v-model="listQuery.params.InventoryStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</div>
<div style="float: left;margin: 0px 10px"></div>
<div class="block" style="float: left;">
<el-date-picker v-model="listQuery.params.warehousingEndTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<el-date-picker v-model="listQuery.params.InventoryEndDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</div>
</el-form-item>
<el-form-item label="车架号">
<el-input v-model="listQuery.params.mNum" placeholder="请输入车型" clearable/>
<el-input v-model="listQuery.params.mainSid" placeholder="请输入车型" clearable/>
</el-form-item>
<el-form-item label="仓库">
<el-input v-model="listQuery.params.mNum" placeholder="请输入车型" clearable/>
<el-form-item label="存放地点">
<el-select v-model="listQuery.params.locationSid" filterable placeholder="请选择">
<el-option v-for="item in warehouse_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="状态">
<el-input v-model="listQuery.params.mNum" placeholder="请输入车型" clearable/>
<el-select v-model="listQuery.params.InventoryState" filterable placeholder="请选择">
<el-option v-for="item in state_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey">
</el-option>
</el-select>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
@ -47,37 +53,37 @@
</el-table-column>
<el-table-column label="车架号" width="140px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vehicleVersion }}</span>
<span>{{ scope.row.mainSid }}</span>
</template>
</el-table-column>
<el-table-column label="合格证" width="140px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vehicleVersion }}</span>
<span>{{ scope.row.certificate }}</span>
</template>
</el-table-column>
<el-table-column label="最新盘库日期" align="center" width="150px">
<template slot-scope="scope">
<span>{{ scope.row.engineTypeValue }}</span>
<span>{{ scope.row.InventoryDate }}</span>
</template>
</el-table-column>
<el-table-column label="最新仓库" align="center" width="150px">
<template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span>
<span>{{ scope.row.location }}</span>
</template>
</el-table-column>
<el-table-column label="最新盘库人员" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span>
<span>{{ scope.row.InventoryName }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" width="130px">
<template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span>
<span>{{ scope.row.InventoryState }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" width="130px">
<template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span>
<span>{{ scope.row.remarks }}</span>
</template>
</el-table-column>
</el-table>
@ -93,12 +99,12 @@
</template>
<script>
import { pagerList } from '@/api/cheliang/basevehiclemodel'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import req from '@/api/anruiscm/scmmaterial'
import req from '@/api/kucunguanli/panku'
import pankuAdd from './pankuAdd'
import { getPathSidByUserSid, typeValues } from '@/api/cheliang/dictcommons'
export default {
name: 'pankuguanli',
@ -123,7 +129,7 @@ export default {
type: 'primary',
size: 'small',
icon: '',
btnKey: 'doDel',
btnKey: 'toEdit',
btnLabel: '盘库'
},
{
@ -140,23 +146,27 @@ export default {
// -----------
tableKey: 0,
list: [],
warehouse_list: [],
state_list: [
{
dictKey: 1,
dictValue: '通过'
},
{
dictKey: 2,
dictValue: '未通过'
}
],
FormLoading: false,
listLoading: false,
listQuery: {
params: {
carBrand: '',
vehicleType: '',
productLine: '',
driveForm: '',
power: '',
vehicleVersion: '',
fuelType: '',
vehicleTypeCode: '',
gearboxType: '',
emissionStandard: '',
engineType: '',
marketSegments: '',
specifications: ''
InventoryStartDate: '',
InventoryEndDate: '',
locationSid: '',
mainSid: '',
InventoryState: '',
createOrgSid: ''
},
current: 1,
size: 10,
@ -167,12 +177,25 @@ export default {
},
created() {
//
this.getList()
this.init()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
init() {
typeValues({ type: 'warehouse' }).then((res) => {
if (res.success) {
this.warehouse_list = res.data
}
})
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => {
if (res.success) {
this.listQuery.params.createOrgSid = res.data
this.getList()
}
})
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
@ -191,15 +214,6 @@ export default {
case 'toEdit':
this.toEdit()
break
case 'doDel':
this.doDel()
break
case 'doImport':
this.doImport()
break
case 'doExport':
this.doExport()
break
case 'doClose':
this.doClose()
break
@ -216,14 +230,10 @@ export default {
//
getList() {
this.listLoading = true
pagerList(this.listQuery).then((response) => {
req.listPage(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (
response.success &&
response.data &&
response.data.total > 0
) {
if (response.success && response.data && response.data.total > 0) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
@ -240,29 +250,23 @@ export default {
handleReset() {
this.listQuery = {
params: {
carBrand: '',
vehicleType: '',
productLine: '',
driveForm: '',
power: '',
vehicleVersion: '',
fuelType: '',
vehicleTypeCode: '',
gearboxType: '',
emissionStandard: '',
engineType: '',
marketSegments: '',
specifications: ''
InventoryStartDate: '',
InventoryEndDate: '',
locationSid: '',
mainSid: '',
InventoryState: '',
createOrgSid: ''
},
current: 1,
size: 10,
total: 0
}
this.getList()
this.init()
},
toAdd() {
toAdd() {},
toEdit() {
this.viewState = 2
this.$refs['divAdd'].showAdd()
this.$refs['divAdd'].showEdit(this.listQuery.params.createOrgSid)
},
resetState() {
this.viewState = 1
@ -289,6 +293,7 @@ export default {
.tab-header /deep/ .el-form-item {
margin-bottom: 10px;
}
.listtop {
display: flex;
justify-content: space-between;
@ -296,9 +301,11 @@ export default {
border: 1px solid #dfe4ed;
height: 40px;
}
.tit {
margin-bottom: -10px;
}
.pagination {
margin-bottom: -10px;
}

Loading…
Cancel
Save