二维码管理对接
This commit is contained in:
parent
f289beb34b
commit
8c32e58b43
|
|
@ -22,9 +22,9 @@
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
@keyup.enter.native="handleQuery"/>
|
@keyup.enter.native="handleQuery"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="bindStatus">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.status"
|
v-model="queryParams.bindStatus"
|
||||||
placeholder="请选择状态"
|
placeholder="请选择状态"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table border :data="tableList" v-loading="loading" ref="multipleTable" @selection-change="handleSelectionChange" row-key="id">
|
<el-table border :data="tableList" v-loading="loading" ref="multipleTable" @selection-change="handleSelectionChange" row-key="qrId">
|
||||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"/>
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"/>
|
||||||
<el-table-column label="序号" align="center" type="index">
|
<el-table-column label="序号" align="center" type="index">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
@ -68,12 +68,12 @@
|
||||||
<dict-tag :options="dict.type.qr_box_type" :value="scope.row.boxType"/>
|
<dict-tag :options="dict.type.qr_box_type" :value="scope.row.boxType"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column label="生产厂家" align="center" prop="" show-overflow-tooltip/>
|
<el-table-column label="生产厂家" align="center" prop="supplierName" show-overflow-tooltip/>
|
||||||
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip/>
|
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip/>
|
||||||
<el-table-column label="状态" align="center" prop="status" show-overflow-tooltip>
|
<el-table-column label="状态" align="center" prop="bindStatus" show-overflow-tooltip>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.status==0">未绑定</span>
|
<span v-if="scope.row.bindStatus==0">未绑定</span>
|
||||||
<span v-if="scope.row.status==1">已绑定</span>
|
<span v-if="scope.row.bindStatus==1">已绑定</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="200">
|
<el-table-column label="操作" align="center" width="200">
|
||||||
|
|
@ -96,8 +96,8 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 二维码设备新增 -->
|
<!-- 二维码设备新增 -->
|
||||||
<el-dialog title="二维码新增" :visible.sync="open" width="600px" append-to-body>
|
<el-dialog title="二维码新增" :visible.sync="open" width="650px" append-to-body>
|
||||||
<el-form :model="dialogForm" ref="dialogForm" size="small" :rules="rules" label-width="120px">
|
<el-form :model="dialogForm" ref="dialogForm" size="small" :rules="rules" label-width="120px" style="min-height: 350px;">
|
||||||
<el-form-item label="物资类型" prop="maTypeId">
|
<el-form-item label="物资类型" prop="maTypeId">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dialogForm.maTypeName"
|
v-model="dialogForm.maTypeName"
|
||||||
|
|
@ -197,7 +197,7 @@ export default {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
status: '',
|
bindStatus: '',
|
||||||
endTime: '',
|
endTime: '',
|
||||||
keyWord: '',
|
keyWord: '',
|
||||||
startTime: '',
|
startTime: '',
|
||||||
|
|
@ -273,32 +273,9 @@ export default {
|
||||||
async getList() {
|
async getList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const res = await getQrCodeListApi(this.queryParams)
|
const res = await getQrCodeListApi(this.queryParams)
|
||||||
this.tableList = res.data.rows
|
this.tableList = res.rows
|
||||||
this.total = res.data.total
|
this.total = res.total
|
||||||
this.loading = false
|
this.loading = false
|
||||||
// if(this.queryParams.pageNum==1){
|
|
||||||
// this.tableList = [
|
|
||||||
// {id:"1",qrCode:"20211220-00001",maCode:"w241111-1001",typeName:"机动角磨",typeModelName:"CMJ-5",remark:'ceshi',status:"0"},
|
|
||||||
// {id:"2",qrCode:"20211220-00002",maCode:"w241111-1002",typeName:"机动角磨",typeModelName:"CMJ-5",remark:'ceshi',status:"1"},
|
|
||||||
// {id:"3",qrCode:"20211220-00003",maCode:"w241111-1003",typeName:"机动角磨",typeModelName:"CMJ-5",remark:'ceshi',status:"0"},
|
|
||||||
// {id:"4",qrCode:"20211220-00004",maCode:"w241111-1004",typeName:"机动角磨",typeModelName:"CMJ-5",remark:'ceshi',status:"1"},
|
|
||||||
// {id:"5",qrCode:"20211220-00005",maCode:"w241111-1001",typeName:"机动角磨",typeModelName:"CMJ-5",remark:'ceshi',status:"0"},
|
|
||||||
// {id:"6",qrCode:"20211220-00006",maCode:"w241111-1002",typeName:"机动角磨",typeModelName:"CMJ-5",remark:'ceshi',status:"1"},
|
|
||||||
// {id:"7",qrCode:"20211220-00007",maCode:"w241111-1003",typeName:"机动角磨",typeModelName:"CMJ-5",remark:'ceshi',status:"0"},
|
|
||||||
// {id:"8",qrCode:"20211220-00008",maCode:"w241111-1004",typeName:"机动角磨",typeModelName:"CMJ-5",remark:'ceshi',status:"1"},
|
|
||||||
// {id:"9",qrCode:"20211220-00000",maCode:"w241111-1001",typeName:"机动角磨",typeModelName:"CMJ-5",remark:'ceshi',status:"0"},
|
|
||||||
// {id:"10",qrCode:"20211220-000010",maCode:"w241111-1002",typeName:"机动角磨",typeModelName:"CMJ-5",remark:'ceshi',status:"1"},
|
|
||||||
// ]
|
|
||||||
// this.total = 14
|
|
||||||
// }else{
|
|
||||||
// this.tableList = [
|
|
||||||
// {id:"11",qrCode:"20211220-000011",maCode:"w241111-1001",typeName:"机动角磨",typeModelName:"CMJ-5",remark:'ceshi',status:"0"},
|
|
||||||
// {id:"12",qrCode:"20211220-000012",maCode:"w241111-1002",typeName:"机动角磨",typeModelName:"CMJ-5",remark:'ceshi',status:"1"},
|
|
||||||
// {id:"13",qrCode:"20211220-000013",maCode:"w241111-1003",typeName:"机动角磨",typeModelName:"CMJ-5",remark:'ceshi',status:"0"},
|
|
||||||
// {id:"14",qrCode:"20211220-000014",maCode:"w241111-1004",typeName:"机动角磨",typeModelName:"CMJ-5",remark:'ceshi',status:"1"},
|
|
||||||
// ]
|
|
||||||
// this.total = 14
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
// 搜索按钮
|
// 搜索按钮
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
|
|
@ -372,20 +349,17 @@ export default {
|
||||||
},
|
},
|
||||||
/** 机具类型 */
|
/** 机具类型 */
|
||||||
equipmentType() {
|
equipmentType() {
|
||||||
equipmentTypeTree().then((response) => {
|
equipmentTypeTree({manageType:"0"}).then((response) => {//只查编码类型
|
||||||
this.equipmentTypeList = response.data;
|
this.equipmentTypeList = response.data;
|
||||||
this.equipmentTypeList.forEach((item, index) => {
|
this.equipmentTypeList.forEach((item, index) => {
|
||||||
if (item.children && item.children.length > 0) {
|
if (item.children && item.children.length > 0) {
|
||||||
item.children.forEach((item2, index2) => {
|
item.children.forEach((item2, index2) => {
|
||||||
if (item2.children && item2.children.length > 0) {
|
if (item2.children && item2.children.length > 0) {
|
||||||
item2.children.forEach((item3) => {
|
item2.children.forEach((item3) => {
|
||||||
if (
|
if (item3.children && item3.children.length > 0) {
|
||||||
item3.children &&
|
item3.children.forEach((item4,index4) => {
|
||||||
item3.children.length > 0
|
item4.maTypeName = item3.typeName
|
||||||
) {
|
item4.maTypeId = item3.typeId
|
||||||
item3.children.forEach((item4) => {
|
|
||||||
item4.maTypeName = item3.typeName
|
|
||||||
item4.maTypeId = item3.typeId
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -455,7 +429,8 @@ export default {
|
||||||
console.log(this.dialogForm)
|
console.log(this.dialogForm)
|
||||||
const res = await addQrCodeApi(this.dialogForm)
|
const res = await addQrCodeApi(this.dialogForm)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.$message({ type: 'success', message: res.msg })
|
this.$message({ type: 'success', message: "新增成功" })
|
||||||
|
this.open=true;
|
||||||
this.resetQuery()
|
this.resetQuery()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -466,12 +441,13 @@ export default {
|
||||||
console.log('数据导出')
|
console.log('数据导出')
|
||||||
console.log(this.selectList)
|
console.log(this.selectList)
|
||||||
downloadQrCodesApi({qrIds:this.selectList}).then(res => {
|
downloadQrCodesApi({qrIds:this.selectList}).then(res => {
|
||||||
downloadFile({ fileName: `二维码_${new Date().getTime()}.zip`, fileData: res, fileType: 'application/zip;charset=utf-8' })
|
downloadFile({ fileName: `二维码_${new Date().getTime()}.zip`, fileData: res, fileType: 'application/zip;charset=utf-8' })
|
||||||
|
this.$refs.multipleTable.clearSelection();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 列表复选框
|
// 列表复选框
|
||||||
handleSelectionChange(validSelection) {
|
handleSelectionChange(validSelection) {
|
||||||
this.selectList = validSelection.map(item=>item.id);
|
this.selectList = validSelection.map(item=>item.qrId);
|
||||||
this.single = validSelection.length !== 1;
|
this.single = validSelection.length !== 1;
|
||||||
this.multiple = !validSelection.length;
|
this.multiple = !validSelection.length;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -646,7 +646,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<div style="font-weight: 600;">
|
<div style="font-weight: 600;">
|
||||||
物资名称: {{ typeTemp }}
|
规格型号: {{ typeTemp }}
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue