Browse Source

fix:[系统管理][存储位置]

luojie
HanLong 4 weeks ago
parent
commit
452676b600
4 changed files with 156 additions and 6 deletions
  1. +16
    -0
      src/api/business/storageLocation/storageLocation.js
  2. +5
    -2
      src/views/business/resource/yq/list.vue
  3. +126
    -0
      src/views/business/storageLocation/comps/detail.vue
  4. +9
    -4
      src/views/business/storageLocation/list.vue

+ 16
- 0
src/api/business/storageLocation/storageLocation.js View File

@ -21,4 +21,20 @@ export function storageLocation_edit(data) {
method: 'post', method: 'post',
data: data data: data
}) })
}
export function storageLocation_info(query) {
return request({
url: '/system/business/storageLocation/info',
method: 'get',
params: query
})
}
export function jcgj_list(query) {
return request({
url: '/system/business/storageLocation/jcgj/list',
method: 'get',
params: query
})
} }

+ 5
- 2
src/views/business/resource/yq/list.vue View File

@ -149,7 +149,8 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('form.signerPsw')" prop="qmrmm"> <el-form-item :label="$t('form.signerPsw')" prop="qmrmm">
<el-input v-model="form.qmrmm" autocomplete="off" auto-complete="new-password" show-password
<div class="sbzdtcma"> <input type="text"></div>
<el-input v-model="form.qmrmm" show-password
:placeholder="$t('form.placeholderInput')" type="password" maxlength="20" /> :placeholder="$t('form.placeholderInput')" type="password" maxlength="20" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -213,7 +214,8 @@ export default {
}, },
// //
form: { form: {
'qmyy': this.$t('page.form.add')
'qmyy': this.$t('page.form.add'),
qmrmm: null,
}, },
// //
rules: { rules: {
@ -290,6 +292,7 @@ export default {
wc: null, wc: null,
ccwz: null, ccwz: null,
fzdd: null, fzdd: null,
qmrmm: null,
qmyy: this.$t('page.business.resource.yq.xzyq'), qmyy: this.$t('page.business.resource.yq.xzyq'),
} }
this.resetForm('form') this.resetForm('form')

+ 126
- 0
src/views/business/storageLocation/comps/detail.vue View File

@ -0,0 +1,126 @@
<template>
<div class="app-container">
<!-- 详情弹窗 -->
<el-dialog :title="$t('form.detail')" :visible.sync="open" width="800px" append-to-body
:close-on-click-modal="false">
<el-form ref="form" :model="form" label-width="120px">
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.fzdd')" prop="location">
<el-input v-model="form.location" disabled :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.sbmc')" prop="name">
<el-input v-model="form.name" disabled :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.fzhj')" prop="shelfPlacement">
<el-input v-model="form.shelfPlacement" disabled :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.wc')" prop="compartment">
<el-input v-model="form.compartment" disabled :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.ssbm')" prop="deptId">
<el-input v-model="form.deptName" disabled :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.zt')" prop="status">
<el-select v-model="form.status" :placeholder="$t('form.placeholderSelect')" disabled style="width: 100%;">
<el-option key="1" :label="$t('page.system.storageLocation.no')" :value="1" />
<el-option key="10" :label="$t('page.system.storageLocation.yes')" :value="10" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table v-loading="loading" :data="qmList">
<el-table-column :label="$t('form.signer')" align="center" prop="qmrMc" />
<el-table-column :label="$t('form.qmyy')" align="center" prop="jcmc" />
<el-table-column :label="$t('form.signTime')" align="center" prop="createTime" />
<el-table-column :label="$t('page.business.resource.yq.xgnr')" align="center">
<template slot-scope="scope">
<div v-for="(pitem, pindex) in scope.row.jcnrList" :key="pindex">
{{ pitem.name }}{{ pitem.value }}
</div>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<div slot="footer" class="dialog-footer">
<el-button @click="cancel">{{ $t('form.cancel') }}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { storageLocation_info, jcgj_list } from '@/api/business/storageLocation/storageLocation'
export default {
name: "StorageLocationDetail",
components: {
},
data() {
return {
loading: true,
open: false,
form: {},
//
qmList: [],
//
total: 0,
queryParams: {
pageNum: 1,
pageSize: 10,
id: '',
},
}
},
created() {
},
methods: {
cancel() {
this.open = false
},
show(row) {
storageLocation_info({ id: row.id }).then((response) => {
this.form = response.data
this.open = true
})
this.saveSimpleLog({name:row.bh,nameEn:row.bh,jcmc:'存储位置详情',jcmcEn:'Storage Location Detail'})
this.queryParams.id = row.id
jcgj_list(this.queryParams).then((response) => {
this.qmList = response.rows
this.qmList.forEach(item => {
if (item.jcnr) {
item.jcnrList = JSON.parse(item.jcnr)
//item.jcnr = Object.entries(JSON.parse(item.jcnr)).map(([key, value]) => `${key}:${value}`).join('\r\n');
} else {
item.jcnrList = []
}
})
this.total = response.total
this.loading = false
})
},
getList() {
}
}
}
</script>

+ 9
- 4
src/views/business/storageLocation/list.vue View File

@ -114,7 +114,8 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('form.signerPsw')" prop="qmrmm"> <el-form-item :label="$t('form.signerPsw')" prop="qmrmm">
<el-input v-model="form.qmrmm" autocomplete="off" auto-complete="new-password" show-password
<div class="sbzdtcma"> <input type="text"></div>
<el-input v-model="form.qmrmm" show-password
:placeholder="$t('form.placeholderInput')" type="password" maxlength="20" /> :placeholder="$t('form.placeholderInput')" type="password" maxlength="20" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -126,6 +127,7 @@
</div> </div>
</el-dialog> </el-dialog>
<StorageLocationDetail ref="storageLocationDetail"/>
</div> </div>
</template> </template>
@ -136,9 +138,10 @@ import BusinessSelect from '@/views/business/comps/select/BusinessSelect';
import SelectDept from '@/views/business/comps/select/SelectDept'; import SelectDept from '@/views/business/comps/select/SelectDept';
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import SelectStorageLocation from '@/views/business/comps/select/SelectStorageLocation' import SelectStorageLocation from '@/views/business/comps/select/SelectStorageLocation'
import StorageLocationDetail from './comps/detail'
export default { export default {
name: 'StorageLocation', name: 'StorageLocation',
components: { BusinessSelect, SelectDept, SelectStorageLocation },
components: { BusinessSelect, SelectDept, SelectStorageLocation, StorageLocationDetail },
data() { data() {
return { return {
@ -170,7 +173,8 @@ export default {
}, },
// //
form: { form: {
'qmyy': this.$t('page.form.add')
'qmyy': this.$t('page.form.add'),
qmrmm: null,
}, },
// //
rules: { rules: {
@ -238,6 +242,7 @@ export default {
wc: null, wc: null,
ccwz: null, ccwz: null,
fzdd: null, fzdd: null,
qmrmm: null,
qmyy: this.$t('page.system.storageLocation.addStroageLocation'), qmyy: this.$t('page.system.storageLocation.addStroageLocation'),
} }
this.resetForm('form') this.resetForm('form')
@ -269,7 +274,7 @@ export default {
this.title = this.$t('form.edit') this.title = this.$t('form.edit')
}, },
handleDetail(row) { handleDetail(row) {
this.$refs.YqDetail.show(row)
this.$refs.storageLocationDetail.show(row)
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {

Loading…
Cancel
Save