Commit f6e45c94 by linjinhong

fix:添加库存提示

parent 8163590c
...@@ -11,7 +11,7 @@ function startLoading() { ...@@ -11,7 +11,7 @@ function startLoading() {
lock: true, lock: true,
text: "拼命加载中...", text: "拼命加载中...",
spinner: "el-icon-loading", spinner: "el-icon-loading",
background: "rgba(0,0,0,.7)", background: "rgba(0,0,0,.7)"
}); });
} }
...@@ -25,16 +25,16 @@ axios.defaults.timeout = 12600000; ...@@ -25,16 +25,16 @@ axios.defaults.timeout = 12600000;
const QUERY_ORDER_API_MAP = { const QUERY_ORDER_API_MAP = {
CN: { CN: {
path: "factory/podJomallOrderProductCn/getProductCnByFactorySubOrderNumber", path: "factory/podJomallOrderProductCn/getProductCnByFactorySubOrderNumber",
paramKey: "factorySubOrderNumber", // 参数名:工厂子订单号 paramKey: "factorySubOrderNumber" // 参数名:工厂子订单号
}, },
US: { US: {
path: "factory/podJomallOrderProductUs/getProductUsByFactorySubOrderNumber", path: "factory/podJomallOrderProductUs/getProductUsByFactorySubOrderNumber",
paramKey: "factorySubOrderNumber", // 参数名:工厂子订单号 paramKey: "factorySubOrderNumber" // 参数名:工厂子订单号
}, },
GC: { GC: {
path: "factory/podJomallOrderProduct/getSubOrderByThirdSubOrderNumber", path: "factory/podJomallOrderProduct/getSubOrderByThirdSubOrderNumber",
paramKey: "thirdSubOrderNumber", // 参数名:第三方子订单号(老pod) paramKey: "thirdSubOrderNumber" // 参数名:第三方子订单号(老pod)
}, }
}; };
/** /**
* 通用查询订单接口 * 通用查询订单接口
...@@ -53,21 +53,21 @@ export function findByPodProductionNoApi(orderNumber) { ...@@ -53,21 +53,21 @@ export function findByPodProductionNoApi(orderNumber) {
const apiConfig = QUERY_ORDER_API_MAP[orderNumber.orderType]; const apiConfig = QUERY_ORDER_API_MAP[orderNumber.orderType];
if (!apiConfig) { if (!apiConfig) {
throw new Error( throw new Error(
`查询订单失败:不支持的订单类型${orderNumber.orderType},仅支持CN/US/GC`, `查询订单失败:不支持的订单类型${orderNumber.orderType},仅支持CN/US/GC`
); );
} }
// 3. 构造请求参数(根据类型自动匹配参数名) // 3. 构造请求参数(根据类型自动匹配参数名)
const requestParams = { const requestParams = {
[apiConfig.paramKey]: orderNumber.thirdSubOrderNumber, [apiConfig.paramKey]: orderNumber.thirdSubOrderNumber,
resizable: orderNumber.resizable, resizable: orderNumber.resizable
}; };
// 4. 获取基地址并发送GET请求 // 4. 获取基地址并发送GET请求
const env = getHostApi().apiApiHost; const env = getHostApi().apiApiHost;
return axios.get(apiConfig.path, { return axios.get(apiConfig.path, {
baseURL: env, baseURL: env,
params: requestParams, params: requestParams
}); });
} }
// ===================== 素材下载相关 ===================== // ===================== 素材下载相关 =====================
...@@ -97,7 +97,7 @@ export async function downloadBySubOrderNumberApi(params) { ...@@ -97,7 +97,7 @@ export async function downloadBySubOrderNumberApi(params) {
// 4. 发送请求获取下载链接 // 4. 发送请求获取下载链接
const { data, message } = await downloadDesignImagesBaseApi( const { data, message } = await downloadDesignImagesBaseApi(
pathMap["downloadBySubOrderNumber"][targetType], pathMap["downloadBySubOrderNumber"][targetType],
params, params
); );
// 建议明确获取响应data(根据实际axios响应结构调整) // 建议明确获取响应data(根据实际axios响应结构调整)
...@@ -113,7 +113,7 @@ export async function downloadBySubOrderNumberApi(params) { ...@@ -113,7 +113,7 @@ export async function downloadBySubOrderNumberApi(params) {
// 6. 构建下载文件列表 // 6. 构建下载文件列表
const fileEnv = getHostApi().fileApiUrl; const fileEnv = getHostApi().fileApiUrl;
files = files.map((el) => ({ url: `${fileEnv}${el}` })); files = files.map(el => ({ url: `${fileEnv}${el}` }));
console.log(106, files); console.log(106, files);
const downloadFunc = const downloadFunc =
params.device === 2 ? downloadOtherImage : downloadImage; params.device === 2 ? downloadOtherImage : downloadImage;
...@@ -122,7 +122,7 @@ export async function downloadBySubOrderNumberApi(params) { ...@@ -122,7 +122,7 @@ export async function downloadBySubOrderNumberApi(params) {
return { return {
code: 200, code: 200,
message: "下载成功", message: "下载成功",
data: downloadResult, data: downloadResult
}; };
} catch (error) { } catch (error) {
// 统一错误处理:便于调试和用户提示 // 统一错误处理:便于调试和用户提示
...@@ -147,21 +147,21 @@ export function completeDeliveryApi(params) { ...@@ -147,21 +147,21 @@ export function completeDeliveryApi(params) {
CN: { CN: {
data: { data: {
id: params.id, id: params.id,
podJomallOrderCnId: params.podJomallOrderCnId || "", podJomallOrderCnId: params.podJomallOrderCnId || ""
}, },
url: "factory/podJomallOrderProductCn/completeDelivery", url: "factory/podJomallOrderProductCn/completeDelivery"
}, },
US: { US: {
data: { data: {
id: params.id, id: params.id,
podJomallOrderUsId: params.podJomallOrderUsId || "", podJomallOrderUsId: params.podJomallOrderUsId || ""
}, },
url: "factory/podJomallOrderProductUs/completeDelivery", url: "factory/podJomallOrderProductUs/completeDelivery"
}, },
GC: { GC: {
data: { id: params.id }, data: { id: params.id },
url: "factory/podJomallOrderProduct/completeDelivery", url: "factory/podJomallOrderProduct/completeDelivery"
}, }
}; };
// 2. 校验订单类型是否支持 // 2. 校验订单类型是否支持
...@@ -178,16 +178,16 @@ export function checkUpdate(version) { ...@@ -178,16 +178,16 @@ export function checkUpdate(version) {
{ {
params: { params: {
businessType: "production_assistant", businessType: "production_assistant",
version, version
}, }
}, }
); );
} }
export function getAllCountryApi(thirdSubOrderNumber) { export function getAllCountryApi(thirdSubOrderNumber) {
return axios.get(`logisticsAddress/getAllCountry`, { return axios.get(`logisticsAddress/getAllCountry`, {
params: { params: {
thirdSubOrderNumber, thirdSubOrderNumber
}, }
}); });
} }
...@@ -4,7 +4,7 @@ export const pathMap = { ...@@ -4,7 +4,7 @@ export const pathMap = {
CN: "factory/podJomallOrderProductCn/getProductCnByFactorySubOrderNumber", CN: "factory/podJomallOrderProductCn/getProductCnByFactorySubOrderNumber",
US: "factory/podJomallOrderProductUs/getProductUsByFactorySubOrderNumber", US: "factory/podJomallOrderProductUs/getProductUsByFactorySubOrderNumber",
GC: "factory/podJomallOrderProduct/getSubOrderByThirdSubOrderNumber", GC: "factory/podJomallOrderProduct/getSubOrderByThirdSubOrderNumber",
OP: "factory/podOrderOperation/getByOperationNo", OP: "factory/podOrderOperation/getByOperationNo"
}, },
//下载素材接口 //下载素材接口
downloadBySubOrderNumber: { downloadBySubOrderNumber: {
...@@ -14,26 +14,30 @@ export const pathMap = { ...@@ -14,26 +14,30 @@ export const pathMap = {
OP: "factory/podOrderOperation/downloadDesignImages", OP: "factory/podOrderOperation/downloadDesignImages",
USHLC: "factory/podJomallOrderProductUs/downloadCompatibleDesignImages", USHLC: "factory/podJomallOrderProductUs/downloadCompatibleDesignImages",
CNHLC: "factory/podJomallOrderProductCn/downloadCompatibleDesignImages", CNHLC: "factory/podJomallOrderProductCn/downloadCompatibleDesignImages",
OPHLC: "factory/podOrderOperation/downloadCompatibleDesignImages", OPHLC: "factory/podOrderOperation/downloadCompatibleDesignImages"
}, },
//生产完成接口 //生产完成接口
completeDelivery: { completeDelivery: {
CN: "factory/podJomallOrderProductCn/completeDelivery", CN: "factory/podJomallOrderProductCn/completeDelivery",
US: "factory/podJomallOrderProductUs/completeDelivery", US: "factory/podJomallOrderProductUs/completeDelivery",
GC: "factory/podJomallOrderProduct/completeDelivery", GC: "factory/podJomallOrderProduct/completeDelivery",
OP: "factory/podOrderOperation/printerCompleteDelivery", OP: "factory/podOrderOperation/printerCompleteDelivery"
}, },
//惠立彩素材下载接口 //惠立彩素材下载接口
processTransparentBackground: { processTransparentBackground: {
CN: "factory/podJomallOrderProductCn/processTransparentBackground", CN: "factory/podJomallOrderProductCn/processTransparentBackground",
US: "factory/podJomallOrderProductUs/processTransparentBackground", US: "factory/podJomallOrderProductUs/processTransparentBackground"
}, },
//判断 status 操作单状态
scanProduce: {
OP: "factory/podOrderOperation/scan-produce"
}
}; };
export function autoRegisterRouter(router, funcKey, handler) { export function autoRegisterRouter(router, funcKey, handler) {
const configGroup = pathMap[funcKey]; const configGroup = pathMap[funcKey];
// 遍历配置自动注册路由 // 遍历配置自动注册路由
Object.values(configGroup).forEach((el) => { Object.values(configGroup).forEach(el => {
router.post(`/${el}`, (req, res) => { router.post(`/${el}`, (req, res) => {
handler(req, res); handler(req, res);
}); });
......
...@@ -3,12 +3,12 @@ import { ...@@ -3,12 +3,12 @@ import {
downloadOtherImage, downloadOtherImage,
toSend, toSend,
writeProfileXml, writeProfileXml,
copySingleImage, copySingleImage
} from "@/server/utils"; } from "@/server/utils";
const { const {
cropImageTransparentEdges, cropImageTransparentEdges,
cropTransparentEdges, cropTransparentEdges,
processImages, processImages
} = require("../utils/setImage"); } = require("../utils/setImage");
import axios from "axios"; import axios from "axios";
import { returnLogFilePath } from "../utils/log"; import { returnLogFilePath } from "../utils/log";
...@@ -26,7 +26,7 @@ const { ...@@ -26,7 +26,7 @@ const {
getVersion, getVersion,
setApi, setApi,
getHostApi, getHostApi,
getDesktopDevice, getDesktopDevice
} = require("@/server/utils/store"); } = require("@/server/utils/store");
const { pathMap } = require("@/config/index.js"); const { pathMap } = require("@/config/index.js");
...@@ -95,12 +95,12 @@ export default { ...@@ -95,12 +95,12 @@ export default {
const response = await axios({ const response = await axios({
url: req.body.url, url: req.body.url,
method: "GET", method: "GET",
responseType: "stream", responseType: "stream"
}); });
let fileName = uuid.v4() + ".png"; let fileName = uuid.v4() + ".png";
const filePath = path.join( const filePath = path.join(
process.cwd(), process.cwd(),
`./${version}/Input/` + fileName, `./${version}/Input/` + fileName
); );
const writer = fs.createWriteStream(filePath); const writer = fs.createWriteStream(filePath);
...@@ -109,21 +109,21 @@ export default { ...@@ -109,21 +109,21 @@ export default {
writer.on("finish", () => { writer.on("finish", () => {
res.json({ res.json({
code: 200, code: 200,
data: filePath, data: filePath
}); });
}); });
writer.on("error", (err) => { writer.on("error", err => {
res.json({ res.json({
code: 500, code: 500,
data: err.message, data: err.message
}); });
}); });
} catch (error) { } catch (error) {
console.error("Error downloading image:", error); console.error("Error downloading image:", error);
res.json({ res.json({
code: 500, code: 500,
data: error.message, data: error.message
}); });
} }
}, },
...@@ -170,7 +170,7 @@ export default { ...@@ -170,7 +170,7 @@ export default {
} }
const { data } = await axios.post(postUrl, [...params.ids], { const { data } = await axios.post(postUrl, [...params.ids], {
headers: { "jwt-token": token }, headers: { "jwt-token": token }
}); });
if (data.code !== 200) { if (data.code !== 200) {
...@@ -193,13 +193,13 @@ export default { ...@@ -193,13 +193,13 @@ export default {
let files = [path]; let files = [path];
files = files.map((el) => ({ url: `${fileEnv}${el}` })); files = files.map(el => ({ url: `${fileEnv}${el}` }));
const downloadFunc = const downloadFunc =
params.device === 2 ? downloadOtherImage : downloadImage; params.device === 2 ? downloadOtherImage : downloadImage;
const result = await downloadFunc(files, { const result = await downloadFunc(files, {
processDesignA, processDesignA,
processDesignB, processDesignB
}); });
console.log("result200", result); console.log("result200", result);
...@@ -220,7 +220,7 @@ export default { ...@@ -220,7 +220,7 @@ export default {
CN: "factorySubOrderNumber", CN: "factorySubOrderNumber",
US: "factorySubOrderNumber", US: "factorySubOrderNumber",
GC: "thirdSubOrderNumber", GC: "thirdSubOrderNumber",
OP: "operationNo", OP: "operationNo"
}; };
let url = pathMap["findByPodProductionNo"][params.orderType]; let url = pathMap["findByPodProductionNo"][params.orderType];
let paramsField = fieldMap[params.orderType]; let paramsField = fieldMap[params.orderType];
...@@ -228,9 +228,9 @@ export default { ...@@ -228,9 +228,9 @@ export default {
let { data } = await axios.get(`${env}/${url}`, { let { data } = await axios.get(`${env}/${url}`, {
params: { params: {
[paramsField]: params.thirdSubOrderNumber, [paramsField]: params.thirdSubOrderNumber,
resizable: params.resizable, resizable: params.resizable
}, },
headers: { "jwt-token": token }, headers: { "jwt-token": token }
}); });
res.setHeader("Act-Request-URL", `${env}/${url}`); res.setHeader("Act-Request-URL", `${env}/${url}`);
res.json(data); res.json(data);
...@@ -241,7 +241,7 @@ export default { ...@@ -241,7 +241,7 @@ export default {
getCompanyList: async (req, res) => { getCompanyList: async (req, res) => {
try { try {
let { data } = await axios.get( let { data } = await axios.get(
"https://platform.jomalls.com/api/tools/getCompanyList", "https://platform.jomalls.com/api/tools/getCompanyList"
); );
res.setHeader("X-Backend-Request-URL", "api/tools/getCompanyList"); res.setHeader("X-Backend-Request-URL", "api/tools/getCompanyList");
res.send(data); res.send(data);
...@@ -258,21 +258,21 @@ export default { ...@@ -258,21 +258,21 @@ export default {
const fieldMap = { const fieldMap = {
CN: { CN: {
id: params.id, id: params.id,
podJomallOrderCnId: params.podJomallOrderCnId || "", podJomallOrderCnId: params.podJomallOrderCnId || ""
}, },
US: { US: {
id: params.id, id: params.id,
podJomallOrderUsId: params.podJomallOrderUsId || "", podJomallOrderUsId: params.podJomallOrderUsId || ""
}, },
GC: { id: params.id }, GC: { id: params.id },
OP: { ...params.data }, OP: { ...params.data }
}; };
let url = pathMap["completeDelivery"][params.orderType]; let url = pathMap["completeDelivery"][params.orderType];
let postData = fieldMap[params.orderType]; let postData = fieldMap[params.orderType];
try { try {
let { data } = await axios.post(`${env}/${url}`, postData, { let { data } = await axios.post(`${env}/${url}`, postData, {
headers: { "jwt-token": token }, headers: { "jwt-token": token }
}); });
res.setHeader("X-Backend-Request-URL", url); res.setHeader("X-Backend-Request-URL", url);
...@@ -295,7 +295,7 @@ export default { ...@@ -295,7 +295,7 @@ export default {
for (let k in q.imgList) { for (let k in q.imgList) {
const p = path.join( const p = path.join(
process.cwd(), process.cwd(),
`./${version}/Input/` + q.imgList[k].fileName, `./${version}/Input/` + q.imgList[k].fileName
); );
zipStream.addEntry(p); zipStream.addEntry(p);
} }
...@@ -307,7 +307,7 @@ export default { ...@@ -307,7 +307,7 @@ export default {
// console.log("success"); // console.log("success");
res.json({ res.json({
code: 200, code: 200,
msg: q.productionNo + ".zip" + "已下载到桌面", msg: q.productionNo + ".zip" + "已下载到桌面"
}); });
}) })
.on("error", () => { .on("error", () => {
...@@ -339,8 +339,8 @@ export default { ...@@ -339,8 +339,8 @@ export default {
code: 200, code: 200,
data: { data: {
fileName, fileName,
url: path.join(process.cwd(), `./${version}/Input/` + fileName), url: path.join(process.cwd(), `./${version}/Input/` + fileName)
}, }
}); });
} }
}); });
...@@ -357,7 +357,7 @@ export default { ...@@ -357,7 +357,7 @@ export default {
const filePath = path.join( const filePath = path.join(
process.cwd(), process.cwd(),
`./${version}/Input/${req.body.fileName}`, `./${version}/Input/${req.body.fileName}`
); );
console.log(filePath); console.log(filePath);
// 给客户端返回一个文件流 type类型 // 给客户端返回一个文件流 type类型
...@@ -401,7 +401,7 @@ export default { ...@@ -401,7 +401,7 @@ export default {
.then(() => { .then(() => {
res.send({ code: 200, msg: "操作成功" }); res.send({ code: 200, msg: "操作成功" });
}) })
.catch((err) => { .catch(err => {
res.send({ code: 500, msg: err }); res.send({ code: 500, msg: err });
}); });
}, },
...@@ -443,7 +443,7 @@ export default { ...@@ -443,7 +443,7 @@ export default {
fs.unlinkSync(from); fs.unlinkSync(from);
res.json({ code: 200, msg: "更新成功" }); res.json({ code: 200, msg: "更新成功" });
}) })
.catch((err) => { .catch(err => {
res.json({ code: 500, msg: err.message }); res.json({ code: 500, msg: err.message });
}); });
}); });
...@@ -535,17 +535,17 @@ export default { ...@@ -535,17 +535,17 @@ export default {
res.send({ code: 500, err }); res.send({ code: 500, err });
} else { } else {
let list = []; let list = [];
files.files.forEach((file) => { files.files.forEach(file => {
let fileName = uuid.v4() + ".png"; let fileName = uuid.v4() + ".png";
fs.renameSync(file.path, path.join(p, fileName)); fs.renameSync(file.path, path.join(p, fileName));
list.push({ list.push({
fileName, fileName,
url: path.join(process.cwd(), `./${version}/Input/` + fileName), url: path.join(process.cwd(), `./${version}/Input/` + fileName)
}); });
}); });
res.json({ res.json({
code: 200, code: 200,
data: list, data: list
}); });
} }
}); });
...@@ -591,7 +591,7 @@ export default { ...@@ -591,7 +591,7 @@ export default {
try { try {
let { data } = await axios.get(`${env}/${url}`, { let { data } = await axios.get(`${env}/${url}`, {
params: postData, params: postData,
headers: { "jwt-token": token }, headers: { "jwt-token": token }
}); });
console.log("processTransparentBackground", data); console.log("processTransparentBackground", data);
if (data.message) { if (data.message) {
...@@ -600,7 +600,7 @@ export default { ...@@ -600,7 +600,7 @@ export default {
let files = data.data || [data.message]; let files = data.data || [data.message];
files = files.map((el) => ({ url: `${fileEnv}${el}` })); files = files.map(el => ({ url: `${fileEnv}${el}` }));
console.log("processTransparentBackground,files", files); console.log("processTransparentBackground,files", files);
const result = await downloadImage(files); const result = await downloadImage(files);
...@@ -611,4 +611,25 @@ export default { ...@@ -611,4 +611,25 @@ export default {
res.json({ code: 500, msg: err }); res.json({ code: 500, msg: err });
} }
}, },
scanProduce: async (req, res) => {
env = getHostApi().apiApiHost;
const token = req.headers["jwt-token"];
const params = req.body;
let url = "factory/podOrderOperation/scan-produce";
console.log("scanProduce", `${env}/${url}`);
try {
let { data } = await axios.get(`${env}/${url}`, {
headers: { "jwt-token": token },
params: {
id: params.id,
status: params.status
}
});
res.send(data);
} catch (error) {
console.log("scanProduce", error);
res.json({ code: 500, msg: error });
}
}
}; };
...@@ -25,7 +25,7 @@ router.post("/downloadByDesignId", fn.downloadByDesignId); ...@@ -25,7 +25,7 @@ router.post("/downloadByDesignId", fn.downloadByDesignId);
autoRegisterRouter( autoRegisterRouter(
router, router,
"downloadBySubOrderNumber", "downloadBySubOrderNumber",
fn.downloadBySubOrderNumber, fn.downloadBySubOrderNumber
); );
// 提交生产完成 // 提交生产完成
autoRegisterRouter(router, "completeDelivery", fn.completeDelivery); autoRegisterRouter(router, "completeDelivery", fn.completeDelivery);
...@@ -61,6 +61,9 @@ autoRegisterRouter(router, "findByPodProductionNo", fn.findByPodProductionNo); ...@@ -61,6 +61,9 @@ autoRegisterRouter(router, "findByPodProductionNo", fn.findByPodProductionNo);
autoRegisterRouter( autoRegisterRouter(
router, router,
"processTransparentBackground", "processTransparentBackground",
fn.processTransparentBackground, fn.processTransparentBackground
); );
//操作单状态
autoRegisterRouter(router, "scanProduce", fn.scanProduce);
export { router as default }; export { router as default };
...@@ -5,7 +5,7 @@ import { Loading } from "element-ui"; ...@@ -5,7 +5,7 @@ import { Loading } from "element-ui";
// create an axios instance // create an axios instance
const service = axios.create({ const service = axios.create({
baseURL: "http://localhost:3000", // url = base url + request url baseURL: "http://localhost:3000", // url = base url + request url
timeout: 12600000, // request timeout timeout: 12600000 // request timeout
}); });
let loading; let loading;
...@@ -14,7 +14,7 @@ function startLoading() { ...@@ -14,7 +14,7 @@ function startLoading() {
lock: true, lock: true,
text: "拼命加载中...", text: "拼命加载中...",
spinner: "el-icon-loading", spinner: "el-icon-loading",
background: "rgba(0,0,0,.7)", background: "rgba(0,0,0,.7)"
}); });
} }
...@@ -24,7 +24,7 @@ function endLoading() { ...@@ -24,7 +24,7 @@ function endLoading() {
// Add a request interceptor // Add a request interceptor
service.interceptors.request.use( service.interceptors.request.use(
(config) => { config => {
const user = Vue.prototype.$dataStore.get("user"); const user = Vue.prototype.$dataStore.get("user");
if (user) { if (user) {
config.headers["jwt-token"] = user.token; config.headers["jwt-token"] = user.token;
...@@ -32,32 +32,30 @@ service.interceptors.request.use( ...@@ -32,32 +32,30 @@ service.interceptors.request.use(
startLoading(); startLoading();
return config; return config;
}, },
(error) => { error => {
endLoading(); endLoading();
// do something with request error // do something with request error
return Promise.reject(error); return Promise.reject(error);
}, }
); );
// Add a response interceptor // Add a response interceptor
service.interceptors.response.use( service.interceptors.response.use(
async (response) => { async response => {
// do something with response data // do something with response data
const res = response.data; const res = response.data;
endLoading(); endLoading();
if (res.code) { if (res.code) {
if (res.code !== 200) { if (res.code !== 200) {
if (res.code === 411) { if (res.code === 411 || res.code === 205 || res.code === 301) {
return Promise.resolve(res);
}
if (res.code === 205) {
return Promise.resolve(res); return Promise.resolve(res);
} }
if (res.code === 403) { if (res.code === 403) {
Vue.prototype.$dataStore.delete("user"); Vue.prototype.$dataStore.delete("user");
Vue.prototype.$message.error({ Vue.prototype.$message.error({
showClose: true, showClose: true,
message: res.msg || res.message || "Error", message: res.msg || res.message || "Error"
}); });
setTimeout(() => { setTimeout(() => {
location.reload(); location.reload();
...@@ -72,7 +70,7 @@ service.interceptors.response.use( ...@@ -72,7 +70,7 @@ service.interceptors.response.use(
} }
Vue.prototype.$message.error({ Vue.prototype.$message.error({
showClose: true, showClose: true,
message: res.msg || res.message || "Error", message: res.msg || res.message || "Error"
}); });
// reject // reject
return Promise.reject(new Error(res.msg || res.message || "Error")); return Promise.reject(new Error(res.msg || res.message || "Error"));
...@@ -82,11 +80,11 @@ service.interceptors.response.use( ...@@ -82,11 +80,11 @@ service.interceptors.response.use(
} }
return Promise.resolve(res); return Promise.resolve(res);
}, },
(error) => { error => {
endLoading(); endLoading();
// do something with response error // do something with response error
return Promise.reject(error); return Promise.reject(error);
}, }
); );
export default service; export default service;
......
...@@ -26,7 +26,7 @@ const { ...@@ -26,7 +26,7 @@ const {
setOrderInfo, setOrderInfo,
getLocation, getLocation,
setNowDate, setNowDate,
getNowDate, getNowDate
} = require("@/server/utils/store"); } = require("@/server/utils/store");
export default { export default {
...@@ -35,11 +35,11 @@ export default { ...@@ -35,11 +35,11 @@ export default {
user: { user: {
default: () => ({ default: () => ({
avatar: "", avatar: "",
factory: {}, factory: {}
}), }),
type: Object, type: Object
}, },
factoryType: { type: String, default: "CN" }, factoryType: { type: String, default: "CN" }
}, },
data() { data() {
return { return {
...@@ -51,20 +51,20 @@ export default { ...@@ -51,20 +51,20 @@ export default {
cacheList: [ cacheList: [
{ {
label: "清除当前登录信息", label: "清除当前登录信息",
value: "token", value: "token"
}, },
{ {
label: "登录记录", label: "登录记录",
value: "userList", value: "userList"
}, },
{ {
label: "打印预设", label: "打印预设",
value: "print-setting", value: "print-setting"
}, },
{ {
label: "系统设置", label: "系统设置",
value: "setting", value: "setting"
}, }
], ],
selectGridIndex: 0, selectGridIndex: 0,
pkg, pkg,
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
unit: "inch", unit: "inch",
language: "cn", language: "cn",
autoPrint: false, autoPrint: false,
gridSpacing: 1, gridSpacing: 1
}, },
detail: null, detail: null,
config: getHostApi(), config: getHostApi(),
...@@ -102,11 +102,11 @@ export default { ...@@ -102,11 +102,11 @@ export default {
"hsva(120, 40, 94, 0.5)", "hsva(120, 40, 94, 0.5)",
"hsl(181, 100%, 37%)", "hsl(181, 100%, 37%)",
"hsla(209, 100%, 56%, 0.73)", "hsla(209, 100%, 56%, 0.73)",
"#c7158577", "#c7158577"
], ],
faceType: "A", faceType: "A",
dialogVisible: false, dialogVisible: false,
showforcedProduc: false, showforcedProduc: false
}; };
}, },
computed: { computed: {
...@@ -119,8 +119,8 @@ export default { ...@@ -119,8 +119,8 @@ export default {
"countryList", "countryList",
"orderType", "orderType",
"grid", "grid",
"imgList", "imgList"
]), ])
}, },
mounted() { mounted() {
// console.log(pkg, "pkg"); // console.log(pkg, "pkg");
...@@ -151,14 +151,14 @@ export default { ...@@ -151,14 +151,14 @@ export default {
bus.$emit("busEmit", { type: "updateSystemSetting" }); bus.$emit("busEmit", { type: "updateSystemSetting" });
}, },
deep: true, deep: true
}, },
config: { config: {
handler(val) { handler(val) {
this.newApiApiHost = this.getDomainFromUrl(val.apiApiHost); this.newApiApiHost = this.getDomainFromUrl(val.apiApiHost);
}, },
immediate: true, immediate: true,
deep: true, deep: true
}, },
desktopDevice() { desktopDevice() {
this.checked = false; this.checked = false;
...@@ -168,7 +168,7 @@ export default { ...@@ -168,7 +168,7 @@ export default {
handler(value) { handler(value) {
if (this.detail && value?.length && this.desktopDevice === 3) { if (this.detail && value?.length && this.desktopDevice === 3) {
const item = this.detail?.saveImgList?.find( const item = this.detail?.saveImgList?.find(
(el) => el.fileName == value[0].fileName, el => el.fileName == value[0].fileName
); );
if (item) { if (item) {
item.power = true; item.power = true;
...@@ -176,11 +176,11 @@ export default { ...@@ -176,11 +176,11 @@ export default {
//复制图片到当前文件夹下 //复制图片到当前文件夹下
copySingleImage( copySingleImage(
item.productionFile, item.productionFile,
getLocation("downloadLocation1"), getLocation("downloadLocation1")
); );
copySingleImage( copySingleImage(
item.productionFile, item.productionFile,
getLocation("downloadLocation2"), getLocation("downloadLocation2")
); );
} catch (error) { } catch (error) {
this.$message.error("发送失败"); this.$message.error("发送失败");
...@@ -193,13 +193,13 @@ export default { ...@@ -193,13 +193,13 @@ export default {
console.log("updateOrderInfoItemitem", item); console.log("updateOrderInfoItemitem", item);
console.log("本地数据updateOrderInfoItem:", getOrderInfoMap()); console.log("本地数据updateOrderInfoItem:", getOrderInfoMap());
} }
}, }
// deep: true, // deep: true,
}, }
}, },
methods: { methods: {
checkUpdate() { checkUpdate() {
this.$refs.updateDialog.checkUpdate().then((data) => { this.$refs.updateDialog.checkUpdate().then(data => {
if (data) { if (data) {
// 有新版本更新 // 有新版本更新
this.$refs.updateDialog.open(data, 2); this.$refs.updateDialog.open(data, 2);
...@@ -214,7 +214,7 @@ export default { ...@@ -214,7 +214,7 @@ export default {
this.$confirm("是否退出登录?", "提示", { this.$confirm("是否退出登录?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning"
}) })
.then(() => { .then(() => {
this.$dataStore.delete("user"); this.$dataStore.delete("user");
...@@ -233,7 +233,7 @@ export default { ...@@ -233,7 +233,7 @@ export default {
if (!data) return this.$message.warning("请扫描生产单号/操作单号"); if (!data) return this.$message.warning("请扫描生产单号/操作单号");
let params = { let params = {
id: data.id, id: data.id,
orderType: this.orderType, orderType: this.orderType
}; };
if (this.orderType === "CN") { if (this.orderType === "CN") {
params.podJomallOrderCnId = data.podJomallOrderCnId; params.podJomallOrderCnId = data.podJomallOrderCnId;
...@@ -245,7 +245,7 @@ export default { ...@@ -245,7 +245,7 @@ export default {
//如果为惠立彩则判断当前saveImgList字段中的power是否全是true 是则生产完成 //如果为惠立彩则判断当前saveImgList字段中的power是否全是true 是则生产完成
const canCallApi = const canCallApi =
this.desktopDevice != 3 || this.desktopDevice != 3 ||
(data.saveImgList?.every((el) => el.power) ?? false); (data.saveImgList?.every(el => el.power) ?? false);
if (canCallApi) { if (canCallApi) {
console.log("生产完成"); console.log("生产完成");
...@@ -258,7 +258,7 @@ export default { ...@@ -258,7 +258,7 @@ export default {
//生产完成后在本地删除 //生产完成后在本地删除
await this.$api.post( await this.$api.post(
pathMap["completeDelivery"][this.orderType], pathMap["completeDelivery"][this.orderType],
params, params
); );
this.$message.success("操作成功"); this.$message.success("操作成功");
} }
...@@ -270,7 +270,7 @@ export default { ...@@ -270,7 +270,7 @@ export default {
this.$confirm(`确定生产完成?`, "提示", { this.$confirm(`确定生产完成?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning"
}).then(async () => { }).then(async () => {
await this.setData(this.detail); await this.setData(this.detail);
}); });
...@@ -282,15 +282,15 @@ export default { ...@@ -282,15 +282,15 @@ export default {
this.$confirm("是否确定清除?", "提示", { this.$confirm("是否确定清除?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning"
}) })
.then(() => { .then(() => {
for (let k of this.checkList) { for (let k of this.checkList) {
if (k === "print-setting" || k === "deviceId") { if (k === "print-setting" || k === "deviceId") {
let list = Object.keys(this.$dataStore.store).filter((el) => let list = Object.keys(this.$dataStore.store).filter(el =>
el.includes(k), el.includes(k)
); );
list.forEach((el) => { list.forEach(el => {
this.$dataStore.delete(el); this.$dataStore.delete(el);
}); });
} else if (k === "token") { } else if (k === "token") {
...@@ -311,9 +311,9 @@ export default { ...@@ -311,9 +311,9 @@ export default {
try { try {
axios axios
.get(item?.src, { .get(item?.src, {
responseType: "blob", responseType: "blob"
}) })
.then((res) => { .then(res => {
var url = URL.createObjectURL(res.data); var url = URL.createObjectURL(res.data);
let img = new Image(); let img = new Image();
img.crossorigin = ""; img.crossorigin = "";
...@@ -334,7 +334,7 @@ export default { ...@@ -334,7 +334,7 @@ export default {
resolve(); resolve();
}; };
}) })
.catch((e) => { .catch(e => {
console.log(e); console.log(e);
reject(e); reject(e);
}); });
...@@ -362,7 +362,7 @@ export default { ...@@ -362,7 +362,7 @@ export default {
const { canvasWidth, canvasHeight, list: drawItems } = canvasConfig; const { canvasWidth, canvasHeight, list: drawItems } = canvasConfig;
if (!canvasWidth || !canvasHeight || !Array.isArray(drawItems)) { if (!canvasWidth || !canvasHeight || !Array.isArray(drawItems)) {
throw new Error( throw new Error(
"canvas配置项必须包含canvasWidth/canvasHeight/list(数组)属性", "canvas配置项必须包含canvasWidth/canvasHeight/list(数组)属性"
); );
} }
...@@ -373,8 +373,8 @@ export default { ...@@ -373,8 +373,8 @@ export default {
canvas.height = canvasHeight; canvas.height = canvasHeight;
// 批量执行绘制方法,收集异步绘制Promise(语义化变量名,替代原模糊的list) // 批量执行绘制方法,收集异步绘制Promise(语义化变量名,替代原模糊的list)
const drawPromises = drawItems.map((drawItem) => const drawPromises = drawItems.map(drawItem =>
this.drawImage(canvas, drawItem), this.drawImage(canvas, drawItem)
); );
// 等待当前canvas的所有绘制操作完成 // 等待当前canvas的所有绘制操作完成
await Promise.all(drawPromises); await Promise.all(drawPromises);
...@@ -415,7 +415,7 @@ export default { ...@@ -415,7 +415,7 @@ export default {
async hasDesignImagesCanvasJsonList( async hasDesignImagesCanvasJsonList(
designImagesCanvasJsonList, designImagesCanvasJsonList,
bool, bool,
isForcedProduction, isForcedProduction
) { ) {
let imageResList = []; let imageResList = [];
...@@ -498,13 +498,13 @@ export default { ...@@ -498,13 +498,13 @@ export default {
device: this.desktopDevice, device: this.desktopDevice,
orderType: this.orderType, orderType: this.orderType,
forceProduction: forceProduction:
this.isForcedProduction || isForcedProduction || false, this.isForcedProduction || isForcedProduction || false
}, }
); );
console.log("downloadBySubOrderNumber", res); console.log("downloadBySubOrderNumber", res);
if (!res.data.length) return this.$message.warning("未找到素材图!"); if (!res.data.length) return this.$message.warning("未找到素材图!");
res.data.forEach((el) => { res.data.forEach(el => {
imageResList = imageResList.concat(el.list || []); imageResList = imageResList.concat(el.list || []);
}); });
} catch (error) { } catch (error) {
...@@ -517,7 +517,7 @@ export default { ...@@ -517,7 +517,7 @@ export default {
if (this.checked) { if (this.checked) {
imageResList = await this.cutImgFn(imageResList); imageResList = await this.cutImgFn(imageResList);
imageResList.forEach((el) => { imageResList.forEach(el => {
el.isCut = true; el.isCut = true;
}); });
} }
...@@ -540,7 +540,7 @@ export default { ...@@ -540,7 +540,7 @@ export default {
let obj = { let obj = {
type: "sendFile", type: "sendFile",
value: [...newImgList], value: [...newImgList],
productMark: this.detail.productMark, productMark: this.detail.productMark
}; };
if ( if (
...@@ -550,12 +550,12 @@ export default { ...@@ -550,12 +550,12 @@ export default {
) { ) {
obj.size = { obj.size = {
width: this.detail.mssWidth, width: this.detail.mssWidth,
height: this.detail.mssHeight, height: this.detail.mssHeight
}; };
} }
//设置储存图片的字段,并添加power标识 //设置储存图片的字段,并添加power标识
if (!this.detail["saveImgList"]?.length) { if (!this.detail["saveImgList"]?.length) {
this.detail["saveImgList"] = [...newImgList].map((el) => { this.detail["saveImgList"] = [...newImgList].map(el => {
el.power = false; el.power = false;
return { ...el }; return { ...el };
}); });
...@@ -591,11 +591,11 @@ export default { ...@@ -591,11 +591,11 @@ export default {
if (this.detail && !this.isAutoFinish && this.desktopDevice == 3) { if (this.detail && !this.isAutoFinish && this.desktopDevice == 3) {
//惠立彩判断是否全部图片都已经打印完成 //惠立彩判断是否全部图片都已经打印完成
const canCallApi = const canCallApi =
this.detail.saveImgList?.every((el) => el.power) ?? false; this.detail.saveImgList?.every(el => el.power) ?? false;
if (canCallApi) { if (canCallApi) {
bus.$emit("busEmit", { bus.$emit("busEmit", {
value: this.detail.newId, value: this.detail.newId,
type: "completeFail", type: "completeFail"
}); });
} }
} }
...@@ -610,8 +610,8 @@ export default { ...@@ -610,8 +610,8 @@ export default {
if (!this.isAutoFinish && today != getNowDate()) { if (!this.isAutoFinish && today != getNowDate()) {
this.$confirm("请注意自动完成上一单未勾选", "提示", { this.$confirm("请注意自动完成上一单未勾选", "提示", {
confirmButtonText: "跳过提示", confirmButtonText: "跳过提示",
type: "warning", type: "warning"
}).then((res) => { }).then(res => {
if (res == "confirm") { if (res == "confirm") {
setNowDate(today); setNowDate(today);
} }
...@@ -622,7 +622,7 @@ export default { ...@@ -622,7 +622,7 @@ export default {
if (this.productionNo.includes("_")) { if (this.productionNo.includes("_")) {
this.$store.commit( this.$store.commit(
"setOrderType", "setOrderType",
this.classifyField(this.productionNo), this.classifyField(this.productionNo)
); );
} else { } else {
let str; let str;
...@@ -645,7 +645,7 @@ export default { ...@@ -645,7 +645,7 @@ export default {
const apiRequestParams = { const apiRequestParams = {
thirdSubOrderNumber: this.productionNo, thirdSubOrderNumber: this.productionNo,
orderType: this.orderType, orderType: this.orderType,
resizable: this.desktopDevice == 3 ? true : false, resizable: this.desktopDevice == 3 ? true : false
}; };
//判断是否为惠立彩 //判断是否为惠立彩
...@@ -658,12 +658,12 @@ export default { ...@@ -658,12 +658,12 @@ export default {
localItem || localItem ||
(await this.$api.post( (await this.$api.post(
pathMap["findByPodProductionNo"][this.orderType], pathMap["findByPodProductionNo"][this.orderType],
apiRequestParams, apiRequestParams
)); ));
} else { } else {
findByPodProductionNo = await this.$api.post( findByPodProductionNo = await this.$api.post(
pathMap["findByPodProductionNo"][this.orderType], pathMap["findByPodProductionNo"][this.orderType],
apiRequestParams, apiRequestParams
); );
} }
...@@ -673,12 +673,55 @@ export default { ...@@ -673,12 +673,55 @@ export default {
this.detail["newId"] = this.productionNo; this.detail["newId"] = this.productionNo;
} }
if (
this.orderType == "OP" &&
(this.detail.productMark == "custom_normal" ||
this.detail.productMark == "normal")
) {
this.detail = "";
const err = new Error();
err.data = "GCB类的操作单无效操作!!!";
throw err;
}
if (
this.orderType == "OP" &&
(this.detail.status == "PENDING_PICK" ||
this.detail.status == "PENDING_REPLENISH")
) {
const { data, code } = await this.$api.post(
pathMap["scanProduce"][this.orderType],
{ id: this.detail.id, status: this.detail.status }
);
console.log("scanProduce---------", data);
if (code == 301) {
this.$confirm(
`<p>库存不足,无法进入生产!请联系仓库管理人员核对库存。</p>
<p>库存数量:${data.availableInventory || 0},生产中数量:${data.inventory ||
0},可调配库存:${data.inventory || 0}</p>`,
"提示",
{
confirmButtonText: "确定",
type: "error",
dangerouslyUseHTMLString: true,
// 🔥 关键:添加自定义类名
customClass: "custom-inventory-msgbox"
}
);
this.detail = "";
this.productionNo = "";
this.$refs.searchRef?.focus();
return;
}
}
let designImagesCanvasJsonList = this.detail.drParam; let designImagesCanvasJsonList = this.detail.drParam;
//获取下载素材 //获取下载素材
await this.hasDesignImagesCanvasJsonList( await this.hasDesignImagesCanvasJsonList(
designImagesCanvasJsonList, designImagesCanvasJsonList,
this.desktopDevice === 3 ? (localItem ? true : false) : false, this.desktopDevice === 3 ? (localItem ? true : false) : false,
isForcedProduction, isForcedProduction
); );
this.$store.commit("setProductDetail", this.detail); this.$store.commit("setProductDetail", this.detail);
ipcRenderer.send("win-subScreen", findByPodProductionNo.data); ipcRenderer.send("win-subScreen", findByPodProductionNo.data);
...@@ -686,11 +729,13 @@ export default { ...@@ -686,11 +729,13 @@ export default {
this.productionNo = ""; this.productionNo = "";
this.$refs.searchRef?.focus(); this.$refs.searchRef?.focus();
} catch (err) { } catch (err) {
console.log(err); console.log(723, err);
if (!err.data) { if (!err.data) {
this.$message.error( this.$message.error(
"未使用英文输入法输入/扫码,或该生产单号未拣胚或已完成", "未使用英文输入法输入/扫码,或该生产单号未拣胚或已完成"
); );
} else {
this.$message.error(err.data);
} }
this.productionNo = ""; this.productionNo = "";
this.$refs.searchRef?.focus(); this.$refs.searchRef?.focus();
...@@ -726,7 +771,7 @@ export default { ...@@ -726,7 +771,7 @@ export default {
unit: "mm", unit: "mm",
language: "cn", language: "cn",
autoPrint: false, autoPrint: false,
gridSpacing: 10, gridSpacing: 10
}; };
this.$message.success("重置应用程序设置成功"); this.$message.success("重置应用程序设置成功");
}, },
...@@ -747,8 +792,8 @@ export default { ...@@ -747,8 +792,8 @@ export default {
formData.append("file", f); formData.append("file", f);
let { data } = await this.$api.post("/uploadImage", formData, { let { data } = await this.$api.post("/uploadImage", formData, {
headers: { headers: {
"Content-Type": "application/x-www-form-urlencoded", "Content-Type": "application/x-www-form-urlencoded"
}, }
}); });
bus.$emit("busEmit", { type: "uploadImage", value: data }); bus.$emit("busEmit", { type: "uploadImage", value: data });
return false; return false;
...@@ -768,7 +813,7 @@ export default { ...@@ -768,7 +813,7 @@ export default {
this.$store.commit("updateSystemSetting", { this.$store.commit("updateSystemSetting", {
field: "gridValue", field: "gridValue",
value: this.grid[i], value: this.grid[i]
}); });
bus.$emit("busEmit", { type: "grid", value: this.grid[i] }); bus.$emit("busEmit", { type: "grid", value: this.grid[i] });
}, },
...@@ -810,7 +855,7 @@ export default { ...@@ -810,7 +855,7 @@ export default {
const outputPath = path.join(outputDir, outputFileName); const outputPath = path.join(outputDir, outputFileName);
const params = { const params = {
inputPath: el.productionFile, inputPath: el.productionFile,
outputPath: outputPath, outputPath: outputPath
}; };
let res; let res;
res = await this.$api.post("/processImage", params); res = await this.$api.post("/processImage", params);
...@@ -818,18 +863,18 @@ export default { ...@@ -818,18 +863,18 @@ export default {
return { return {
fileName: outputFileName, fileName: outputFileName,
productionFile: res.msg[0]?.outputPath, productionFile: res.msg[0]?.outputPath,
designId: el.designId || index, designId: el.designId || index
}; };
} catch (error) { } catch (error) {
console.error(`处理失败: ${el.productionFile}`, error); console.error(`处理失败: ${el.productionFile}`, error);
} }
}), })
); );
// 等待所有异步操作完成 // 等待所有异步操作完成
await new Promise((resolve) => setTimeout(resolve, 100)); await new Promise(resolve => setTimeout(resolve, 100));
const newMap = new Map(processQueue.map((el) => [el.designId, el])); const newMap = new Map(processQueue.map(el => [el.designId, el]));
processQueue.forEach((el) => { processQueue.forEach(el => {
if (newMap.has(el.designId)) { if (newMap.has(el.designId)) {
el.fileName = newMap.get(el.designId).fileName; el.fileName = newMap.get(el.designId).fileName;
el.productionFile = newMap.get(el.designId).productionFile; el.productionFile = newMap.get(el.designId).productionFile;
...@@ -844,7 +889,7 @@ export default { ...@@ -844,7 +889,7 @@ export default {
}, },
getCountryName(code) { getCountryName(code) {
if (code) { if (code) {
const item = this.countryList?.find((el) => el.countryCode == code); const item = this.countryList?.find(el => el.countryCode == code);
if (item) { if (item) {
return `(${item.nameCn})`; return `(${item.nameCn})`;
} }
...@@ -877,8 +922,8 @@ export default { ...@@ -877,8 +922,8 @@ export default {
this.detail = null; this.detail = null;
this.$store.commit("setProductDetail", {}); this.$store.commit("setProductDetail", {});
this.dialogVisible = false; this.dialogVisible = false;
}, }
}, }
}; };
</script> </script>
<style scoped> <style scoped>
...@@ -990,7 +1035,7 @@ export default { ...@@ -990,7 +1035,7 @@ export default {
<el-form-item prop="setting" label="网格显示"> <el-form-item prop="setting" label="网格显示">
<el-select <el-select
style="width:100%" style="width:100%"
@change="(e) => settingChange('gridShow', e)" @change="e => settingChange('gridShow', e)"
clearable clearable
v-model="setting.gridShow" v-model="setting.gridShow"
> >
...@@ -1001,7 +1046,7 @@ export default { ...@@ -1001,7 +1046,7 @@ export default {
<el-form-item prop="gridSpacing" label="单位"> <el-form-item prop="gridSpacing" label="单位">
<el-select <el-select
style="width:100%" style="width:100%"
@change="(e) => settingChange('unit', e)" @change="e => settingChange('unit', e)"
clearable clearable
v-model="setting.unit" v-model="setting.unit"
> >
...@@ -1012,7 +1057,7 @@ export default { ...@@ -1012,7 +1057,7 @@ export default {
<el-form-item prop="gridSpacing" label="网格间隔"> <el-form-item prop="gridSpacing" label="网格间隔">
<el-select <el-select
style="width:100%" style="width:100%"
@change="(e) => settingChange('gridSpacing', e)" @change="e => settingChange('gridSpacing', e)"
clearable clearable
v-model="setting.gridSpacing" v-model="setting.gridSpacing"
> >
...@@ -1041,7 +1086,7 @@ export default { ...@@ -1041,7 +1086,7 @@ export default {
<el-form-item prop="language" label="语言设置"> <el-form-item prop="language" label="语言设置">
<el-select <el-select
style="width:100%" style="width:100%"
@change="(e) => settingChange('language', e)" @change="e => settingChange('language', e)"
clearable clearable
v-model="setting.language" v-model="setting.language"
> >
...@@ -1133,7 +1178,7 @@ export default { ...@@ -1133,7 +1178,7 @@ export default {
{{ {{
user.factory.countryCode user.factory.countryCode
? `${user.factory.countryCode}${getCountryName( ? `${user.factory.countryCode}${getCountryName(
user.factory.countryCode, user.factory.countryCode
)}` )}`
: "CN(中国)" : "CN(中国)"
}} }}
...@@ -1211,7 +1256,7 @@ export default { ...@@ -1211,7 +1256,7 @@ export default {
> >
<el-button <el-button
v-if="!showforcedProduc" v-if="!showforcedProduc"
@click="(e) => forcedProductionFN(e, true)" @click="e => forcedProductionFN(e, true)"
style="color: red;" style="color: red;"
>自动强制生产</el-button >自动强制生产</el-button
> >
...@@ -1348,3 +1393,10 @@ export default { ...@@ -1348,3 +1393,10 @@ export default {
} }
} }
</style> </style>
<style>
.custom-inventory-msgbox {
width: 500px !important; /* 必须加 !important 覆盖默认样式 */
min-width: 500px !important; /* 防止被最小宽度限制 */
}
</style>
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