Commit dd1cc564 by 前端

去除设备号前后空格

1 parent 5e01b0a0
...@@ -923,7 +923,7 @@ export default { ...@@ -923,7 +923,7 @@ export default {
let checkDevice = (rule, value, cb) => { let checkDevice = (rule, value, cb) => {
if (rule.field) { if (rule.field) {
let i = rule.field.split("device")[1]; let i = rule.field.split("device")[1];
let sn = this.snForm.deviceArr[i].sn.trim(); let sn = this.snForm.deviceArr[i].sn;
if (this.snForm.deviceArr[i].disabled) return cb(); if (this.snForm.deviceArr[i].disabled) return cb();
if (sn == "") { if (sn == "") {
this.snForm.deviceArr[i].deviceType = ""; this.snForm.deviceArr[i].deviceType = "";
...@@ -932,9 +932,9 @@ export default { ...@@ -932,9 +932,9 @@ export default {
if (sn) { if (sn) {
//this._timeoutId && clearTimeout(this._timeoutId) //this._timeoutId && clearTimeout(this._timeoutId)
//this._timeoutId = setTimeout(()=>{ //this._timeoutId = setTimeout(()=>{
verifydevice({ sn }).then((res) => { verifydevice({ sn:sn.trim() }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
checkSn({ sn }).then((res) => { checkSn({ sn:sn.trim() }).then((res) => {
if (res.data) { if (res.data) {
this.snForm.deviceArr[i].deviceType = res.data; this.snForm.deviceArr[i].deviceType = res.data;
} }
...@@ -2167,13 +2167,13 @@ export default { ...@@ -2167,13 +2167,13 @@ export default {
let i = rule.field.split(".")[1]; let i = rule.field.split(".")[1];
let oParams = {}; let oParams = {};
oParams.sn = value; oParams.sn = value.trim();
if (_this.snForm.id) { if (_this.snForm.id) {
oParams.vehicleId = _this.snForm.id; oParams.vehicleId = _this.snForm.id;
} }
verifydevice(oParams).then((res) => { verifydevice(oParams).then((res) => {
if (res.code == 200) { if (res.code == 200) {
checkSn({ sn: value }).then((res) => { checkSn({ sn: value.trim() }).then((res) => {
if (res.data) { if (res.data) {
let o = _this.snForm.deviceInfoDtos[i]; let o = _this.snForm.deviceInfoDtos[i];
o.deviceClassifyName = res.data; o.deviceClassifyName = res.data;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!