|
@ -55,6 +55,7 @@ |
|
|
:apiCreate="Q1Api.createQ1" |
|
|
:apiCreate="Q1Api.createQ1" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
:isBusiness="false" |
|
|
:isBusiness="false" |
|
|
|
|
|
@onChange="onChange" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
<!-- 详情 --> |
|
@ -77,6 +78,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
|
|
|
import * as StdcostpriceApi from '@/api/wms/stdcostprice' |
|
|
|
|
|
|
|
|
import { useUserStore } from '@/store/modules/user' |
|
|
import { useUserStore } from '@/store/modules/user' |
|
|
const userStore = useUserStore() |
|
|
const userStore = useUserStore() |
|
@ -92,20 +94,45 @@ routeName.value = route.name |
|
|
const tableColumns = ref(Q1.allSchemas.tableColumns) |
|
|
const tableColumns = ref(Q1.allSchemas.tableColumns) |
|
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
|
|
|
const priceObj = ref() |
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
nextTick(() => { |
|
|
nextTick(async () => { |
|
|
const setV = {} |
|
|
const setV = {} |
|
|
if (formField == 'customerCode') { |
|
|
if (formField == 'customerCode') { |
|
|
setV['itemCode'] = '' |
|
|
setV['itemCode'] = '' |
|
|
} |
|
|
} |
|
|
if (formField == 'itemCode') { |
|
|
if (formField == 'itemCode') { |
|
|
setV['uom'] = val[0]['customerUom'] |
|
|
setV['uom'] = val[0]['customerUom'] |
|
|
|
|
|
console.log(333,val[0].code) |
|
|
|
|
|
const params = { |
|
|
|
|
|
by: "ASC", |
|
|
|
|
|
filters: [{column: "itemCode", action: "==", value: val[0].itemCode}], |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
pageSize: 500, |
|
|
|
|
|
sort: "" |
|
|
|
|
|
} |
|
|
|
|
|
params.isSearch = true |
|
|
|
|
|
StdcostpriceApi.getStdcostpricePage(params).then((res) => { |
|
|
|
|
|
if (res.list?.length > 0) { |
|
|
|
|
|
priceObj.value = res.list[0] |
|
|
|
|
|
formRef.setValues({ |
|
|
|
|
|
claimAmount: (parseFloat(formRef.formModel.qty) * parseFloat(priceObj.value.price)).toFixed(6) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
setV[formField] = val[0][searchField] |
|
|
setV[formField] = val[0][searchField] |
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const onChange =(field,e)=>{ |
|
|
|
|
|
if (field == 'qty') { |
|
|
|
|
|
basicFormRef.value.formRef.formModel.claimAmount = (parseFloat( basicFormRef.value.formRef.formModel.qty) * parseFloat( priceObj.value.price)).toFixed(6) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
// 字段设置 更新主列表字段 |
|
|
const updataTableColumns = (val) => { |
|
|
const updataTableColumns = (val) => { |
|
|
tableColumns.value = val |
|
|
tableColumns.value = val |
|
|