diff --git a/fuintAdmin/.env.development b/fuintAdmin/.env.development index 89b6b1bdb..40429657e 100644 --- a/fuintAdmin/.env.development +++ b/fuintAdmin/.env.development @@ -11,7 +11,7 @@ VUE_APP_BASE_API = '/dev-api' VUE_APP_PUBLIC_PATH = '/' # 后端接口地址 -VUE_APP_SERVER_URL = 'http://192.168.31.178:8080/' +VUE_APP_SERVER_URL = 'http://192.168.31.96:8080/' # http://192.168.0.121:8080/ diff --git a/fuintAdmin/src/views/convenienceStore/purchase/index.vue b/fuintAdmin/src/views/convenienceStore/purchase/index.vue index b35af1cdc..e74217076 100644 --- a/fuintAdmin/src/views/convenienceStore/purchase/index.vue +++ b/fuintAdmin/src/views/convenienceStore/purchase/index.vue @@ -1,227 +1,92 @@ diff --git a/fuintAdmin/src/views/convenienceStore/purchase/purchase.vue b/fuintAdmin/src/views/convenienceStore/purchase/purchase.vue new file mode 100644 index 000000000..a154bb4d0 --- /dev/null +++ b/fuintAdmin/src/views/convenienceStore/purchase/purchase.vue @@ -0,0 +1,259 @@ + + + + + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtPurchase.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtPurchase.java index 1cb81225f..66fb77a2f 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtPurchase.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtPurchase.java @@ -37,6 +37,10 @@ public class MtPurchase extends BaseEntity { * 审核人 */ private String approver; + /** + * 入库人 + */ + private String storage; private String status; /** * 总金额 @@ -54,6 +58,16 @@ public class MtPurchase extends BaseEntity { * 店铺ID */ private Integer storeId; + /** + * 审核时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") + private Date examineTime; + /** + * 入库时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") + private Date storageTime; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtPurchaseMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtPurchaseMapper.xml index 7f4742b8f..7f3e897c9 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtPurchaseMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtPurchaseMapper.xml @@ -129,8 +129,11 @@ mp.product_quantity productQuantity, mp.approval_status approvalStatus, mp.order_date orderDate, + mp.examine_time examineTime, + mp.storage_time storageTime, ms1.real_name createByName, ms2.real_name approverName, + ms3.real_name storageName, mp.create_time createTime FROM mt_purchase mp @@ -138,6 +141,7 @@ left join mt_goods mg ON mg.id = mpd.goods_id LEFT JOIN mt_staff ms1 ON mp.create_by = ms1.id LEFT JOIN mt_staff ms2 ON mp.approver = ms2.id + LEFT JOIN mt_staff ms3 ON mp.storage = ms3.id mp.store_id = #{mtPurchase.storeId} @@ -150,6 +154,12 @@ and mg.supplier_id = #{mtPurchase.supplierId} + + and date_format(mp.order_date,'%y%m%d') >= date_format(#{mtPurchase.params.beginTime},'%y%m%d') + + + and date_format(mp.order_date,'%y%m%d') <= date_format(#{mtPurchase.params.endTime},'%y%m%d') + GROUP BY mp.id @@ -219,6 +229,9 @@ approver = #{approver}, + + storage = #{storage}, + total_amount = #{totalAmount}, @@ -231,6 +244,12 @@ store_id = #{storeId}, + + examine_time = #{examineTime}, + + + storage_time = #{storageTime}, + create_time = #{createTime}, diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtPurchaseServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtPurchaseServiceImpl.java index 24addcecd..7594e7ad7 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtPurchaseServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtPurchaseServiceImpl.java @@ -25,6 +25,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.math.BigDecimal; +import java.util.Date; import java.util.List; import static java.math.RoundingMode.HALF_DOWN; @@ -239,7 +240,7 @@ public class MtPurchaseServiceImpl implements MtPurchaseService { } // 2.将数据填充到 String status = "qrts"; - boolean edit = edit(id); + boolean edit = edit1(id); int i = mtPurchaseDao.editStateById(id, status); return true; } @@ -253,6 +254,18 @@ public class MtPurchaseServiceImpl implements MtPurchaseService { MtPurchase mtPurchase = new MtPurchase(); mtPurchase.setApprover(nowAccountInfo.getStaffId().toString()); + mtPurchase.setExamineTime(new Date()); + mtPurchase.setId(id); + int update = mtPurchaseDao.update(mtPurchase); + return update>0; + } + // 修改入库人 + public boolean edit1(Integer id){ + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + + MtPurchase mtPurchase = new MtPurchase(); + mtPurchase.setStorage(nowAccountInfo.getStaffId().toString()); + mtPurchase.setStorageTime(new Date()); mtPurchase.setId(id); int update = mtPurchaseDao.update(mtPurchase); return update>0; diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtPurchaseVO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtPurchaseVO.java index 718c33770..2b0b82b8e 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtPurchaseVO.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtPurchaseVO.java @@ -7,6 +7,7 @@ import lombok.Data; public class MtPurchaseVO extends MtPurchase { private String createByName; private String approverName; + private String storageName; private String supplierName; private Integer detailsId; private Integer supplierId;