|
@@ -88,7 +88,7 @@
|
|
|
<el-table-column label="备查货号" width="120" align="center" >
|
|
|
<template slot-scope="scope">{{ scope.row.selectProductSn }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="商品编号" align="center">
|
|
|
+ <el-table-column label="序号" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<p>{{ scope.row.productSkuId }}</p>
|
|
|
</template>
|
|
@@ -209,7 +209,8 @@ import {
|
|
|
} from "@/api/skuStock";
|
|
|
import {
|
|
|
getProductSkuStockRecord,
|
|
|
- getProductSkuStockRecordCreate
|
|
|
+ getProductSkuStockRecordCreate,
|
|
|
+ getProductSkuStockRecordUpdate
|
|
|
} from "@/api/product";
|
|
|
const defaultListQuery = {
|
|
|
keyword: null,
|
|
@@ -278,7 +279,8 @@ export default {
|
|
|
productId: this.productId,
|
|
|
}
|
|
|
this.loading = true
|
|
|
- getProductSkuStockRecordCreate(obj).then(response=>{
|
|
|
+ if(this.type == 'create') {
|
|
|
+ getProductSkuStockRecordCreate(obj).then(response=>{
|
|
|
this.$message({
|
|
|
message: this.type == 'create' ? '添加成功' : '修改成功',
|
|
|
type: 'success',
|
|
@@ -290,6 +292,21 @@ export default {
|
|
|
}).catch(() => {
|
|
|
this.loading = false
|
|
|
});
|
|
|
+ } else {
|
|
|
+ getProductSkuStockRecordUpdate(obj).then(response=>{
|
|
|
+ this.$message({
|
|
|
+ message: this.type == 'create' ? '添加成功' : '修改成功',
|
|
|
+ type: 'success',
|
|
|
+ duration:1000
|
|
|
+ });
|
|
|
+ this.dialogVisible = false;
|
|
|
+ this.handleClose()
|
|
|
+ this.getList();
|
|
|
+ }).catch(() => {
|
|
|
+ this.loading = false
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
console.log('error submit!!');
|
|
|
return false;
|
|
@@ -310,6 +327,7 @@ export default {
|
|
|
this.type = 'update'
|
|
|
this.loading = false
|
|
|
this.editSkuInfo = {
|
|
|
+ id: row.id,
|
|
|
productId: row.productId,
|
|
|
productSkuId: row.productSkuId,
|
|
|
selectProductSn: row.selectProductSn,
|