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. 415
      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. 16
      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;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@ -9,8 +10,10 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("location")
public class Location {
private String name; //货位名称
@TableId("location_id")
@TableId(type = IdType.AUTO)
private int id;
private String locationId; //货位编号
private String type; //货位类型
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;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@ -11,7 +12,8 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@ToString
public class Product {
@TableId("bar_code")
@TableId(type = IdType.AUTO)
private int id;
private String barCode; //条码
private String name; //商品名
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;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@ -9,7 +10,8 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("supplier")
public class Supplier {
@TableId("name")
@TableId(type = IdType.AUTO)
private int id;
private String name; //供应商名称
private String contacts; //联系人
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")
private String storehouseId; // 仓库id
@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) {
Purchasenew purchasenew = fetchBySid(purchaseSid);
purchasenew.setState(2);
purchasenew.setModifyTime(new Date());
baseMapper.updateById(purchasenew);
}
}

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

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

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

@ -1,208 +1,207 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>{{ viewTitle }}</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" @click="saveOrUpdate">保存</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="listconadd">
<el-card class="box-card">
<div class="item">
<span class="item_text">条码</span>
<el-input v-model="locationForm.barCode" :disabled="disabledCode" placeholder="" class="item_inputs" clearable />
<el-button type="primary" size="small" @click="createBarCode" :disabled="disabledCode">自动</el-button>
</div>
<div class="item">
<span class="item_text">商品名</span>
<el-input v-model="locationForm.name" :disabled="disabledCode" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">别名</span>
<el-input v-model="locationForm.anotherName" class="item_input" clearable></el-input>
</div>
<div class="item">
<span class="item_text">价值</span>
<el-input v-model="locationForm.value" class="item_input" clearable></el-input>
</div>
<div class="item">
<span class="item_text">净重</span>
<el-input v-model="locationForm.netWeight" class="item_input" clearable></el-input>
</div>
<div class="item">
<span class="item_text">毛重</span>
<el-input v-model="locationForm.roughWeight" class="item_input" clearable></el-input>
</div>
<div class="item">
<span class="item_text">有效天数</span>
<el-input v-model="locationForm.effectiveDays" class="item_input" clearable></el-input>
</div>
<div class="item">
<span class="item_text">备注</span>
<el-input v-model="locationForm.remarks" class="item_input" clearable></el-input>
</div>
</el-card>
</div>
</div>
</template>
<script>
export default {
data() {
return {
submitdisabled: false,
disabledCode: false,
locationForm: {
barCode: "",
name: "",
anotherName: "",
value: "",
netWeight: "",
roughWeight: "",
effectiveDays: "",
remarks: "",
},
viewTitle: "【新增】产品信息",
}
},
created() {
},
methods: {
saveOrUpdate() {
if (this.viewTitle === "【新增】产品信息") return this.addProduct()
if (this.viewTitle === "【修改】产品信息") {
this.updataProduct()
}
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.clearList()
this.$emit('doback')
},
showAdd() {
this.viewTitle = "【新增】产品信息";
this.disabledCode=false
this.clearList()
},
clearList(){
this.locationForm = {
barCode: "",
name: "",
anotherName: "",
value: "",
netWeight: "",
roughWeight: "",
effectiveDays: "",
remarks: "",
}
},
showEdit(row) {
this.viewTitle = "【修改】产品信息";
this.disabledCode=true
this.locationForm=row
},
async updataProduct () {
this.locationForm = {
name: "",
anotherName: "",
}
const { data: result } = await this.$http.put('/product/updataProduct', this.locationForm)
if (result.status !== 200) return this.$message.error('更新数据失败')
this.$message.success('更新成功')
this.handleReturn('true')
},
async addProduct () {
const { data: result } = await this.$http.post('/product/addProduct', this.addProductForm)
if (result.status !== 200) return this.$message.error('添加产品失败')
this.$message.success('添加产品成功')
this.handleReturn('true')
},
createBarCode () {
var now = new Date()
var nowstr = now.getTime()
this.locationForm.barCode = 'P' + now.getTime()
},
}
}
</script>
<style lang="scss">
.box-card {
margin-left: 60px;
margin-right: 60px;
min-width: 70%;
margin-top: 20px;
.item {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
flex: 0.8;
font-size: 18px;
text-align: right;
}
.item_input {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_inputs {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 28px;
}
.item_left_input {
width: 20%;
}
.item_left_text {
height: 30px;
margin-left: 20px;
line-height: 30px;
color: #018AD2;
padding: 0px 15px;
border: 1.5px solid #018AD2;
border-radius: 5px;
}
.item_right {
flex: 1;
justify-items: center;
.item_right_list_text {
font-size: 16px;
}
.item_right_list_delect {
color: #5E94FF;
margin-left: 20px;
font-size: 16px;
text-decoration: underline;
}
}
}
}
</style>
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>{{ viewTitle }}</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" @click="saveOrUpdate">保存</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="listconadd">
<el-card class="box-card">
<div class="item">
<span class="item_text">条码</span>
<el-input v-model="locationForm.barCode" :disabled="disabledCode" placeholder="" class="item_inputs" clearable />
<el-button type="primary" size="small" @click="createBarCode" :disabled="disabledCode">自动</el-button>
</div>
<div class="item">
<span class="item_text">商品名</span>
<el-input v-model="locationForm.name" :disabled="disabledCode" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">别名</span>
<el-input v-model="locationForm.anotherName" class="item_input" clearable></el-input>
</div>
<div class="item">
<span class="item_text">价值</span>
<el-input v-model="locationForm.value" class="item_input" clearable></el-input>
</div>
<div class="item">
<span class="item_text">净重</span>
<el-input v-model="locationForm.netWeight" class="item_input" clearable></el-input>
</div>
<div class="item">
<span class="item_text">毛重</span>
<el-input v-model="locationForm.roughWeight" class="item_input" clearable></el-input>
</div>
<div class="item">
<span class="item_text">有效天数</span>
<el-input v-model="locationForm.effectiveDays" class="item_input" clearable></el-input>
</div>
<div class="item">
<span class="item_text">备注</span>
<el-input v-model="locationForm.remarks" class="item_input" clearable></el-input>
</div>
</el-card>
</div>
</div>
</template>
<script>
export default {
data() {
return {
submitdisabled: false,
disabledCode: false,
locationForm: {
barCode: "",
name: "",
anotherName: "",
value: "",
netWeight: "",
roughWeight: "",
effectiveDays: "",
remarks: "",
},
viewTitle: "【新增】产品信息",
}
},
created() {
},
methods: {
saveOrUpdate() {
if (this.viewTitle === "【新增】产品信息") return this.addProduct()
if (this.viewTitle === "【修改】产品信息") {
this.updataProduct()
}
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.clearList()
this.$emit('doback')
},
showAdd() {
this.viewTitle = "【新增】产品信息";
this.disabledCode=false
this.clearList()
},
clearList(){
this.locationForm = {
barCode: "",
name: "",
anotherName: "",
value: "",
netWeight: "",
roughWeight: "",
effectiveDays: "",
remarks: "",
}
},
showEdit(row) {
this.viewTitle = "【修改】产品信息";
this.disabledCode=true
this.locationForm=row
},
async updataProduct () {
this.locationForm = {
name: "",
anotherName: "",
}
const { data: result } = await this.$http.put('/product/updataProduct', this.locationForm)
if (result.status !== 200) return this.$message.error('更新数据失败')
this.$message.success('更新成功')
this.handleReturn('true')
},
async addProduct () {
const { data: result } = await this.$http.post('/product/addProduct', this.locationForm)
if (result.status !== 200) return this.$message.error('添加产品失败')
this.$message.success('添加产品成功')
this.handleReturn('true')
},
createBarCode () {
var now = new Date()
var nowstr = now.getTime()
this.locationForm.barCode = 'P' + now.getTime()
},
}
}
</script>
<style lang="scss">
.box-card {
margin-left: 60px;
margin-right: 60px;
min-width: 70%;
margin-top: 20px;
.item {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
flex: 0.8;
font-size: 18px;
text-align: right;
}
.item_input {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_inputs {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 28px;
}
.item_left_input {
width: 20%;
}
.item_left_text {
height: 30px;
margin-left: 20px;
line-height: 30px;
color: #018AD2;
padding: 0px 15px;
border: 1.5px solid #018AD2;
border-radius: 5px;
}
.item_right {
flex: 1;
justify-items: center;
.item_right_list_text {
font-size: 16px;
}
.item_right_list_delect {
color: #5E94FF;
margin-left: 20px;
font-size: 16px;
text-decoration: underline;
}
}
}
}
</style>

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

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

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

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

Loading…
Cancel
Save