Browse Source

完善问题

master
djz236@163.com 2 years ago
parent
commit
225031f462
  1. 5
      warehousing-system/project/wh-common/src/main/java/com/wh/pojo/Location.java
  2. 4
      warehousing-system/project/wh-common/src/main/java/com/wh/pojo/Product.java
  3. 4
      warehousing-system/project/wh-common/src/main/java/com/wh/pojo/Supplier.java
  4. 2
      warehousing-system/project/wh-common/src/main/java/com/wh/pojo/purchasenew/PurchasenewVo.java
  5. 1
      warehousing-system/project/wh-manage/src/main/java/com/wh/service/purchasenew/PurchasenewService.java
  6. 4
      warehousing-system/project_web/src/components/initial_value/supplier.vue
  7. 3
      warehousing-system/project_web_ui/src/views/component/initial_value/add/productAdd.vue
  8. 10
      warehousing-system/project_web_ui/src/views/component/initial_value/supplier.vue
  9. 10
      warehousing-system/project_web_ui/src/views/component/instorehouse/purchase.vue

5
warehousing-system/project/wh-common/src/main/java/com/wh/pojo/Location.java

@ -1,5 +1,6 @@
package com.wh.pojo; package com.wh.pojo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
@ -9,8 +10,10 @@ import lombok.experimental.Accessors;
@Accessors(chain = true) @Accessors(chain = true)
@TableName("location") @TableName("location")
public class Location { public class Location {
private String name; //货位名称 private String name; //货位名称
@TableId("location_id") @TableId(type = IdType.AUTO)
private int id;
private String locationId; //货位编号 private String locationId; //货位编号
private String type; //货位类型 private String type; //货位类型
private String status; //货位状态 private String status; //货位状态

4
warehousing-system/project/wh-common/src/main/java/com/wh/pojo/Product.java

@ -1,5 +1,6 @@
package com.wh.pojo; package com.wh.pojo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
@ -11,7 +12,8 @@ import lombok.experimental.Accessors;
@Accessors(chain = true) @Accessors(chain = true)
@ToString @ToString
public class Product { public class Product {
@TableId("bar_code") @TableId(type = IdType.AUTO)
private int id;
private String barCode; //条码 private String barCode; //条码
private String name; //商品名 private String name; //商品名
private String anotherName; //别名 private String anotherName; //别名

4
warehousing-system/project/wh-common/src/main/java/com/wh/pojo/Supplier.java

@ -1,5 +1,6 @@
package com.wh.pojo; package com.wh.pojo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
@ -9,7 +10,8 @@ import lombok.experimental.Accessors;
@Accessors(chain = true) @Accessors(chain = true)
@TableName("supplier") @TableName("supplier")
public class Supplier { public class Supplier {
@TableId("name") @TableId(type = IdType.AUTO)
private int id;
private String name; //供应商名称 private String name; //供应商名称
private String contacts; //联系人 private String contacts; //联系人
private String number; //电话 private String number; //电话

2
warehousing-system/project/wh-common/src/main/java/com/wh/pojo/purchasenew/PurchasenewVo.java

@ -71,6 +71,6 @@ public class PurchasenewVo implements Vo {
@ApiModelProperty("仓库id") @ApiModelProperty("仓库id")
private String storehouseId; // 仓库id private String storehouseId; // 仓库id
@ApiModelProperty("状态") @ApiModelProperty("状态")
private String status; // 状态 private String state; // 状态
} }

1
warehousing-system/project/wh-manage/src/main/java/com/wh/service/purchasenew/PurchasenewService.java

@ -180,6 +180,7 @@ public class PurchasenewService extends MybatisBaseService<PurchasenewMapper, Pu
public void updateStateToInputBySid(String purchaseSid) { public void updateStateToInputBySid(String purchaseSid) {
Purchasenew purchasenew = fetchBySid(purchaseSid); Purchasenew purchasenew = fetchBySid(purchaseSid);
purchasenew.setState(2); purchasenew.setState(2);
purchasenew.setModifyTime(new Date());
baseMapper.updateById(purchasenew); baseMapper.updateById(purchasenew);
} }
} }

4
warehousing-system/project_web/src/components/initial_value/supplier.vue

@ -26,11 +26,11 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="contacts" prop="contacts"
label="供应商简称"> label="联系人">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="number" prop="number"
label="供应商地址"> label="电话">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="remarks" prop="remarks"

3
warehousing-system/project_web_ui/src/views/component/initial_value/add/productAdd.vue

@ -123,7 +123,7 @@
this.handleReturn('true') this.handleReturn('true')
}, },
async addProduct () { async addProduct () {
const { data: result } = await this.$http.post('/product/addProduct', this.addProductForm) const { data: result } = await this.$http.post('/product/addProduct', this.locationForm)
if (result.status !== 200) return this.$message.error('添加产品失败') if (result.status !== 200) return this.$message.error('添加产品失败')
this.$message.success('添加产品成功') this.$message.success('添加产品成功')
this.handleReturn('true') this.handleReturn('true')
@ -205,4 +205,3 @@
} }
</style> </style>

10
warehousing-system/project_web_ui/src/views/component/initial_value/supplier.vue

@ -32,11 +32,11 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="contacts" prop="contacts"
label="供应商简称"> label="联系人">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="number" prop="number"
label="供应商地址"> label="电话">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="remarks" prop="remarks"
@ -196,10 +196,10 @@ export default {
type: 'warning' type: 'warning'
}).catch(error => error) }).catch(error => error)
if (result !== 'confirm') return this.$message.info('用户取消操作') if (result !== 'confirm') return this.$message.info('用户取消操作')
const { data: resultDB } = await this.$http.delete(`/supplier/delete/${supplier.name}`) const { data: resultDB } = await this.$http.delete(`/supplier/delete/${supplier.id}`)
if (resultDB.status !== 200) return this.$message.error('删除商失败') if (resultDB.status !== 200) return this.$message.error('删除供应商失败')
this.getSupplierList() this.getSupplierList()
this.$message.success('商删除成功') this.$message.success('供应商删除成功')
}, },
toAdd() { toAdd() {
this.viewState = 2 this.viewState = 2

10
warehousing-system/project_web_ui/src/views/component/instorehouse/purchase.vue

@ -59,7 +59,7 @@
width="180"> width="180">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="status" prop="state"
label="状态" label="状态"
align="center" align="center"
width="180"> width="180">
@ -150,7 +150,7 @@ export default {
supplierName:'', supplierName:'',
count: '', count: '',
storehouse: '', storehouse: '',
status: '', state: '',
products:[] products:[]
}, },
pirce:'', pirce:'',
@ -194,10 +194,14 @@ export default {
}, },
async getPurchaseList () { async getPurchaseList () {
const { data: result } = await this.$http.post('/purchasenew/listPage', this.queryInfo) const { data: result } = await this.$http.post('/purchasenew/listPage', this.queryInfo)
console.log(result);
if (result.code == 200){ if (result.code == 200){
console.log(result);
this.queryInfo.total=result.data.total this.queryInfo.total=result.data.total
this.purchaseList = result.data.records this.purchaseList = result.data.records
} }
console.log(this.purchaseList);
}, },
clearList(){ clearList(){
this.purchaseForm={ this.purchaseForm={
@ -211,7 +215,7 @@ export default {
supplierName:'', supplierName:'',
count: '', count: '',
storehouse: '', storehouse: '',
status: '', state: '',
products:[] products:[]
} }

Loading…
Cancel
Save