更新产品信息

master
anthonywj 2 years ago
parent 3d5d534028
commit 67c4b084a6

@ -4,7 +4,7 @@ VUE_APP_TITLE = UDI追溯平台
# 开发环境配置
ENV = 'development'
VUE_APP_BASE_API = 'http://127.0.0.1:9998'
VUE_APP_BASE_API = 'http://192.168.0.166:9998'
# 应用访问路径 例如使用前缀 /admin/
VUE_APP_CONTEXT_PATH = '/'

@ -11,7 +11,7 @@ ENV = 'production'
# 线上
VUE_APP_BASE_API = 'https://ts.udims.com/api/'
VUE_APP_BASE_API = 'http://192.168.0.166:9150/UDI_CPT_SERVER/'
# VUE_APP_BASE_API = 'http://192.168.0.166:9150/UDI_CPT_SERVER/'
# 应用访问路径 例如使用前缀 /admin/
VUE_APP_CONTEXT_PATH = '/'

@ -31,6 +31,7 @@ export function filterByVersion(query) {
params: query
});
}
export function dlLastVersionByDi(query) {
return axios({
url: "/udiwms/udiinfo/dlLastVersionByDi",
@ -38,6 +39,7 @@ export function dlLastVersionByDi(query) {
params: query
});
}
export function superSearch(query) {
return axios({
url: "/udiwms/udiinfo/superSearch",
@ -45,3 +47,11 @@ export function superSearch(query) {
params: query
});
}
export function syncOnline(query) {
return axios({
url: "/udi/udirel/syncOnline",
method: "post",
data: query
});
}

@ -546,6 +546,37 @@
</el-collapse-item>
<el-collapse-item name="5">
<template slot="title">
<p class="form-title">版本信息</p>
</template>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="8" class="el-col">
<div class="text item">
<div class="itemTag">
<span>当前版本号:&nbsp;</span>
</div>
<el-input
style="width: 35%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="detailQuery.versionNumber"
></el-input>
</div>
</el-col>
<el-col :span="2" class="el-col">
<el-button type="text" size="small" @click.native.stop="updateVersion()"
:loading="updateLoading"
style="margin-left: 5%"
>更新为当前发布版本
</el-button>
</el-col>
</el-row>
</el-collapse-item>
</el-collapse>
</el-card>
</el-form>
@ -561,7 +592,7 @@
type="primary"
size="small"
icon="search"
@click="cancelDialog"
@click="cancelDialog()"
>取消
</el-button>
</div>
@ -572,6 +603,7 @@
import {filterByUuid, updateRel} from "@/api/basic/udiRlCompany";
import {editDict} from "@/api/basic/UdiBasic";
import {dlLastVersionByDi, syncOnline} from "@/api/basic/udiInfo";
export default {
name: "UdiBasicProductEdit",
@ -593,6 +625,7 @@ export default {
return {
sysList: [],
detailList: [],
updateLoading: false,
}
},
methods: {
@ -632,17 +665,47 @@ export default {
this.cancelDialog();
});
},
updateVersion() {
this.$confirm("此操作将访问国家库查询最新版本信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.updateLoading = true;
let query = {
uuid: this.detailQuery.uuid,
originUuid: this.detailQuery.originUuid,
};
syncOnline(query)
.then((response) => {
this.updateLoading = false;
if (response.code == 20000) {
this.$message.success("更新成功!");
this.closeDialog();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.updateLoading = false;
this.total = 0;
});
})
.catch(() => {
});
},
cancelDialog() {
this.closeDialog();
},
},
created() {
this.getDetailList(this.detailQuery.id);
}
}
</script>
<style scoped>

@ -5,8 +5,15 @@
<el-row type="flex">
<el-col :span="18">
<el-form-item label="UDI码:" class="query-form-item">
<el-input v-model="filterQuery.udiCode" placeholder="请输入UDI码"
clearable></el-input>
<el-input v-model="filterQuery.udiCode" placeholder="请扫描或输入UDI码"
clearable="true"
id="inputer"
@focus="getInputFocus($event)"
@keypress.enter.native="enterKey($event)"
ref='inputRef'
style="ime-mode:disabled"
type="tel"
></el-input>
</el-form-item>
</el-col>
</el-row>
@ -31,7 +38,6 @@
:label="item.ylqxzcrbarmc"
:value="item.ylqxzcrbarmc"
>
</el-option>
</el-select>
</el-form-item>
@ -1065,10 +1071,17 @@ export default {
this.monitorOrder = "";
this.searchIng = false;
},
enterKey() {
this.getList();
},
getList() {
this.loading = true;
sourceSearch(this.filterQuery).then((res) => {
this.loading = false;
this.$refs.inputRef.focus();
this.$refs.inputRef.select();
if (res.code === 20000) {
this.recordCode = res.data;
this.orderTimeOut();
@ -1084,10 +1097,38 @@ export default {
this.total = 0;
})
},
getInputFocus(event) {
event.currentTarget.select();
}
},
created() {
this.getCompanyName()
},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
var that = this;
var inputer = document.getElementById("inputer");
window.sc = new A.KeyScaner(inputer);//DOM
sc.onInput = function (text) {
//onInput500ms
if (text.includes("delete")) {
that.filterQuery.udiCode = "";
return;
}
if (that.sitcomScan) {
that.filterQuery.udiCode = that.filterQuery.udiCode;
} else {
that.filterQuery.udiCode = text;
}
};
inputer.focus();//divtabindexdocumentBody
},
beforeDestroy() {
if (this.monitorOrder) {
clearTimeout(this.monitorOrder)

@ -5,8 +5,15 @@
<el-row type="flex">
<el-col :span="18">
<el-form-item label="UDI码:" class="query-form-item">
<el-input v-model="filterQuery.udiCode" placeholder="请输入UDI码"
clearable></el-input>
<el-input v-model="filterQuery.udiCode" placeholder="请扫描或输入UDI码"
clearable="true"
id="inputer"
@focus="getInputFocus($event)"
@keypress.enter.native="enterKey($event)"
ref='inputRef'
style="ime-mode:disabled"
type="tel"
></el-input>
</el-form-item>
</el-col>
</el-row>
@ -1099,6 +1106,13 @@ export default {
this.monitorOrder = "";
this.searchIng = false;
},
getInputFocus(event) {
event.currentTarget.select();
},
enterKey() {
this.getList();
},
getList() {
this.loading = true;
sceneSearch(this.filterQuery).then((res) => {
@ -1119,6 +1133,28 @@ export default {
})
},
},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
var that = this;
var inputer = document.getElementById("inputer");
window.sc = new A.KeyScaner(inputer);//DOM
sc.onInput = function (text) {
//onInput500ms
if (text.includes("delete")) {
that.filterQuery.udiCode = "";
return;
}
if (that.sitcomScan) {
that.filterQuery.udiCode = that.filterQuery.udiCode;
} else {
that.filterQuery.udiCode = text;
}
};
inputer.focus();//divtabindexdocumentBody
},
created() {
this.geCompanyNameList();
},

Loading…
Cancel
Save