|
@@ -105,7 +105,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="条码">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.product_barcode }}
|
|
|
+ {{ scope.row.bar_code }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="序列号">
|
|
@@ -115,15 +115,17 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="规格型号">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.specification }}
|
|
|
+ {{ scope.row.goods_style }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="单位">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.unit }}
|
|
|
+ {{ scope.row.goods_unit }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="订单数量"> </el-table-column>
|
|
|
+ <el-table-column label="订单数量">
|
|
|
+
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="入库数量">
|
|
|
<template slot-scope="scope">
|
|
|
<el-input
|
|
@@ -219,6 +221,7 @@
|
|
|
v-model="scanGoodsForm.bar_code"
|
|
|
ref="input"
|
|
|
@keyup.enter.native="toSearch()"
|
|
|
+ @blur="blurCode()"
|
|
|
:minlength="0"
|
|
|
:maxlength="100"
|
|
|
></el-input>
|
|
@@ -275,6 +278,7 @@ import * as API_BasicSetting from "@/api/basicSetting";
|
|
|
import * as API_Erp from "@/api/erp";
|
|
|
import * as API_Auth from "@/api/auth";
|
|
|
import * as API_order from "@/api/order";
|
|
|
+import * as API_Goods from "@/api/goods";
|
|
|
export default {
|
|
|
name: "goodsExchangeAdd",
|
|
|
data() {
|
|
@@ -450,13 +454,33 @@ export default {
|
|
|
...mapGetters(["user"]),
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 根据条码 序列号查询商品
|
|
|
+ blurCode(){
|
|
|
+ if(this.scanGoodsForm.bar_code!==undefined || this.scanGoodsForm.sn_code!==undefined){
|
|
|
+ // 通过列表查询商品详细信息
|
|
|
+ API_Goods.getGoodsList({barcode:this.scanGoodsForm.bar_code,sncode:this.scanGoodsForm.sn_code}).then(res=>{
|
|
|
+ console.log(res);
|
|
|
+ this.goodsExchangeAddForm.contract_product_list=res.data
|
|
|
+ this.scanDialogVisible=false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
// 查询订单编号
|
|
|
blurUsername(){
|
|
|
- /* API_order.getOrderList({sn:this.goodsExchangeAddForm.sn}).then(res=>{
|
|
|
- console.log(res.data);
|
|
|
- this.goodsExchangeAddForm.order_id= Number(res.data[0].id)
|
|
|
- }) */
|
|
|
+ if(this.goodsExchangeAddForm.sn!==undefined){
|
|
|
+ API_order.getOrderList({sn:this.goodsExchangeAddForm.sn}).then(res=>{
|
|
|
+ console.log(res.data);
|
|
|
+ this.goodsExchangeAddForm.order_id= Number(res.data[0].id)
|
|
|
+ this.goodsExchangeAddForm.contract_product_list=res.data
|
|
|
+ })
|
|
|
+ }/* else{
|
|
|
+ this.$message.error("请填写订单编号")
|
|
|
+ } */
|
|
|
},
|
|
|
+ /* 通过id查询商品信息
|
|
|
+ orderInfo(id){
|
|
|
+ API_
|
|
|
+ },*/
|
|
|
handleSelectionChange(val) {
|
|
|
this.goodsList = val.map((el) => {
|
|
|
el.product_id = el.id;
|