Commit dd4ceb1b authored by 武广's avatar 武广

提交信息

parent 293c3965
...@@ -15,5 +15,6 @@ module.exports = { ...@@ -15,5 +15,6 @@ module.exports = {
'import/no-unresolved': 0, 'import/no-unresolved': 0,
'import/extensions': 0, 'import/extensions': 0,
'no-unused-expressions': ['error', { allowShortCircuit: true }], 'no-unused-expressions': ['error', { allowShortCircuit: true }],
'template-curly-spacing': 'off',
}, },
}; };
...@@ -87,21 +87,20 @@ const ServiceGoods = options => { ...@@ -87,21 +87,20 @@ const ServiceGoods = options => {
const resetForm = () => clearCurrent(checkFormList).forEach(({ current }) => current.reset()); const resetForm = () => clearCurrent(checkFormList).forEach(({ current }) => current.reset());
const onValuesChange = e => { const onValuesChange = e => {
if (!isEdit && productType !== 5) { if (!isEdit) {
const typeObj = {
type: productType,
};
if (visibleCacheEdit) { if (visibleCacheEdit) {
setVisibleCacheEdit(false); setVisibleCacheEdit(false);
localStorage.remove(localAutoSaveKey); localStorage.remove(localAutoSaveKey);
onAutoSaveValue( onAutoSaveValue(typeObj, !0);
{
type: productType,
},
!0,
);
} }
onAutoSaveValue(e); onAutoSaveValue(Object.assign(typeObj, e));
} }
if (productType === 5) { if (productType === 5) {
setTakeawayInfoMation(e); setTakeawayInfoMation(e);
// console.log('takeawayInfoMation', takeawayInfoMation);
} }
}; };
...@@ -253,8 +252,8 @@ const ServiceGoods = options => { ...@@ -253,8 +252,8 @@ const ServiceGoods = options => {
if (productType === 5) { if (productType === 5) {
console.log(sendData, 'sendData'); console.log(sendData, 'sendData');
if (+sendData?.repertoryType === 2 && sendData?.items?.length < 2) { if (+sendData?.repertoryType === 2 && sendData?.items?.length < 2) {
message.error('最少生成2个sku') message.error('最少生成2个sku');
return return;
} }
sendMerchantProductHttpRequest(sendData); sendMerchantProductHttpRequest(sendData);
return; return;
......
...@@ -319,25 +319,25 @@ export const onAutoSaveValue = (e, isClear) => { ...@@ -319,25 +319,25 @@ export const onAutoSaveValue = (e, isClear) => {
localStorage.set(localAutoSaveKey, Object.assign({}, e)); localStorage.set(localAutoSaveKey, Object.assign({}, e));
} else { } else {
const info = localStorage.get(localAutoSaveKey) || {}; const info = localStorage.get(localAutoSaveKey) || {};
localStorage.set(localAutoSaveKey, Object.assign({ type:e.type }, info, e)); localStorage.set(localAutoSaveKey, Object.assign({}, info, e));
} }
}; };
export const calcDescartes = (array) => { export const calcDescartes = array => {
console.log(array,"array"); console.log(array, 'array');
if (array.length < 2) return array[0] || []; if (array.length < 2) return array[0] || [];
return [].reduce.call(array, function (col, set) { return [].reduce.call(array, function(col, set) {
var res = []; var res = [];
col.forEach(function (c) { col.forEach(function(c) {
set.forEach(function (s) { set.forEach(function(s) {
var t = [].concat(Array.isArray(c) ? c : [c]); var t = [].concat(Array.isArray(c) ? c : [c]);
t.push(s); t.push(s);
res.push(t); res.push(t);
}) });
}); });
return res; return res;
}); });
} };
\ No newline at end of file
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