|
@@ -1,6 +1,6 @@
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<div class="con" v-loading.fullscreen.lock="loading">
|
|
<div class="con" v-loading.fullscreen.lock="loading">
|
|
- <el-dialog width="470px" title="添加相机" :visible.sync="cameraVisible">
|
|
|
|
|
|
+ <el-dialog width="470px" title="添加相机" :visible.sync="cameraVisible" :show-close="false" :close-on-click-modal="false">
|
|
<el-form label-width="80px" :rules="rules" :model="ruleForm">
|
|
<el-form label-width="80px" :rules="rules" :model="ruleForm">
|
|
<el-form-item label="出库类型" prop="own">
|
|
<el-form-item label="出库类型" prop="own">
|
|
<el-select v-model="ruleForm.own" placeholder="请选择出库类型">
|
|
<el-select v-model="ruleForm.own" placeholder="请选择出库类型">
|
|
@@ -10,10 +10,10 @@
|
|
<el-option label="其他" value="3"></el-option>
|
|
<el-option label="其他" value="3"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="相机类型" prop="type">
|
|
|
|
- <el-select v-model="ruleForm.type" placeholder="请选择相机类型">
|
|
|
|
- <el-option label="四维看看Pro八目相机" value="1"></el-option>
|
|
|
|
- <el-option label="四维看看Lite双目相机" value="0"></el-option>
|
|
|
|
|
|
+ <el-form-item label="相机类型" prop="cameraType">
|
|
|
|
+ <el-select v-model="ruleForm.cameraType" placeholder="请选择相机类型">
|
|
|
|
+ <el-option label="四维看看Pro八目相机" value="4"></el-option>
|
|
|
|
+ <el-option label="四维看看Lite双目相机" value="1"></el-option>
|
|
<el-option label="四维看看双目转台相机" value="9"></el-option>
|
|
<el-option label="四维看看双目转台相机" value="9"></el-option>
|
|
<el-option label="四维看看激光相机" value="10"></el-option>
|
|
<el-option label="四维看看激光相机" value="10"></el-option>
|
|
<el-option label="第三方相机" value="6"></el-option>
|
|
<el-option label="第三方相机" value="6"></el-option>
|
|
@@ -22,15 +22,15 @@
|
|
<el-form-item label="设备ID" prop="childName">
|
|
<el-form-item label="设备ID" prop="childName">
|
|
<el-input v-model="ruleForm.childName"></el-input>
|
|
<el-input v-model="ruleForm.childName"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="wifi名称" prop="wifi">
|
|
|
|
- <el-input v-model="ruleForm.wifi"></el-input>
|
|
|
|
|
|
+ <el-form-item label="wifi名称" prop="wifiName">
|
|
|
|
+ <el-input v-model="ruleForm.wifiName"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="物理地址" prop="address">
|
|
<el-form-item label="物理地址" prop="address">
|
|
<el-input v-model="ruleForm.address"></el-input>
|
|
<el-input v-model="ruleForm.address"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item
|
|
<el-form-item
|
|
- v-if="ruleForm.type != '' && ruleForm.type != 6"
|
|
|
|
- label="* sn码"
|
|
|
|
|
|
+ v-if="ruleForm.cameraType != '' && ruleForm.cameraType != 6"
|
|
|
|
+ label="sn码" prop="snCode"
|
|
>
|
|
>
|
|
<el-input v-model="ruleForm.snCode"></el-input>
|
|
<el-input v-model="ruleForm.snCode"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -53,7 +53,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
- <el-button @click="cameraVisible = false">取 消</el-button>
|
|
|
|
|
|
+ <el-button @click="clearData">取 消</el-button>
|
|
<el-button type="primary" @click="addCamera">确 定</el-button>
|
|
<el-button type="primary" @click="addCamera">确 定</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -130,9 +130,10 @@ export default {
|
|
tableHeader: [
|
|
tableHeader: [
|
|
{ name: "childName", label: "设备ID" },
|
|
{ name: "childName", label: "设备ID" },
|
|
{ name: "userName", label: "手机号(用户名)" },
|
|
{ name: "userName", label: "手机号(用户名)" },
|
|
- { name: "goodsName", label: "设备类型" },
|
|
|
|
|
|
+ // { name: "goodsName", label: "设备类型" },
|
|
|
|
+ { name: "cameraType", label: "设备类型" },
|
|
{ name: "snCode", label: "sn码" },
|
|
{ name: "snCode", label: "sn码" },
|
|
- { name: "wifi", label: "wifi"},
|
|
|
|
|
|
+ { name: "wifiName", label: "wifi"},
|
|
{ name: "activatedTime", label: "激活时间" },
|
|
{ name: "activatedTime", label: "激活时间" },
|
|
{ name: "own", label: "出货类型" },
|
|
{ name: "own", label: "出货类型" },
|
|
{ name: "companyName", label: "客户名称" },
|
|
{ name: "companyName", label: "客户名称" },
|
|
@@ -141,11 +142,11 @@ export default {
|
|
// ShebeiVisible: false,
|
|
// ShebeiVisible: false,
|
|
cameraVisible: false,
|
|
cameraVisible: false,
|
|
ruleForm: {
|
|
ruleForm: {
|
|
- wifi: "",
|
|
|
|
|
|
+ wifiName: "",
|
|
address: "",
|
|
address: "",
|
|
// initPoint: "",
|
|
// initPoint: "",
|
|
balance:"",
|
|
balance:"",
|
|
- type: [],
|
|
|
|
|
|
+ cameraType: [],
|
|
own: [],
|
|
own: [],
|
|
snCode: "",
|
|
snCode: "",
|
|
orderSn: "",
|
|
orderSn: "",
|
|
@@ -153,10 +154,11 @@ export default {
|
|
childName:""
|
|
childName:""
|
|
},
|
|
},
|
|
rules:{
|
|
rules:{
|
|
|
|
+ snCode: [{ required:true ,message:'sn码不能为空'}],
|
|
own: [{required: true, message:'出库类型不能为空'}],
|
|
own: [{required: true, message:'出库类型不能为空'}],
|
|
- type: [{required: true, message:'相机类型不能为空'}],
|
|
|
|
|
|
+ cameraType: [{required: true, message:'相机类型不能为空'}],
|
|
childName: [{required: true, message:'设备ID不能为空', trigger: 'blur'}],
|
|
childName: [{required: true, message:'设备ID不能为空', trigger: 'blur'}],
|
|
- wifi: [{required: true, message:'wifi名称不能为空', trigger: 'blur'}],
|
|
|
|
|
|
+ wifiName: [{required: true, message:'wifi名称不能为空', trigger: 'blur'}],
|
|
address: [{required: true, message:'物理地址不能为空', trigger: 'blur'}],
|
|
address: [{required: true, message:'物理地址不能为空', trigger: 'blur'}],
|
|
balance: [{required: true, message:'初始点数不能为空', trigger: 'blur'}],
|
|
balance: [{required: true, message:'初始点数不能为空', trigger: 'blur'}],
|
|
orderSn: [{required: true, message:'订单号不能为空', trigger: 'blur'}],
|
|
orderSn: [{required: true, message:'订单号不能为空', trigger: 'blur'}],
|
|
@@ -201,24 +203,29 @@ export default {
|
|
pageSize: this.size,
|
|
pageSize: this.size,
|
|
},
|
|
},
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
|
+ for(let i=0;i<res.message.list.length;i++){
|
|
|
|
+ res.message.list[i].activatedTime = this.$base.dateFormat('yyyy-MM-dd hh:mm',new Date(res.message.list[i].activatedTime))
|
|
|
|
+ res.message.list[i].own = this.ownToName(res.message.list[i].own)
|
|
|
|
+ res.message.list[i].cameraType = this.typeToName(res.message.list[i].cameraType)
|
|
|
|
+ }
|
|
this.tableData = res.message.list;
|
|
this.tableData = res.message.list;
|
|
this.total = res.message.total;
|
|
this.total = res.message.total;
|
|
- // this.currentPage = res.message.pageNum
|
|
|
|
|
|
+ this.currentPage = res.message.pageNum
|
|
});
|
|
});
|
|
},
|
|
},
|
|
addCamera() {
|
|
addCamera() {
|
|
- if (this.ruleForm.type != 6 && this.ruleForm.snCode == "") {
|
|
|
|
|
|
+ if (this.ruleForm.cameraType != 6 && this.ruleForm.snCode == "") {
|
|
this.$alert("sn码不能为空!", "提示", {
|
|
this.$alert("sn码不能为空!", "提示", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
});
|
|
});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
let params = {
|
|
let params = {
|
|
- wifi: this.ruleForm.wifi,
|
|
|
|
|
|
+ wifiName: this.ruleForm.wifiName,
|
|
address: this.ruleForm.address,
|
|
address: this.ruleForm.address,
|
|
// initPoint: this.ruleForm.initPoint,
|
|
// initPoint: this.ruleForm.initPoint,
|
|
balance: this.ruleForm.balance,
|
|
balance: this.ruleForm.balance,
|
|
- type: this.ruleForm.type,
|
|
|
|
|
|
+ cameraType: this.ruleForm.cameraType,
|
|
own: this.ruleForm.own,
|
|
own: this.ruleForm.own,
|
|
snCode: this.ruleForm.snCode,
|
|
snCode: this.ruleForm.snCode,
|
|
orderSn: this.ruleForm.orderSn,
|
|
orderSn: this.ruleForm.orderSn,
|
|
@@ -241,11 +248,11 @@ export default {
|
|
callback: (action) => {
|
|
callback: (action) => {
|
|
this.getCompanyList();
|
|
this.getCompanyList();
|
|
this.ruleForm = {
|
|
this.ruleForm = {
|
|
- wifi: "",
|
|
|
|
|
|
+ wifiName: "",
|
|
address: "",
|
|
address: "",
|
|
// initPoint: "",
|
|
// initPoint: "",
|
|
balance:"",
|
|
balance:"",
|
|
- type: [],
|
|
|
|
|
|
+ cameraType: [],
|
|
own: [],
|
|
own: [],
|
|
snCode: "",
|
|
snCode: "",
|
|
orderSn: "",
|
|
orderSn: "",
|
|
@@ -264,6 +271,56 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ clearData(){
|
|
|
|
+ this.cameraVisible = false
|
|
|
|
+ this.ruleForm = {
|
|
|
|
+ wifiName: "",
|
|
|
|
+ address: "",
|
|
|
|
+ // initPoint: "",
|
|
|
|
+ balance:"",
|
|
|
|
+ cameraType: [],
|
|
|
|
+ own: [],
|
|
|
|
+ snCode: "",
|
|
|
|
+ orderSn: "",
|
|
|
|
+ companyId: "",
|
|
|
|
+ childName:""
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ ownToName(own){
|
|
|
|
+ switch(own){
|
|
|
|
+ case 0:
|
|
|
|
+ return "正常销售"
|
|
|
|
+ break
|
|
|
|
+ case 2:
|
|
|
|
+ return "礼品赠送"
|
|
|
|
+ break
|
|
|
|
+ case 1:
|
|
|
|
+ return "员工自用"
|
|
|
|
+ break
|
|
|
|
+ case 3:
|
|
|
|
+ return "其它"
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ typeToName(cameraType){
|
|
|
|
+ switch(cameraType){
|
|
|
|
+ case 4:
|
|
|
|
+ return "四维看看Pro八目相机"
|
|
|
|
+ break
|
|
|
|
+ case 1:
|
|
|
|
+ return "四维看看Lite双目相机"
|
|
|
|
+ break
|
|
|
|
+ case 9:
|
|
|
|
+ return "四维看看双目转台相机"
|
|
|
|
+ break
|
|
|
|
+ case 10:
|
|
|
|
+ return "四维看看激光相机"
|
|
|
|
+ break
|
|
|
|
+ case 6:
|
|
|
|
+ return "第三方相机"
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ },
|
|
async getCompanyList() {
|
|
async getCompanyList() {
|
|
let result = await this.$http.post("/company/listAll");
|
|
let result = await this.$http.post("/company/listAll");
|
|
this.companyList = result.message;
|
|
this.companyList = result.message;
|