增加盘点次数管理
This commit is contained in:
parent
725aa52386
commit
84fe8c1510
@ -130,3 +130,18 @@ export const apiGetCodes = data => {
|
||||
return http({ url: `/lz_management/oneCode/get/getPrints`, method: 'post', data })
|
||||
}
|
||||
|
||||
// 获取盘点次数
|
||||
export const apiGetTCounts = data => {
|
||||
return http({ url: `/lz_management/modules/count/tCountList`, method: 'post', data })
|
||||
}
|
||||
|
||||
// 新增盘点次数
|
||||
export const apiAddTCounts = () => {
|
||||
return http({ url: `/lz_management/modules/count/newStart`, method: 'get', })
|
||||
}
|
||||
|
||||
// 删除盘点次数
|
||||
export const apiDelTCounts = data => {
|
||||
return http({ url: `/lz_management/modules/count/tCountDelete`, method: 'post', data })
|
||||
}
|
||||
|
||||
|
||||
@ -129,7 +129,7 @@ export default {
|
||||
this.$message('添加成功')
|
||||
this.$emit('refreshDataList')
|
||||
} else {
|
||||
this.$$message.error(data.msg)
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@ -140,7 +140,7 @@ export default {
|
||||
this.$message('更新成功')
|
||||
this.$emit('refreshDataList')
|
||||
} else {
|
||||
this.$$message.error(data.msg)
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -203,7 +203,7 @@ export default {
|
||||
this.$message("更新成功");
|
||||
this.$emit("refreshDataList");
|
||||
} else {
|
||||
this.$$message.error(data.msg);
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@ -198,7 +198,7 @@ export default {
|
||||
this.$message('添加成功')
|
||||
this.$emit('refreshDataList')
|
||||
} else {
|
||||
this.$$message.error(data.msg)
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@ -209,7 +209,7 @@ export default {
|
||||
this.$message('更新成功')
|
||||
this.$emit('refreshDataList')
|
||||
} else {
|
||||
this.$$message.error(data.msg)
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
226
src/views/modules/device-manage/device-tcounts.vue
Normal file
226
src/views/modules/device-manage/device-tcounts.vue
Normal file
@ -0,0 +1,226 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="success" @click="addNewSpec()">新增一次盘点</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="num" header-align="center" align="center" label="第几次盘点"></el-table-column>
|
||||
<el-table-column prop="gmtCreate" header-align="center" align="center" label="创建时间"></el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="100" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="handleDelete(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 { apiGetTCounts, apiAddTCounts, apiDelTCounts } from "@/api/api_equipment";
|
||||
import DeviceTypeDetail from './device-type-detail.vue'
|
||||
export default {
|
||||
components: {
|
||||
DeviceTypeDetail
|
||||
},
|
||||
data() {
|
||||
|
||||
return {
|
||||
isShowSearch: true,
|
||||
data: [],
|
||||
name: "",
|
||||
categorys: "",
|
||||
input: "",
|
||||
dataListLoading: false,
|
||||
typeIndex: 0, //0现在是1级 1二级2三级
|
||||
showHeader: false,
|
||||
totalPage: 1,
|
||||
departmentReaderOnly: false,
|
||||
specReq: {
|
||||
page: 1,
|
||||
rows: 10,
|
||||
sort: null,
|
||||
order: null,
|
||||
id: null,
|
||||
isDelete: 0,
|
||||
gmtCreate: null,
|
||||
gmtModified: null,
|
||||
count: null
|
||||
},
|
||||
isShowDetail: false
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.handleGetImgCaptcha()
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
addNewSpec(){
|
||||
apiAddTCounts().then((data) =>{
|
||||
if(data.code == 0){
|
||||
this.$message(data.msg)
|
||||
this.specReq.page = 1
|
||||
this.getData()
|
||||
}else{
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
changeDepartment(type) {
|
||||
if(type == 1){
|
||||
//获取品牌
|
||||
this.getBrands()
|
||||
this.specReq.brandId = null
|
||||
}else{
|
||||
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();
|
||||
},
|
||||
|
||||
// 删除
|
||||
handleDelete (val) {
|
||||
|
||||
this.$confirm('确定删除第“' + val.num + '”次盘点吗?删除后该类型将无法使用。如果该次盘点有盘点记录,将无法删除成功', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.delTCount(val.id)
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
delTCount(id){
|
||||
apiDelTCounts({page: 1,
|
||||
rows: 10,
|
||||
sort: null,
|
||||
order: null,
|
||||
id: id,
|
||||
isDelete: 0,
|
||||
gmtCreate: null,
|
||||
gmtModified: null,
|
||||
count:null
|
||||
}).then((data) => {
|
||||
console.log(data);
|
||||
if (data && data.code === 0) {
|
||||
this.$message('删除成功')
|
||||
this.getData()
|
||||
} else {
|
||||
this.$message.error('删除失败' + data.msg)
|
||||
}
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
console.log("获取数据")
|
||||
console.log(this.name)
|
||||
console.log(this.categorys)
|
||||
this.dataListLoading = true
|
||||
apiGetTCounts(this.specReq).then((data) => {
|
||||
console.log(data);
|
||||
if (data && data.code === 0) {
|
||||
this.data = data.rows.list;
|
||||
this.totalPage = data.rows.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>
|
||||
@ -102,7 +102,7 @@ export default {
|
||||
this.$message('添加成功')
|
||||
this.$emit('refreshDataList')
|
||||
} else {
|
||||
this.$$message.error(data.msg)
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@ -113,7 +113,7 @@ export default {
|
||||
this.$message('更新成功')
|
||||
this.$emit('refreshDataList')
|
||||
} else {
|
||||
this.$$message.error(data.msg)
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -391,7 +391,8 @@ export default {
|
||||
getDeviceInfo() {
|
||||
this.dataListLoading = true;
|
||||
apiFindEquipmentByCode({}, this.deviceInfo.code).then((data) => {
|
||||
console.log(data.data);
|
||||
console.log(data);
|
||||
|
||||
if (data.code == 0) {
|
||||
if (typeof data.data == "undefined") {
|
||||
this.$message("未绑定设备");
|
||||
@ -445,7 +446,7 @@ export default {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$message.error("异常");
|
||||
this.$message.error("异常" + data.msg);
|
||||
}
|
||||
|
||||
this.dataListLoading = false;
|
||||
|
||||
@ -75,6 +75,10 @@ export default {
|
||||
if(this.typeIndex == 0 || this.typeIndex == 3){
|
||||
apiFindStaff(this.query).then(data => {
|
||||
console.log(data)
|
||||
if(data.code != 0){
|
||||
this.$message.error("异常" + data.msg);
|
||||
return
|
||||
}
|
||||
if(typeof data.data == 'undefined'){
|
||||
}else{
|
||||
this.query.currPage = data.data.currPage
|
||||
@ -86,6 +90,10 @@ export default {
|
||||
}else {
|
||||
apiFindDepat(this.query).then(data => {
|
||||
console.log(data)
|
||||
if(data.code != 0){
|
||||
this.$message.error("异常" + data.msg);
|
||||
return
|
||||
}
|
||||
if(typeof data.data == 'undefined'){
|
||||
}else{
|
||||
this.query.currPage = data.data.currPage
|
||||
|
||||
@ -70,8 +70,7 @@
|
||||
<el-radio :label="0">停用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form-item label="关联角色" size="mini" prop="roleIdList">
|
||||
<el-form-item label="关联角色" size="mini" prop="roleIdList">
|
||||
<el-checkbox-group v-model="dataForm.roleIdList">
|
||||
<el-checkbox
|
||||
v-for="role in roleList"
|
||||
@ -80,6 +79,8 @@
|
||||
>{{ role.roleName }}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="handleConfirm()">确定</el-button>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user