Commit e05f7df9 by zhuzhequan

生产单搜索优化

parent fbf0cc45
...@@ -14,7 +14,6 @@ export const createServer = () => { ...@@ -14,7 +14,6 @@ export const createServer = () => {
webApp.use(express.json()); webApp.use(express.json());
webApp.use(express.urlencoded({ extended: false })); webApp.use(express.urlencoded({ extended: false }));
webApp.use("/", router); webApp.use("/", router);
// catch 404 // catch 404
webApp.use((req, res) => { webApp.use((req, res) => {
res.status(404).send("Sorry! 404 Error."); res.status(404).send("Sorry! 404 Error.");
......
...@@ -473,9 +473,12 @@ export default { ...@@ -473,9 +473,12 @@ export default {
this.productionNo = processed; this.productionNo = processed;
} }
code = 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 { } else {
const str = this.productionNo.split("PSC")[0]; const str = this.productionNo.split("PSC")[0];
...@@ -495,7 +498,8 @@ export default { ...@@ -495,7 +498,8 @@ export default {
); );
this.detail = findByPodProductionNo.data; this.detail = findByPodProductionNo.data;
this.imgList = []; 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); await this.hasDesignImagesCanvasJsonList(designImagesCanvasJsonList);
this.$store.commit("setProductDetail", findByPodProductionNo.data); this.$store.commit("setProductDetail", findByPodProductionNo.data);
ipcRenderer.send("win-subScreen", findByPodProductionNo.data); ipcRenderer.send("win-subScreen", findByPodProductionNo.data);
...@@ -531,12 +535,12 @@ export default { ...@@ -531,12 +535,12 @@ export default {
}, },
classifyField(field) { classifyField(field) {
// 第一类:以"AAAF-CNPSC"开头 // 第一类:以"AAAF-CNPSC"开头
if (field.startsWith("AAAF-CNPSC")) { if (field.includes("CN")) {
return "CN"; return "CN";
} }
// 第二类:以"AAAF-USPSC"开头 // 第二类:以"AAAF-USPSC"开头
if (field.startsWith("AAAF-USPSC")) { if (field.includes("US")) {
return "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