Browse Source

要货预测周期管理编辑保存不上问题修改

hella_online_20240904
yufei0306 3 months ago
parent
commit
5f719d3387
  1. 11
      src/views/wms/basicDataManage/supplierManage/supplierCycle/index.vue

11
src/views/wms/basicDataManage/supplierManage/supplierCycle/index.vue

@ -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
if (formType === 'create') {
cycle.forEach(item=>{ cycle.forEach(item=>{
data[item] = 1 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) {

Loading…
Cancel
Save