|
@ -182,11 +182,22 @@ const openForm = (type: string, row?: any) => { |
|
|
|
|
|
|
|
|
// form表单提交 |
|
|
// form表单提交 |
|
|
const formsSuccess = async (formType,submitData) => { |
|
|
const formsSuccess = async (formType,submitData) => { |
|
|
|
|
|
|
|
|
let data = {...submitData} |
|
|
let data = {...submitData} |
|
|
let cycle = data.cycle |
|
|
let cycle = data.cycle |
|
|
cycle.forEach(item=>{ |
|
|
if (formType === 'create') { |
|
|
data[item] = 1 |
|
|
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 |
|
|
delete data.cycle |
|
|
console.log('formsSuccess',formType,data) |
|
|
console.log('formsSuccess',formType,data) |
|
|
var isHave =SupplierCycle.allSchemas.formSchema.some(function (item) { |
|
|
var isHave =SupplierCycle.allSchemas.formSchema.some(function (item) { |
|
|