Commit 8b0b2e01d9a5e7bb31d1b63fc556cb0dd38b7854
1 parent
2da848f8
优化工序表保存排序;
Showing
1 changed file
with
15 additions
and
2 deletions
src/components/QuickQuote/index.jsx
| ... | ... | @@ -1185,6 +1185,19 @@ const QuickQuoteEvent = props => { |
| 1185 | 1185 | addState.slaveSelectedRowKeys = [slaveData[0].sId]; |
| 1186 | 1186 | } |
| 1187 | 1187 | |
| 1188 | + const { sPrintConfig = {}, downAbleConfigs = [], finishedConfigs = [] } = state; | |
| 1189 | + const processConfigs = [sPrintConfig, ...downAbleConfigs, ...finishedConfigs]; | |
| 1190 | + | |
| 1191 | + const configOrderMap = {}; | |
| 1192 | + processConfigs.forEach((config, index) => { | |
| 1193 | + configOrderMap[config.sId] = index; | |
| 1194 | + }); | |
| 1195 | + | |
| 1196 | + processData.sort((a, b) => { | |
| 1197 | + return configOrderMap[a.sProcessClassifyId] - configOrderMap[b.sProcessClassifyId]; | |
| 1198 | + }); | |
| 1199 | + processData = processData.map((item, index) => ({ ...item, iOrder: index + 1 })) | |
| 1200 | + | |
| 1188 | 1201 | const newState = { |
| 1189 | 1202 | materialsConfig, |
| 1190 | 1203 | masterData: { ...masterData1, ...masterData }, |
| ... | ... | @@ -3222,8 +3235,8 @@ const BoxModelSelectedModal = props => { |
| 3222 | 3235 | const noImage = commonFunc.showLocalMessage(props, "ImpositionInformation", "暂无图片"); |
| 3223 | 3236 | let btnSelectTitle = commonFunc.showLocalMessage(props, "BtnSelect", "选择"); |
| 3224 | 3237 | const sLanguage = props.app?.userinfo?.sLanguage; |
| 3225 | - if(sLanguage === 'sEnglish') { | |
| 3226 | - btnSelectTitle = 'BtnSelect'; | |
| 3238 | + if (sLanguage === "sEnglish") { | |
| 3239 | + btnSelectTitle = "BtnSelect"; | |
| 3227 | 3240 | } |
| 3228 | 3241 | const tableProps = { |
| 3229 | 3242 | ...commonBusiness.getTableTypes("box", { | ... | ... |