|
@ -108,6 +108,7 @@ 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 * as StdcostpriceApi from '@/api/wms/stdcostprice' |
|
|
|
|
|
import * as SalepriceApi from '@/api/wms/saleprice' |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
import * as SupplieritemApi from '@/api/wms/supplieritem' |
|
|
import * as SupplieritemApi from '@/api/wms/supplieritem' |
|
|
import * as SupplierApi from '@/api/wms/supplier' |
|
|
import * as SupplierApi from '@/api/wms/supplier' |
|
@ -171,6 +172,29 @@ const clearSearchInput = (formField) => { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
SalepriceApi.getSalepricePage(params2).then((res) => { |
|
|
|
|
|
if (res.list?.length > 0) { |
|
|
|
|
|
priceObj.value = res.list[0] |
|
|
|
|
|
|
|
|
|
|
|
basicFormRef.value.formRef.setValues({ |
|
|
|
|
|
standardCostPrice: priceObj.value.price |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
StdcostpriceApi.getStdcostpricePage(params2).then((res) => { |
|
|
|
|
|
if (res.list?.length > 0) { |
|
|
|
|
|
priceObj.value = res.list[0] |
|
|
|
|
|
|
|
|
|
|
|
basicFormRef.value.formRef.setValues({ |
|
|
|
|
|
standardCostPrice: priceObj.value.price |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
formRef.setValues({ |
|
|
|
|
|
standardCostPrice: 0 |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
@ -230,12 +254,25 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
sort: '' |
|
|
sort: '' |
|
|
} |
|
|
} |
|
|
params2.isSearch = true |
|
|
params2.isSearch = true |
|
|
StdcostpriceApi.getStdcostpricePage(params2).then((res) => { |
|
|
SalepriceApi.getSalepricePage(params2).then((res) => { |
|
|
if (res.list?.length > 0) { |
|
|
if (res.list?.length > 0) { |
|
|
priceObj.value = res.list[0] |
|
|
priceObj.value = res.list[0] |
|
|
formRef.setValues({ |
|
|
formRef.setValues({ |
|
|
standardCostPrice: priceObj.value.price |
|
|
standardCostPrice: priceObj.value.price |
|
|
}) |
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
StdcostpriceApi.getStdcostpricePage(params2).then((res) => { |
|
|
|
|
|
if (res.list?.length > 0) { |
|
|
|
|
|
priceObj.value = res.list[0] |
|
|
|
|
|
formRef.setValues({ |
|
|
|
|
|
standardCostPrice: priceObj.value.price |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
formRef.setValues({ |
|
|
|
|
|
standardCostPrice: 0 |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
setV[formField] = val[0][searchField] |
|
|
setV[formField] = val[0][searchField] |
|
@ -304,8 +341,9 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
if (basicFormRef.value.formRef.formModel.lightItemCode == null|| |
|
|
if ( |
|
|
basicFormRef.value.formRef.formModel.lightItemCode == '' |
|
|
basicFormRef.value.formRef.formModel.lightItemCode == null || |
|
|
|
|
|
basicFormRef.value.formRef.formModel.lightItemCode == '' |
|
|
) { |
|
|
) { |
|
|
setV['standardCostPrice'] = '' |
|
|
setV['standardCostPrice'] = '' |
|
|
setV['lightQty'] = 0 |
|
|
setV['lightQty'] = 0 |
|
@ -322,12 +360,26 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
sort: '' |
|
|
sort: '' |
|
|
} |
|
|
} |
|
|
params2.isSearch = true |
|
|
params2.isSearch = true |
|
|
StdcostpriceApi.getStdcostpricePage(params2).then((res) => { |
|
|
|
|
|
|
|
|
SalepriceApi.getSalepricePage(params2).then((res) => { |
|
|
if (res.list?.length > 0) { |
|
|
if (res.list?.length > 0) { |
|
|
priceObj.value = res.list[0] |
|
|
priceObj.value = res.list[0] |
|
|
formRef.setValues({ |
|
|
formRef.setValues({ |
|
|
standardCostPrice: priceObj.value.price |
|
|
standardCostPrice: priceObj.value.price |
|
|
}) |
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
StdcostpriceApi.getStdcostpricePage(params2).then((res) => { |
|
|
|
|
|
if (res.list?.length > 0) { |
|
|
|
|
|
priceObj.value = res.list[0] |
|
|
|
|
|
formRef.setValues({ |
|
|
|
|
|
standardCostPrice: priceObj.value.price |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
formRef.setValues({ |
|
|
|
|
|
standardCostPrice: 0 |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|