完成资产管理相关开发
This commit is contained in:
parent
f0f1d45a0f
commit
a8cfb8ea44
@ -120,3 +120,13 @@ export const apiGetRePrintCode = (data, code) => {
|
|||||||
return http({ url: `/lz_management/oneCode/re/print?code=${code}`, method: 'get', data })
|
return http({ url: `/lz_management/oneCode/re/print?code=${code}`, method: 'get', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 批量生成制定数量的编码
|
||||||
|
export const apiGetNewPrintCodes = (data, count) => {
|
||||||
|
return http({ url: `/lz_management/oneCode/new/prints?counts=${count}`, method: 'get', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取编码
|
||||||
|
export const apiGetCodes = data => {
|
||||||
|
return http({ url: `/lz_management/oneCode/get/getPrints`, method: 'post', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
src/assets/img/equipment/ding_sao_yi_sao.png
Normal file
BIN
src/assets/img/equipment/ding_sao_yi_sao.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@ -33,10 +33,7 @@ const dingtalkRoutes=[
|
|||||||
{ path: '/devicemark', component: _import('modules/device/device-mark'), name: 'devicemark', meta: { title: '设备备注' } },
|
{ path: '/devicemark', component: _import('modules/device/device-mark'), name: 'devicemark', meta: { title: '设备备注' } },
|
||||||
{ path: '/devicestaff', component: _import('modules/device/device-staff-device'), name: 'devicestaff', meta: { title: '人员资产信息' } },
|
{ path: '/devicestaff', component: _import('modules/device/device-staff-device'), name: 'devicestaff', meta: { title: '人员资产信息' } },
|
||||||
{ path: '/devicestaffdepat', component: _import('modules/device/device-staff-depat'), name: 'devicestaffdepat', meta: { title: '搜索人员' } },
|
{ path: '/devicestaffdepat', component: _import('modules/device/device-staff-depat'), name: 'devicestaffdepat', meta: { title: '搜索人员' } },
|
||||||
{ path: '/devicespec', component: _import('modules/device-manage/device-spec'), name: 'devicespec', meta: { title: '设备规格管理' } },
|
|
||||||
{ path: '/devicetypes', component: _import('modules/device-manage/device-type'), name: 'devicetypes', meta: { title: '设备类型管理' } },
|
|
||||||
{ path: '/devicebrand', component: _import('modules/device-manage/device-brand'), name: 'devicebrand', meta: { title: '设备品牌管理' } },
|
|
||||||
{ path: '/devicelist', component: _import('modules/device-manage/device-list'), name: 'devicelist', meta: { title: '设备列表管理' } },
|
|
||||||
{ path: '/devicedetail', component: _import('modules/device/device-detail'), name: 'devicedetail', meta: { title: '资产盘点设备详情页' } }
|
{ path: '/devicedetail', component: _import('modules/device/device-detail'), name: 'devicedetail', meta: { title: '资产盘点设备详情页' } }
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -108,13 +105,13 @@ router.beforeEach((to, from, next) => {
|
|||||||
if (router.options.isAddDynamicMenuRoutes || fnCurrentRouteType(to, globalRoutes) === 'global') {
|
if (router.options.isAddDynamicMenuRoutes || fnCurrentRouteType(to, globalRoutes) === 'global') {
|
||||||
next()
|
next()
|
||||||
} else if (fnIsInRoutes(to, dingtalkRoutes)) {//判断是否全屏路由
|
} else if (fnIsInRoutes(to, dingtalkRoutes)) {//判断是否全屏路由
|
||||||
/*if(fnCheckToken()){
|
if(fnCheckToken()){
|
||||||
next()
|
next()
|
||||||
} else {
|
} else {
|
||||||
clearLoginInfo()
|
clearLoginInfo()
|
||||||
next({ name: 'login' })
|
next({ name: 'login' })
|
||||||
}*/
|
}
|
||||||
next()
|
//next()
|
||||||
/*console.log(to)
|
/*console.log(to)
|
||||||
let newpage = router.resolve({
|
let newpage = router.resolve({
|
||||||
name: to.path,
|
name: to.path,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="!id ? '新增规格' : '编辑规格'" :close-on-click-modal="false" :visible.sync="visible"
|
<el-dialog :title="!id ? '新增品牌' : '编辑品牌'" :close-on-click-modal="false" :visible.sync="visible"
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-form :inline="true">
|
<el-form :inline="true">
|
||||||
@ -25,8 +25,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="warning" @click="save">取消</el-button>
|
<el-button type="warning" @click="save(0)">取消</el-button>
|
||||||
<el-button type="primary" @click="save">保存</el-button>
|
<el-button type="primary" @click="save(1)">保存</el-button>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -93,7 +93,11 @@ export default {
|
|||||||
console.log(val)
|
console.log(val)
|
||||||
|
|
||||||
},
|
},
|
||||||
save(){
|
save(val){
|
||||||
|
if(val == 0){
|
||||||
|
this.visible = false
|
||||||
|
return
|
||||||
|
}
|
||||||
if(this.specReq.typeId == null){
|
if(this.specReq.typeId == null){
|
||||||
this.$message.error('请选择类型')
|
this.$message.error('请选择类型')
|
||||||
return
|
return
|
||||||
|
|||||||
@ -19,15 +19,14 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getData()">查询</el-button>
|
<el-button type="primary" @click="getData()">查询</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="addNewSpec()">新增品牌</el-button>
|
<el-button type="success" @click="addNewSpec()">新增品牌</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-table v-loading="dataListLoading" :data="data" style="width: 100%" @row-click="rowClick">
|
<el-table v-loading="dataListLoading" :data="data" style="width: 100%" @row-click="rowClick">
|
||||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
|
||||||
<el-table-column prop="id" header-align="center" align="center" label="ID"></el-table-column>
|
<el-table-column prop="id" header-align="center" align="center" label="ID"></el-table-column>
|
||||||
<el-table-column prop="typeName" header-align="center" align="center" label="类型"></el-table-column>
|
<el-table-column prop="typeName" header-align="center" align="center" label="类型"></el-table-column>
|
||||||
<el-table-column prop="brand" header-align="center" align="center" label="品牌"></el-table-column>
|
<el-table-column prop="brand" header-align="center" align="center" label="品牌"></el-table-column>
|
||||||
@ -117,7 +116,7 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
changeDepartment(type) {
|
changeDepartment(type) {
|
||||||
|
this.specReq.page = 1
|
||||||
this.getData()
|
this.getData()
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -193,6 +192,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
btnSearch() {
|
btnSearch() {
|
||||||
|
this.specReq.page = 1
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
40
src/views/modules/device-manage/device-list-add.vue
Normal file
40
src/views/modules/device-manage/device-list-add.vue
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog :title="'新增绑定信息'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
|
<el-form :inline="true">
|
||||||
|
<el-form-item label="使用钉钉扫一扫">
|
||||||
|
<el-image
|
||||||
|
style="width: 200px; height: 200px"
|
||||||
|
:src="url"
|
||||||
|
:fit="fit"></el-image>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="save">关闭</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
url: require('@/assets/img/equipment/ding_sao_yi_sao.png')
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
computed: {},
|
||||||
|
methods: {
|
||||||
|
async init(obj, types, brands) {
|
||||||
|
console.log('device-list-add init')
|
||||||
|
this.visible = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
save() {
|
||||||
|
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="!id ? '新增规格' : '编辑规格'" :close-on-click-modal="false" :visible.sync="visible">
|
<el-dialog :title="!id ? '新增' : '编辑设备信息'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
<el-form :inline="true">
|
<el-form :inline="true">
|
||||||
<el-form-item label="类型">
|
<el-form-item label="类型">
|
||||||
<el-select v-model="type" :disabled="departmentReaderOnly" @change="changeType"></el-select>
|
<el-select v-model="type" :disabled="departmentReaderOnly" @change="changeType"></el-select>
|
||||||
@ -78,8 +78,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="warning" @click="save">取消</el-button>
|
<el-button type="warning" @click="save(0)">取消</el-button>
|
||||||
<el-button type="primary" @click="save">保存</el-button>
|
<el-button type="primary" @click="save(1)">保存</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -176,7 +176,12 @@ export default {
|
|||||||
this.visible = true;
|
this.visible = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
save() {
|
save(val) {
|
||||||
|
if(val == 0){
|
||||||
|
this.visible = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.specReq.id = this.id
|
this.specReq.id = this.id
|
||||||
this.specReq.buyAmount = this.buyAmount;
|
this.specReq.buyAmount = this.buyAmount;
|
||||||
@ -187,6 +192,7 @@ export default {
|
|||||||
this.specReq.originalCode = this.originalCode;
|
this.specReq.originalCode = this.originalCode;
|
||||||
this.specReq.no = this.no;
|
this.specReq.no = this.no;
|
||||||
this.editSpecs();
|
this.editSpecs();
|
||||||
|
|
||||||
},
|
},
|
||||||
editSpecs() {
|
editSpecs() {
|
||||||
console.log("editSpecs");
|
console.log("editSpecs");
|
||||||
|
|||||||
@ -92,12 +92,12 @@
|
|||||||
<el-input v-model="specReq.user" placeholder="使用人信息" clearable></el-input>
|
<el-input v-model="specReq.user" placeholder="使用人信息" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="现有编号">
|
<el-form-item label="现有编码">
|
||||||
<el-input v-model="specReq.code" placeholder="现有编号" clearable></el-input>
|
<el-input v-model="specReq.code" placeholder="现有编码" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="自带编号">
|
<el-form-item label="自带标识">
|
||||||
<el-input v-model="specReq.qr" placeholder="自带编号" clearable></el-input>
|
<el-input v-model="specReq.qr" placeholder="设备自带标识" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
@ -110,19 +110,21 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="warning" @click="clearGet()">清空筛选</el-button>
|
<el-button type="warning" @click="clearGet()">清空筛选</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="success" @click="addNew()">新增</el-button>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-table v-loading="dataListLoading" :data="data" style="width: 100%" @row-click="rowClick">
|
<el-table v-loading="dataListLoading" :data="data" style="width: 100%" @row-click="rowClick">
|
||||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
|
||||||
<el-table-column prop="id" header-align="center" align="center" label="ID"></el-table-column>
|
<el-table-column prop="id" header-align="center" align="center" label="ID"></el-table-column>
|
||||||
<el-table-column prop="type" header-align="center" align="center" label="类型"></el-table-column>
|
<el-table-column prop="type" header-align="center" align="center" label="类型"></el-table-column>
|
||||||
<el-table-column prop="brandName" header-align="center" align="center" label="品牌"></el-table-column>
|
<el-table-column prop="brandName" header-align="center" align="center" label="品牌"></el-table-column>
|
||||||
<el-table-column prop="specType" header-align="center" align="center" label="规格"></el-table-column>
|
<el-table-column prop="specType" header-align="center" align="center" label="规格"></el-table-column>
|
||||||
<el-table-column prop="user" header-align="center" align="center" label="使用方"></el-table-column>
|
<el-table-column prop="user" header-align="center" align="center" label="使用方"></el-table-column>
|
||||||
<el-table-column prop="code" header-align="center" align="center" label="现有标识"></el-table-column>
|
|
||||||
|
<el-table-column prop="code" header-align="center" align="center" label="现有编码"></el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="originalCode" header-align="center" align="center" label="自带标识"></el-table-column>
|
<el-table-column prop="originalCode" header-align="center" align="center" label="自带标识"></el-table-column>
|
||||||
<el-table-column prop="gmtOutbound" header-align="center" align="center" label="出库时间"></el-table-column>
|
|
||||||
<el-table-column prop="gmtInbound" header-align="center" align="center" label="入库时间"></el-table-column>
|
|
||||||
<el-table-column prop header-align="center" align="center" label="状态">
|
<el-table-column prop header-align="center" align="center" label="状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div class="conatnt-name">
|
<div class="conatnt-name">
|
||||||
@ -130,10 +132,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="mark" header-align="center" align="center" label="备注"></el-table-column>
|
||||||
|
<el-table-column prop="gmtOutbound" header-align="center" align="center" label="出库时间"></el-table-column>
|
||||||
|
<el-table-column prop="gmtInbound" header-align="center" align="center" label="入库时间"></el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="buyAmount" header-align="center" align="center" label="买入金额"></el-table-column>
|
<el-table-column prop="buyAmount" header-align="center" align="center" label="买入金额"></el-table-column>
|
||||||
<el-table-column prop="saleAmount" header-align="center" align="center" label="出售金额"></el-table-column>
|
<el-table-column prop="saleAmount" header-align="center" align="center" label="出售金额"></el-table-column>
|
||||||
<el-table-column prop="no" header-align="center" align="center" label="审批编号"></el-table-column>
|
<el-table-column prop="no" header-align="center" align="center" label="审批编号"></el-table-column>
|
||||||
<el-table-column prop="mark" header-align="center" align="center" label="备注"></el-table-column>
|
|
||||||
<el-table-column fixed="right" header-align="center" align="center" width="100" label="操作">
|
<el-table-column fixed="right" header-align="center" align="center" width="100" label="操作">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="mini" @click="handleAddOrUpdate(scope.row)">编辑</el-button>
|
<el-button type="text" size="mini" @click="handleAddOrUpdate(scope.row)">编辑</el-button>
|
||||||
@ -152,6 +158,7 @@
|
|||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
></el-pagination>
|
></el-pagination>
|
||||||
<device-list-detail v-if="isShowDetail" ref="deviceListDetail" @refreshDataList="getData"></device-list-detail>
|
<device-list-detail v-if="isShowDetail" ref="deviceListDetail" @refreshDataList="getData"></device-list-detail>
|
||||||
|
<device-list-add v-if="isShowAdd" ref="deviceListAdd" @refreshDataList="getData"></device-list-add>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -164,13 +171,16 @@ import {
|
|||||||
} from "@/api/api_equipment";
|
} from "@/api/api_equipment";
|
||||||
import * as dd from "dingtalk-jsapi";
|
import * as dd from "dingtalk-jsapi";
|
||||||
import DeviceListDetail from "./device-list-detail.vue";
|
import DeviceListDetail from "./device-list-detail.vue";
|
||||||
|
import DeviceListAdd from "./device-list-add.vue";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
DeviceListDetail,
|
DeviceListDetail,
|
||||||
|
DeviceListAdd,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isShowSearch: true,
|
isShowSearch: true,
|
||||||
|
isShowAdd: true,
|
||||||
data: [],
|
data: [],
|
||||||
types: [],
|
types: [],
|
||||||
brands: [],
|
brands: [],
|
||||||
@ -251,40 +261,13 @@ export default {
|
|||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
},
|
},
|
||||||
clearGet() {
|
addNew() {
|
||||||
this.specReq.page = 1
|
setTimeout(() => {
|
||||||
this.specReq.sort = null
|
this.$refs.deviceListAdd.init(null, this.types, this.brands);
|
||||||
this.specReq.order = null
|
}, 500);
|
||||||
this.specReq.id = null
|
this.isShowDetail = true;
|
||||||
this.specReq.gmtCreate = null
|
|
||||||
this.specReq.gmtModified = null
|
|
||||||
this.specReq.specType = null
|
|
||||||
this.specReq.type = null
|
|
||||||
this.specReq.num = null
|
|
||||||
this.specReq.qr = null
|
|
||||||
this.specReq.unit = null
|
|
||||||
this.specReq.user = null
|
|
||||||
this.specReq.owner = null
|
|
||||||
this.specReq.originalCode = null
|
|
||||||
this.specReq.code = null
|
|
||||||
this.specReq.mark = null
|
|
||||||
this.specReq.gmtOutbound = null
|
|
||||||
this.specReq.gmtInbound = null
|
|
||||||
this.specReq.equipmentState = null
|
|
||||||
this.specReq.buyAmount = null
|
|
||||||
this.specReq.saleAmount = null
|
|
||||||
this.specReq.no = null
|
|
||||||
this.specReq.brandId = null
|
|
||||||
this.specReq.typeId = null
|
|
||||||
this.specReq.gmtInStartTime = null
|
|
||||||
this.specReq.gmtInEndTime = null
|
|
||||||
this.specReq.gmtOutStartTime = null
|
|
||||||
this.specReq.gmtOutEndTime = null
|
|
||||||
this.specReq.other = null
|
|
||||||
this.inTime = null
|
|
||||||
this.outTime = null
|
|
||||||
this.getData()
|
|
||||||
},
|
},
|
||||||
|
|
||||||
changeOutData(val) {
|
changeOutData(val) {
|
||||||
console.log(val)
|
console.log(val)
|
||||||
if(val){
|
if(val){
|
||||||
@ -295,8 +278,7 @@ export default {
|
|||||||
this.specReq.gmtOutEndTime = null
|
this.specReq.gmtOutEndTime = null
|
||||||
}
|
}
|
||||||
|
|
||||||
this.specReq.page = 1
|
this.btnSearch()
|
||||||
this.getData()
|
|
||||||
},
|
},
|
||||||
changeInData(val) {
|
changeInData(val) {
|
||||||
console.log(val)
|
console.log(val)
|
||||||
@ -308,8 +290,7 @@ export default {
|
|||||||
this.specReq.gmtInEndTime = null
|
this.specReq.gmtInEndTime = null
|
||||||
}
|
}
|
||||||
|
|
||||||
this.specReq.page = 1
|
this.btnSearch()
|
||||||
this.getData()
|
|
||||||
},
|
},
|
||||||
changeDepartment(type) {
|
changeDepartment(type) {
|
||||||
this.specReq.page = 1;
|
this.specReq.page = 1;
|
||||||
@ -318,17 +299,46 @@ export default {
|
|||||||
this.getBrands();
|
this.getBrands();
|
||||||
this.specReq.brandId = null;
|
this.specReq.brandId = null;
|
||||||
} else {
|
} else {
|
||||||
this.getData();
|
this.btnSearch()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sizeChangeHandle(val) {
|
sizeChangeHandle(val) {
|
||||||
this.specReq.page = 1;
|
|
||||||
this.specReq.rows = val;
|
this.specReq.rows = val;
|
||||||
this.getData();
|
this.btnSearch()
|
||||||
|
},
|
||||||
|
getData() {
|
||||||
|
console.log("获取数据");
|
||||||
|
console.log(this.name);
|
||||||
|
console.log(this.categorys);
|
||||||
|
this.dataListLoading = true;
|
||||||
|
apiGetUseDeviceList(this.specReq).then((data) => {
|
||||||
|
console.log(data);
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.data = data.rows;
|
||||||
|
this.totalPage = data.total;
|
||||||
|
this.types = data.types;
|
||||||
|
this.tCounts = data.tCounts;
|
||||||
|
this.specReq.count = data.curCount;
|
||||||
|
} else {
|
||||||
|
this.data = [];
|
||||||
|
}
|
||||||
|
this.dataListLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getBrands() {
|
||||||
|
apiGetDeviceBrands(this.specReq).then((data) => {
|
||||||
|
console.log(data);
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.brands = data.brands;
|
||||||
|
this.btnSearch()
|
||||||
|
} else {
|
||||||
|
this.brands = [];
|
||||||
|
}
|
||||||
|
this.dataListLoading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
currentChangeHandle(val) {
|
currentChangeHandle(val) {
|
||||||
this.specReq.page = val;
|
this.btnSearch()
|
||||||
this.getData();
|
|
||||||
},
|
},
|
||||||
// 新增 / 编辑
|
// 新增 / 编辑
|
||||||
handleAddOrUpdate(val) {
|
handleAddOrUpdate(val) {
|
||||||
@ -410,38 +420,43 @@ export default {
|
|||||||
this.dataListLoading = false;
|
this.dataListLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getData() {
|
clearGet() {
|
||||||
console.log("获取数据");
|
this.specReq.page = 1
|
||||||
console.log(this.name);
|
this.specReq.sort = null
|
||||||
console.log(this.categorys);
|
this.specReq.order = null
|
||||||
this.dataListLoading = true;
|
this.specReq.id = null
|
||||||
apiGetUseDeviceList(this.specReq).then((data) => {
|
this.specReq.gmtCreate = null
|
||||||
console.log(data);
|
this.specReq.gmtModified = null
|
||||||
if (data && data.code === 0) {
|
this.specReq.specType = null
|
||||||
this.data = data.rows;
|
this.specReq.type = null
|
||||||
this.totalPage = data.total;
|
this.specReq.num = null
|
||||||
this.types = data.types;
|
this.specReq.qr = null
|
||||||
this.tCounts = data.tCounts;
|
this.specReq.unit = null
|
||||||
this.specReq.count = data.curCount;
|
this.specReq.user = null
|
||||||
} else {
|
this.specReq.owner = null
|
||||||
this.data = [];
|
this.specReq.originalCode = null
|
||||||
}
|
this.specReq.code = null
|
||||||
this.dataListLoading = false;
|
this.specReq.mark = null
|
||||||
});
|
this.specReq.gmtOutbound = null
|
||||||
},
|
this.specReq.gmtInbound = null
|
||||||
getBrands() {
|
this.specReq.equipmentState = null
|
||||||
apiGetDeviceBrands(this.specReq).then((data) => {
|
this.specReq.buyAmount = null
|
||||||
console.log(data);
|
this.specReq.saleAmount = null
|
||||||
if (data && data.code === 0) {
|
this.specReq.no = null
|
||||||
this.brands = data.brands;
|
this.specReq.brandId = null
|
||||||
this.getData();
|
this.specReq.typeId = null
|
||||||
} else {
|
this.specReq.gmtInStartTime = null
|
||||||
this.brands = [];
|
this.specReq.gmtInEndTime = null
|
||||||
}
|
this.specReq.gmtOutStartTime = null
|
||||||
this.dataListLoading = false;
|
this.specReq.gmtOutEndTime = null
|
||||||
});
|
this.specReq.other = null
|
||||||
|
this.inTime = null
|
||||||
|
this.outTime = null
|
||||||
|
this.getData()
|
||||||
},
|
},
|
||||||
|
|
||||||
btnSearch() {
|
btnSearch() {
|
||||||
|
this.specReq.page = 1
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
237
src/views/modules/device-manage/device-onecode.vue
Normal file
237
src/views/modules/device-manage/device-onecode.vue
Normal file
@ -0,0 +1,237 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||||
|
|
||||||
|
<el-form-item label="打印状态">
|
||||||
|
<el-select
|
||||||
|
v-model="specReq.isPrint"
|
||||||
|
:disabled="departmentReaderOnly"
|
||||||
|
@change="changeDepartment()"
|
||||||
|
>
|
||||||
|
<el-option v-for="item in stateList" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="编码">
|
||||||
|
<el-input v-model="specReq.code" placeholder="请输入编码" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="getData()">查询</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="新打印数量">
|
||||||
|
<el-input v-model="newCount" placeholder="请输入要新打印机编码数量" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="success" @click="printNewCodes()">新打印</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table v-loading="dataListLoading" :data="data" style="width: 100%" @row-click="rowClick">
|
||||||
|
<el-table-column prop="id" header-align="center" align="center" label="ID"></el-table-column>
|
||||||
|
<el-table-column prop="code" header-align="center" align="center" label="编码"></el-table-column>
|
||||||
|
<el-table-column prop="isPrint" header-align="center" align="center" label="是否打印">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="conatnt-name">
|
||||||
|
<span>{{ getStatusStr(scope.row.isPrint) }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column fixed="right" header-align="center" align="center" width="180" label="操作">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
@click="handlePrint(scope.row)"
|
||||||
|
>重新打印
|
||||||
|
</el-button>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination
|
||||||
|
@size-change="sizeChangeHandle"
|
||||||
|
@current-change="currentChangeHandle"
|
||||||
|
:current-page="specReq.page"
|
||||||
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
|
:page-size="specReq.rows"
|
||||||
|
:total="totalPage"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
></el-pagination>
|
||||||
|
<device-type-detail v-if="isShowDetail" ref="deviceTypeDetail" @refreshDataList="getData"></device-type-detail>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { apiGetNewPrintCodes, apiGetCodes, apiGetRePrintCode } from "@/api/api_equipment";
|
||||||
|
import DeviceTypeDetail from './device-type-detail.vue'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
DeviceTypeDetail
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
|
||||||
|
return {
|
||||||
|
isShowSearch: true,
|
||||||
|
data: [],
|
||||||
|
dataListLoading: false,
|
||||||
|
newCount: null,
|
||||||
|
showHeader: false,
|
||||||
|
totalPage: 1,
|
||||||
|
departmentReaderOnly: false,
|
||||||
|
specReq: {
|
||||||
|
page: 1,
|
||||||
|
rows: 10,
|
||||||
|
id: null,
|
||||||
|
isDelete: 0,
|
||||||
|
isPrint: null,
|
||||||
|
gmtCreate: null,
|
||||||
|
gmtModified: null,
|
||||||
|
code: null,
|
||||||
|
},
|
||||||
|
stateList:[
|
||||||
|
{value: null, label: '全部'},
|
||||||
|
{value: 0, label: '未打印'},
|
||||||
|
{value: 1, label: '已打印'},
|
||||||
|
],
|
||||||
|
isShowDetail: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// this.handleGetImgCaptcha()
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
printNewCodes(){
|
||||||
|
if(!this.newCount || this.newCount == 0){
|
||||||
|
this.$message.error('请输入大于0的打印数量')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
apiGetNewPrintCodes({}, this.newCount).then((data) => {
|
||||||
|
console.log(data);
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.getData()
|
||||||
|
this.$message("发送打印请求成功");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.$message.error("发送打印请求失败!" + data.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
changeDepartment(){
|
||||||
|
this.specReq.page = 1;
|
||||||
|
this.getData()
|
||||||
|
},
|
||||||
|
sizeChangeHandle(val) {
|
||||||
|
this.specReq.page = 1
|
||||||
|
this.specReq.rows = val
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
currentChangeHandle(val) {
|
||||||
|
this.specReq.page = val
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
getStatusStr(status) {
|
||||||
|
if (status < 2) {
|
||||||
|
return this.stateList[status + 1].label;
|
||||||
|
}
|
||||||
|
return status;
|
||||||
|
},
|
||||||
|
handlePrint(val) {
|
||||||
|
apiGetRePrintCode({}, val.code).then((data) => {
|
||||||
|
console.log(data);
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.getData()
|
||||||
|
this.$message("发送打印请求成功");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.$message.error("发送打印请求失败!" + data.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
getData() {
|
||||||
|
console.log("获取数据")
|
||||||
|
console.log(this.name)
|
||||||
|
console.log(this.categorys)
|
||||||
|
this.dataListLoading = true
|
||||||
|
apiGetCodes(this.specReq).then((data) => {
|
||||||
|
console.log(data);
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.data = data.codes.list;
|
||||||
|
this.totalPage = data.codes.totalCount
|
||||||
|
} else {
|
||||||
|
this.data = [];
|
||||||
|
}
|
||||||
|
this.dataListLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
btnSearch() {
|
||||||
|
this.specReq.page = 1
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
|
||||||
|
rowClick(row, event, column) {},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.el-row {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.el-col {
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
.bg-purple-dark {
|
||||||
|
background: #99a9bf;
|
||||||
|
}
|
||||||
|
.bg-purple {
|
||||||
|
background: #d3dce6;
|
||||||
|
}
|
||||||
|
.bg-purple-light {
|
||||||
|
background: #e5f2f1;
|
||||||
|
}
|
||||||
|
.grid-content {
|
||||||
|
border-radius: 4px;
|
||||||
|
min-height: 36px;
|
||||||
|
}
|
||||||
|
.row-bg {
|
||||||
|
padding: 10px 0;
|
||||||
|
background-color: #f9fafc;
|
||||||
|
}
|
||||||
|
.div_height {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
.div_width {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.width_100 {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
.center {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
|
||||||
|
padding: 1em;
|
||||||
|
}
|
||||||
|
.flex {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border: 1px solid;
|
||||||
|
}
|
||||||
|
.flex_son {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border: 0x solid;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -46,8 +46,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="warning" @click="save">取消</el-button>
|
<el-button type="warning" @click="save(0)">取消</el-button>
|
||||||
<el-button type="primary" @click="save">保存</el-button>
|
<el-button type="primary" @click="save(1)">保存</el-button>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -150,7 +150,11 @@ export default {
|
|||||||
this.dataListLoading = false;
|
this.dataListLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
save(){
|
save(val){
|
||||||
|
if(val == 0){
|
||||||
|
this.visible = false
|
||||||
|
return
|
||||||
|
}
|
||||||
if(this.specReq.typeId == null){
|
if(this.specReq.typeId == null){
|
||||||
this.$message.error('请选择类型')
|
this.$message.error('请选择类型')
|
||||||
return
|
return
|
||||||
|
|||||||
@ -28,15 +28,14 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getData()">查询</el-button>
|
<el-button type="primary" @click="getData()">查询</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="addNewSpec()">新增规格</el-button>
|
<el-button type="success" @click="addNewSpec()">新增规格</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-table v-loading="dataListLoading" :data="data" style="width: 100%" @row-click="rowClick">
|
<el-table v-loading="dataListLoading" :data="data" style="width: 100%" @row-click="rowClick">
|
||||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
|
||||||
<el-table-column prop="id" header-align="center" align="center" label="ID"></el-table-column>
|
<el-table-column prop="id" header-align="center" align="center" label="ID"></el-table-column>
|
||||||
<el-table-column prop="type" header-align="center" align="center" label="类型"></el-table-column>
|
<el-table-column prop="type" header-align="center" align="center" label="类型"></el-table-column>
|
||||||
<el-table-column prop="brand" header-align="center" align="center" label="品牌"></el-table-column>
|
<el-table-column prop="brand" header-align="center" align="center" label="品牌"></el-table-column>
|
||||||
@ -142,6 +141,7 @@ export default {
|
|||||||
this.getBrands()
|
this.getBrands()
|
||||||
this.specReq.brandId = null
|
this.specReq.brandId = null
|
||||||
}else{
|
}else{
|
||||||
|
this.specReq.page = 1
|
||||||
this.getData()
|
this.getData()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -224,6 +224,7 @@ export default {
|
|||||||
console.log(data);
|
console.log(data);
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
this.brands = data.brands
|
this.brands = data.brands
|
||||||
|
this.specReq.page = 1
|
||||||
this.getData()
|
this.getData()
|
||||||
} else {
|
} else {
|
||||||
this.brands = [];
|
this.brands = [];
|
||||||
@ -232,6 +233,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
btnSearch() {
|
btnSearch() {
|
||||||
|
this.specReq.page = 1
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="!id ? '新增规格' : '编辑规格'" :close-on-click-modal="false" :visible.sync="visible"
|
<el-dialog :title="!id ? '新增类型' : '编辑类型'" :close-on-click-modal="false" :visible.sync="visible"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
||||||
@ -12,8 +12,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="warning" @click="save">取消</el-button>
|
<el-button type="warning" @click="save(0)">取消</el-button>
|
||||||
<el-button type="primary" @click="save">保存</el-button>
|
<el-button type="primary" @click="save(1)">保存</el-button>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -74,7 +74,11 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
save(){
|
save(val){
|
||||||
|
if(val == 0){
|
||||||
|
this.visible = false
|
||||||
|
return
|
||||||
|
}
|
||||||
if(!this.type || this.type.length == 0){
|
if(!this.type || this.type.length == 0){
|
||||||
this.$message.error('请输入类型名称')
|
this.$message.error('请输入类型名称')
|
||||||
return
|
return
|
||||||
|
|||||||
@ -8,15 +8,14 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getData()">查询</el-button>
|
<el-button type="primary" @click="getData()">查询</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="addNewSpec()">新增类型</el-button>
|
<el-button type="success" @click="addNewSpec()">新增类型</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-table v-loading="dataListLoading" :data="data" style="width: 100%" @row-click="rowClick">
|
<el-table v-loading="dataListLoading" :data="data" style="width: 100%" @row-click="rowClick">
|
||||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
|
||||||
<el-table-column prop="id" header-align="center" align="center" label="ID"></el-table-column>
|
<el-table-column prop="id" header-align="center" align="center" label="ID"></el-table-column>
|
||||||
<el-table-column prop="type" header-align="center" align="center" label="类型"></el-table-column>
|
<el-table-column prop="type" header-align="center" align="center" label="类型"></el-table-column>
|
||||||
<el-table-column prop="rank" header-align="center" align="center" label="排序"></el-table-column>
|
<el-table-column prop="rank" header-align="center" align="center" label="排序"></el-table-column>
|
||||||
@ -109,6 +108,7 @@ export default {
|
|||||||
this.getBrands()
|
this.getBrands()
|
||||||
this.specReq.brandId = null
|
this.specReq.brandId = null
|
||||||
}else{
|
}else{
|
||||||
|
this.specReq.page = 1
|
||||||
this.getData()
|
this.getData()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -187,6 +187,7 @@ export default {
|
|||||||
console.log(data);
|
console.log(data);
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
this.brands = data.brands
|
this.brands = data.brands
|
||||||
|
this.specReq.page = 1
|
||||||
this.getData()
|
this.getData()
|
||||||
} else {
|
} else {
|
||||||
this.brands = [];
|
this.brands = [];
|
||||||
@ -195,6 +196,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
btnSearch() {
|
btnSearch() {
|
||||||
|
this.specReq.page = 1
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user