Commit dd4ceb1b authored by 武广's avatar 武广

提交信息

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