|
|
@ -59,6 +59,7 @@ |
|
|
|
@tableSelectionDelete="tableSelectionDelete" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
@submitForm="submitForm" |
|
|
|
@inputNumberChange="inputNumberChange" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
@ -101,6 +102,7 @@ |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
import download from '@/utils/download' |
|
|
|
import * as StdcostpriceApi from '@/api/wms/stdcostprice' |
|
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
|
import { ProductionscrapRequestMain,ProductionscrapRequestMainRules,ProductionscrapRequestDetail,ProductionscrapRequestDetailRules,ProductionscrapRequestDetailLabel,ProductionscrapRequestDetailLabelRules, SupplierdeliverRequestPackage } from './productionscrapRequestMain.data' |
|
|
|
import * as ProductionscrapRequestMainApi from '@/api/wms/productionscrapRequestMain' |
|
|
@ -183,7 +185,11 @@ const isItemType = async (itemCode, labelTypeParams) => { |
|
|
|
if (!isType) labelType.value = labelTypeOld |
|
|
|
return isType |
|
|
|
} |
|
|
|
|
|
|
|
const inputNumberChange = (field, index, row, val) => { |
|
|
|
if(field == 'qty' ){ |
|
|
|
row.amount = Number(Number(row.qty * row.singlePrice).toFixed(2)) |
|
|
|
} |
|
|
|
} |
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|
|
|
nextTick(async () => { |
|
|
@ -216,6 +222,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
item.tableForm.max = val[0]['qty'] |
|
|
|
} |
|
|
|
}) |
|
|
|
let param = {'itemCodes':val[0]['itemCode']} |
|
|
|
let resyStdcost = await StdcostpriceApi.queryStdcostpriceByItemCode(param) |
|
|
|
console.log('resyStdcost',resyStdcost) |
|
|
|
if(resyStdcost&&resyStdcost.length>0){ |
|
|
|
row['singlePrice'] = resyStdcost[0].price |
|
|
|
row['amount'] = Number(Number(resyStdcost[0].price * row['qty']).toFixed(2)) |
|
|
|
} |
|
|
|
} |
|
|
|
} else if(formField == 'workStationCode') { |
|
|
|
// 明细查询页赋值 |
|
|
|