|
@@ -171,10 +171,10 @@ export default {
|
|
|
this.getCost(this.form.productSn)
|
|
|
},
|
|
|
// 根据产品编码获取成本价
|
|
|
- getCost(sn){
|
|
|
+ getCost (sn) {
|
|
|
const _this = this
|
|
|
- stockByProductSn({sn: sn}).then(res => {
|
|
|
- if(res.status == 200){
|
|
|
+ stockByProductSn({ sn: sn }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
_this.form.productCost = res.data.lastStockCost
|
|
|
}
|
|
|
})
|
|
@@ -185,7 +185,7 @@ export default {
|
|
|
if (res.status == 200) {
|
|
|
const data = res.data
|
|
|
this.form = Object.assign(this.form, data)
|
|
|
- this.fetchUser(this.form.productSn)
|
|
|
+ this.fetchUser(this.form.productCode)
|
|
|
this.form.warehouse = [this.form.warehouseSn, this.form.warehouseLocationSn]
|
|
|
this.warehouseSnBackups = this.form.warehouseSn || undefined
|
|
|
this.warehouseLocationSnBackups = this.form.warehouseLocationSn || undefined
|