提交个必

This commit is contained in:
quyixiao 2020-09-29 17:34:33 +08:00
parent 8e3f550457
commit 1567ef9e12
2 changed files with 187 additions and 155 deletions

View File

@ -63,8 +63,9 @@
</div>
</template>
<script>
import { apiGetNewPrintCodes, apiGetCodes, apiGetRePrintCode } from "@/api/api_equipment";
import {apiGetNewPrintCodes, apiGetCodes, apiGetRePrintCode} from '@/api/api_equipment'
import DeviceTypeDetail from './device-type-detail.vue'
export default {
components: {
DeviceTypeDetail
@ -95,14 +96,14 @@ export default {
{value: 1, label: '已打印'},
],
isShowDetail: false
};
}
},
created () {
// this.handleGetImgCaptcha()
},
mounted () {
this.getData();
this.getData()
},
methods: {
printNewCodes () {
@ -111,108 +112,118 @@ export default {
return
}
apiGetNewPrintCodes({}, this.newCount).then((data) => {
console.log(data);
console.log(data)
if (data && data.code === 0) {
this.getData()
this.$message("发送打印请求成功");
this.$message('发送打印请求成功')
} else {
this.$message.error("发送打印请求失败!" + data.msg);
this.$message.error('发送打印请求失败!' + data.msg)
}
});
})
},
changeDepartment () {
this.specReq.page = 1;
this.specReq.page = 1
this.getData()
},
sizeChangeHandle (val) {
this.specReq.page = 1
this.specReq.rows = val
this.getData();
this.getData()
},
currentChangeHandle (val) {
this.specReq.page = val
this.getData();
this.getData()
},
getStatusStr (status) {
if (status < 2) {
return this.stateList[status + 1].label;
return this.stateList[status + 1].label
}
return status;
return status
},
handlePrint (val) {
apiGetRePrintCode({}, val.code).then((data) => {
console.log(data);
console.log(data)
if (data && data.code === 0) {
this.getData()
this.$message("发送打印请求成功");
this.$message('发送打印请求成功')
} else {
this.$message.error("发送打印请求失败!" + data.msg);
this.$message.error('发送打印请求失败!' + data.msg)
}
});
})
},
getData () {
console.log("获取数据")
console.log('获取数据')
console.log(this.name)
console.log(this.categorys)
this.dataListLoading = true
apiGetCodes(this.specReq).then((data) => {
console.log(data);
console.log(data)
if (data && data.code === 0) {
this.data = data.codes.list;
this.data = data.codes.list
this.totalPage = data.codes.totalCount
} else {
this.data = [];
this.data = []
}
this.dataListLoading = false;
});
this.dataListLoading = false
})
},
btnSearch () {
this.specReq.page = 1
this.getData();
this.getData()
},
rowClick(row, event, column) {},
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%;
@ -221,6 +232,7 @@ export default {
padding: 1em;
}
.flex {
display: flex;
align-items: center;
@ -229,6 +241,7 @@ export default {
height: 100%;
border: 1px solid;
}
.flex_son {
width: 100%;
height: 100%;

View File

@ -1,9 +1,15 @@
<template>
<div>
<el-row>
<el-col :span="20"><div class="grid-content flex"><el-input v-model="qr" placeholder="请输入编码"></el-input></div>
<el-col :span="20">
<div class="grid-content flex">
<el-input v-model="qr" placeholder="请输入编码"></el-input>
</div>
</el-col>
<el-col :span="4"><div class="grid-content bg-purple-light"><el-button type="success" class="div_width div_height" @click="goScan">扫码</el-button></div>
<el-col :span="4">
<div class="grid-content bg-purple-light">
<el-button type="success" class="div_width div_height" @click="goScan">扫码</el-button>
</div>
</el-col>
</el-row>
<el-button type="primary" class="div_width" @click="btnSave">确定</el-button>
@ -11,6 +17,7 @@
</template>>
<script>
import * as dd from 'dingtalk-jsapi'
export default {
data () {
return {
@ -24,7 +31,6 @@ export default {
mounted () {
this.qr = this.$cookie.get('devQr')
},
methods: {
@ -58,35 +64,45 @@ export default {
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%;
@ -95,6 +111,7 @@ export default {
padding: 1em;
}
.flex {
display: flex;
align-items: center;
@ -103,11 +120,13 @@ export default {
height: 100%;
border: 1px solid;
}
.flex_son {
width: 100%;
height: 100%;
border: 0x solid;
}
.zero_size {
width: 1px;
height: 1px;