|
|
@ -95,8 +95,8 @@ |
|
|
|
:tableData="detatableData.tableList" |
|
|
|
:isBusiness="true" |
|
|
|
:isShowButton="false" |
|
|
|
@searchTableSuccess="searchTableSuccessLabel" |
|
|
|
@submitForm="submitFormLabel" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</template> |
|
|
@ -148,9 +148,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
|
row['orderQty'] = val[0]['orderQty'] |
|
|
|
row['uom'] = val[0]['uom'] |
|
|
|
} |
|
|
|
if (formField == 'packQty'){ |
|
|
|
row['packUnit'] = val[0]['packUnit'] |
|
|
|
} |
|
|
|
} else { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
@ -183,13 +180,30 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => { |
|
|
|
setV['poLine'] = val[0]['poLine'] |
|
|
|
setV['uom'] = val[0]['uom'] |
|
|
|
} |
|
|
|
if (formField == 'packQty'){ |
|
|
|
setV['packUnit'] = val[0]['packUnit'] |
|
|
|
} |
|
|
|
formRef.setValues(setV) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row) => { |
|
|
|
nextTick(() => { |
|
|
|
console.log("formField:",formField) |
|
|
|
console.log("val:",val) |
|
|
|
if (type == 'tableForm') { |
|
|
|
// 明细查询页赋值 |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
if (formField == 'packUnit') { |
|
|
|
row['packUnit'] = val[0]['packUnit'] |
|
|
|
row['packQty'] = val[0]['packQty'] |
|
|
|
} |
|
|
|
if (formField == 'secondPackUnit') { |
|
|
|
row['secondPackUnit'] = val[0]['packUnit'] |
|
|
|
row['secondPackQty'] = val[0]['packQty'] |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
|
getListApi: SupplierdeliverRequestMainApi.getSupplierdeliverRequestMainPage // 分页接口 |
|
|
|
}) |
|
|
@ -543,8 +557,12 @@ const { getList:getDetailList } = detatableMethods |
|
|
|
// 生成标签按钮操作 |
|
|
|
const submitFormLabel = async (formType, data) => { |
|
|
|
try { |
|
|
|
console.log("formType==",formType) |
|
|
|
console.log("data==",data) |
|
|
|
data.subList = detatableData.tableList |
|
|
|
console.log("detatableData",detatableData) |
|
|
|
await message.confirm('是否为此数据生成标签?') |
|
|
|
await SupplierdeliverRequestMainApi.genLabel(genLabelId.value) |
|
|
|
await SupplierdeliverRequestMainApi.genLabel(data) |
|
|
|
isCreateLabel.value = true |
|
|
|
message.success('创建标签成功') |
|
|
|
} finally { |
|
|
|