Commit e05f7df9 by zhuzhequan

生产单搜索优化

parent fbf0cc45
......@@ -13,8 +13,7 @@ export const createServer = () => {
webApp.use(logMiddleWare());
webApp.use(express.json());
webApp.use(express.urlencoded({ extended: false }));
webApp.use("/", router);
webApp.use("/", router);
// catch 404
webApp.use((req, res) => {
res.status(404).send("Sorry! 404 Error.");
......
......@@ -473,9 +473,12 @@ export default {
this.productionNo = processed;
}
code = processed;
this.$store.commit("setOrderType", this.classifyField(code));
}else{
this.$store.commit("setOrderType", this.classifyField(this.productionNo));
}
this.$store.commit("setOrderType", this.classifyField(code));
} else {
const str = this.productionNo.split("PSC")[0];
......@@ -495,7 +498,8 @@ export default {
);
this.detail = findByPodProductionNo.data;
this.imgList = [];
let designImagesCanvasJsonList = this.detail.drParam;
let designImagesCanvasJsonList = "[{\"options\":{\"title\":\"A\",\"objects\":[{\"type\":\"rect\"},{\"type\":\"image\"}]},\"canvasWidth\":530.0498682724877,\"canvasHeight\":596.25,\"list\":[{\"img_width\":285.1250000000001,\"img_height\":285.1250000000001,\"src\":\"https://jomalls.oss-cn-hangzhou.aliyuncs.com/demo/design/2508/26/2b3k7z-ffu960r-mes8osbv.png\",\"drawImage\":[-74.44381235035513,-31.57743896091416,643.1083774093324,643.1083774093324]}]}]"
// this.detail.drParam;
await this.hasDesignImagesCanvasJsonList(designImagesCanvasJsonList);
this.$store.commit("setProductDetail", findByPodProductionNo.data);
ipcRenderer.send("win-subScreen", findByPodProductionNo.data);
......@@ -531,12 +535,12 @@ export default {
},
classifyField(field) {
// 第一类:以"AAAF-CNPSC"开头
if (field.startsWith("AAAF-CNPSC")) {
if (field.includes("CN")) {
return "CN";
}
// 第二类:以"AAAF-USPSC"开头
if (field.startsWith("AAAF-USPSC")) {
if (field.includes("US")) {
return "US";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment