|
|
@ -182,11 +182,22 @@ const openForm = (type: string, row?: any) => { |
|
|
|
|
|
|
|
// form表单提交 |
|
|
|
const formsSuccess = async (formType,submitData) => { |
|
|
|
|
|
|
|
let data = {...submitData} |
|
|
|
let cycle = data.cycle |
|
|
|
cycle.forEach(item=>{ |
|
|
|
data[item] = 1 |
|
|
|
}) |
|
|
|
if (formType === 'create') { |
|
|
|
cycle.forEach(item=>{ |
|
|
|
data[item] = 1 |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
let week = ['monday','tuesday','wednesday','thursday','friday','saturday','sunday'] |
|
|
|
week.forEach(item=>{ |
|
|
|
data[item] = cycle.indexOf(item)>-1?1:0 |
|
|
|
}) |
|
|
|
} |
|
|
|
console.log('submitData',data) |
|
|
|
|
|
|
|
|
|
|
|
delete data.cycle |
|
|
|
console.log('formsSuccess',formType,data) |
|
|
|
var isHave =SupplierCycle.allSchemas.formSchema.some(function (item) { |
|
|
|