xuhaifeng 1 місяць тому
батько
коміт
99ea1e8b0b

+ 0 - 1
admin-ui/src/views/app/delivery/index.vue

@@ -124,7 +124,6 @@
         :visible.sync="userSelectVisible"
         append-to-body
         :close-on-click-modal="false"
-        append-to-body
       >
         <div class="user-search">
           <el-form :inline="true">

+ 8 - 8
admin-ui/src/views/cloth/laundryPrice/index.vue

@@ -1,19 +1,19 @@
 <template>
   <div class="app-container">
-    <el-row :gutter="20">
+    <div style="display: flex;">
       <!--部门数据-->
-      <el-col :span="2" :xs="24" style="margin-top: 80px">
+      <div style="margin-top: 80px; flex-shrink: 0;">
         <div class="head-container">
           <el-tabs v-model="checkWashMode" @tab-click="handleQuery" tab-position="left">
-            <el-tab-pane v-for="item in clothWashModes" :label="item.name" :name="item.id + ''"></el-tab-pane>
+            <el-tab-pane v-for="(item, i) in clothWashModes" :label="item.name" :name="item.id + ''" :key="i"></el-tab-pane>
           </el-tabs>
         </div>
-      </el-col>
-      <el-col :span="22" :xs="24">
+      </div>
+      <div style="flex: 1; max-width: calc(100vw - 400px);margin-left: 20px;">
         <el-form :model="queryParams" ref="queryForm" @submit.native.prevent :inline="true" label-width="68px">
           <el-form-item prop="checkStoreAreaId">
             <el-tabs v-model="checkStoreAreaId" @tab-click="handleQuery">
-              <el-tab-pane v-for="item in areaList" :label="item.name" :name="item.id + ''"></el-tab-pane>
+              <el-tab-pane v-for="(item, i) in areaList" :label="item.name" :name="item.id + ''" :key="i"></el-tab-pane>
             </el-tabs>
             <!--                <el-select v-model="queryParams.storeAreaId" placeholder="请选择区域" clearable @change="handleQuery" filterable>-->
             <!--                    <el-option v-for="(item, index) in areaList" :key="index" :label="item.name" :value="item.id" />-->
@@ -57,8 +57,8 @@
             </template>
           </el-table-column>
         </Page>
-      </el-col>
-    </el-row>
+      </div>
+    </div>
     <!--  设置价格  -->
     <el-dialog title="设置价格" :visible.sync="unitPriceType" width="30%" :before-close="handleClose" append-to-body>
       <form ref="unitpriceForm">

+ 1 - 1
admin-ui/src/views/cloth/washMode/index.vue

@@ -14,7 +14,7 @@
             <el-col :span="1.5">
                 <el-button type="primary" plain icon="el-icon-plus" @click="handleAdd" v-hasPermi="['cloth:texture:add']">新增</el-button>
             </el-col>
-            <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+            <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
         </el-row>
 
         <Page uri="/mapi/core/washMode/list" :request-params="queryParams" ref="pagination">

+ 1 - 1
admin-ui/src/views/coupon/item/index.vue

@@ -136,7 +136,7 @@
 
         <!-- 发送优惠券对话框 -->
         <el-dialog :title="sendCouponTitle" :visible.sync="sendCouponOpen" width="600px" 
-            :close-on-click-modal="false" :before-close="handleSendCouponClose">
+            :close-on-click-modal="false" :before-close="handleSendCouponClose" append-to-body>
             <el-form ref="form" :model="sendCouponForm" :rules="rules" label-width="120px">
                 <el-card class="box-card" shadow="never">
                     <div slot="header">

+ 1 - 0
admin-ui/src/views/coupon/type/index.vue

@@ -435,6 +435,7 @@ export default {
             } else {
                 this.form.deductAmount = 0
             }
+            this.form = JSON.parse(JSON.stringify(this.form))
         },
         /** 搜索按钮操作 */
         handleQuery() {

+ 1 - 1
admin-ui/src/views/goods/commonGoods/index.vue

@@ -79,7 +79,7 @@
           </el-button>
         </template>
       </el-table-column>
-
+            <el-table-column label="库存" align="center" prop="goodsStockNum" width="120" />
       <el-table-column label="支付方式" align="center" width="150">
         <template slot-scope="scope">
           <div>

+ 4 - 4
admin-ui/src/views/order/cloth/collectCloth.vue

@@ -1539,10 +1539,10 @@ export default {
                     this.$message.error('未查询到预约订单')
                     return
                 }
-                if (!this.orderForm.sendClothWay) {
-                    this.$message.error('请先选取衣方式')
-                    return
-                }
+                // if (!this.orderForm.sendClothWay) {
+                //     this.$message.error('请先选取衣方式')
+                //     return
+                // }
                 // this.orderForm.sendClothWay = res.data.sendClothWay
             }
 

+ 4 - 3
admin-ui/src/views/order/cloth/component/cashCloth.vue

@@ -77,8 +77,8 @@
 
                             <!-- 支付按钮 -->
                             <div class="payment-actions">
-                                <el-button type="primary" size="large" icon="el-icon-shopping-cart-2" style="width: 180px" @click="submitForm(0)"> 立即收款 </el-button>
-                                <el-button type="warning" size="large" icon="el-icon-time" style="width: 180px" @click="submitForm(1)" v-if="orderForm.isAppointment!= 'Y'"> 取衣付款 </el-button>
+                                <el-button type="primary" size="large" icon="el-icon-shopping-cart-2" style="width: 180px" @click="submitForm(0)" v-if="orderForm.isAppointment!= 'Y'"> 立即收款 </el-button>
+                                <el-button type="warning" size="large" icon="el-icon-time" style="width: 180px" @click="submitForm(1)"> 取衣付款 </el-button>
                             </div>
                         </el-card>
                     </div>
@@ -866,7 +866,8 @@ export default {
                             loading.close();
                             // 直接打开支付状态弹窗,不需要延时
                           //0=微信,1=支付宝,2=现金,3=余额
-                          if (payTimeType == 0 && this.orderForm.isAppointment != 'Y') {
+                        //   && this.orderForm.isAppointment != 'Y'
+                          if (payTimeType == 0) {
                             if (this.orderForm.payType === '0') {
                                 res.data.authCode = this.orderForm.authCode
                                 this.$refs.payStatusPopup.open(0, {...params, ...res.data}, this.appUserInfo);

+ 1 - 0
admin-ui/src/views/order/cloth/orderList.vue

@@ -473,6 +473,7 @@ export default {
             })
         },
         handleClose(row) {
+            console.log(row)
             var _this = this
             var content = '退单金额如下:'
             if (row.payType == '0') {

+ 1 - 1
admin-ui/src/views/order/retailOrder/index.vue

@@ -354,7 +354,7 @@ import { printGoods } from '@/api/order/clothItem'
 
 export default {
     name: 'goodsRetailOrder',
-    dicts: ['order_goods_status', 'goods_order_refund_status','delivery_company', 'recharge_pay_type'],
+    dicts: ['order_goods_status', 'goods_order_refund_status','delivery_company', 'recharge_pay_type', 'goods_type'],
     data() {
         var validateNumberInput = (rule, value, callback) => {
             if (!value || isNaN(value)) {

+ 1 - 1
admin-ui/src/views/refund/refundRetailOrder/index.vue

@@ -83,7 +83,7 @@
         </Page>
 
         <!--    详情-->
-        <el-dialog :title="detailTitle" :visible.sync="openDetail" width="80%">
+        <el-dialog :title="detailTitle" :visible.sync="openDetail" width="80%" append-to-body>
             <el-card>
                 <el-descriptions title="客户信息" v-show="detailView" :column="3" border :label-style="{ 'text-align': 'center' }" :contentStyle="{ 'text-align': 'center' }">
                     <el-descriptions-item label="客户姓名">{{ detailView.realName }}</el-descriptions-item>

+ 6 - 0
yiqi-common/src/main/java/com/yiqi/core/domain/vo/GoodsInfoQueryVO.java

@@ -161,4 +161,10 @@ public class GoodsInfoQueryVO extends BaseEntity {
     @ApiModelProperty("商品物料数量")
     private Long goodsItemNum;
 
+    /**
+     * 商品库存数量
+     */
+    @ApiModelProperty("商品库存数量")
+    private Long goodsStockNum;
+
 }

+ 33 - 0
yiqi-common/src/main/java/com/yiqi/core/domain/vo/GoodsSkuNumDto.java

@@ -0,0 +1,33 @@
+
+package com.yiqi.core.domain.vo;
+
+import com.yiqi.common.annotation.Excel;
+import com.yiqi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 商品管理对象 goods
+ *
+ * @author ruoyi
+ * @date 2023-08-21
+ */
+@ApiModel("商品管理")
+@Data
+public class GoodsSkuNumDto extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("商品物料数量")
+    private Long goodsItemNum;
+
+    /**
+     * 商品库存数量
+     */
+    @ApiModelProperty("商品库存数量")
+    private Long goodsStockNum;
+
+}

+ 2 - 1
yiqi-core/src/main/java/com/yiqi/core/mapper/GoodsSkuMapper.java

@@ -5,6 +5,7 @@ import java.util.Map;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.yiqi.core.domain.dto.GoodsSkuDTO;
+import com.yiqi.core.domain.vo.GoodsSkuNumDto;
 import com.yiqi.core.domain.vo.GoodsSkuQueryVO;
 import org.apache.ibatis.annotations.MapKey;
 import org.apache.ibatis.annotations.Mapper;
@@ -149,7 +150,7 @@ public interface GoodsSkuMapper extends BaseMapper<GoodsSku> {
      * @param goodsId 商品id
      * @return 结果
      */
-    public Long getGoodsSkuNumsByGoodsId(@Param("goodsId") Long goodsId);
+    public GoodsSkuNumDto getGoodsSkuNumsByGoodsId(@Param("goodsId") Long goodsId);
 
     /**
      *

+ 10 - 0
yiqi-core/src/main/java/com/yiqi/core/mapper/GoodsSkuStoreMapper.java

@@ -2,6 +2,7 @@ package com.yiqi.core.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.yiqi.core.domain.GoodsSkuStore;
+import com.yiqi.core.domain.vo.GoodsSkuNumDto;
 import com.yiqi.system.domain.ManageFactory;
 import com.yiqi.system.domain.SysStore;
 import org.apache.ibatis.annotations.Mapper;
@@ -152,4 +153,13 @@ public interface GoodsSkuStoreMapper extends BaseMapper<GoodsSkuStore> {
      * @return 结果
      */
     int addGoodsSkuStockNotCheckByStore(@Param("sourceType") String sourceType, @Param("orgId") Long orgId, @Param("skuId") Long skuId, @Param("buyNum") Integer buyNum);
+
+
+    /**
+     * 查询商品sku数量
+     *
+     * @param goodsId 商品id
+     * @return 结果
+     */
+    public GoodsSkuNumDto getGoodsStoreSkuNumsByGoodsId(@Param("goodsId") Long goodsId, @Param("storeId") Long storeId);
 }

+ 9 - 1
yiqi-core/src/main/java/com/yiqi/core/service/impl/GoodsInfoServiceImpl.java

@@ -18,6 +18,7 @@ import com.yiqi.core.domain.dto.GoodsInfoDto;
 import com.yiqi.core.domain.dto.GoodsUpdateSalesDTO;
 import com.yiqi.core.domain.dto.weapp.WeAppGoodsInfoQueryDTO;
 import com.yiqi.core.domain.vo.GoodsInfoQueryVO;
+import com.yiqi.core.domain.vo.GoodsSkuNumDto;
 import com.yiqi.core.domain.vo.weapp.WeAppGoodsInfoQueryVO;
 import com.yiqi.core.mapper.*;
 import com.yiqi.core.service.IGoodsInfoService;
@@ -103,7 +104,14 @@ public class GoodsInfoServiceImpl extends ServiceImpl<GoodsInfoMapper, GoodsInfo
     public List<GoodsInfoQueryVO> selectGoodsList(GoodsInfoQueryVO goodsInfoQueryVO) {
         List<GoodsInfoQueryVO> goodsInfoQueryVOList = baseMapper.selectGoodsList(goodsInfoQueryVO);
         for (GoodsInfoQueryVO goodsInfoQuery : goodsInfoQueryVOList) {
-            goodsInfoQuery.setGoodsItemNum(goodsSkuMapper.getGoodsSkuNumsByGoodsId(goodsInfoQuery.getId()));
+            GoodsSkuNumDto goodsSkuNumDto = goodsSkuMapper.getGoodsSkuNumsByGoodsId(goodsInfoQuery.getId());
+            goodsInfoQuery.setGoodsItemNum(goodsSkuNumDto.getGoodsItemNum());
+            goodsInfoQuery.setGoodsStockNum(goodsSkuNumDto.getGoodsStockNum());
+            //如果是门店权限,则查询门店的库存和物料数量
+            if (goodsInfoQuery.getSourceType().equals(SourceType.STORE.getCode())) {
+                GoodsSkuNumDto goodsStoreSkuNumDto = goodsSkuStoreMapper.getGoodsStoreSkuNumsByGoodsId(goodsInfoQuery.getId(), goodsInfoQuery.getTargetId());
+                goodsInfoQuery.setGoodsStockNum(goodsStoreSkuNumDto.getGoodsStockNum());
+            }
         }
         return goodsInfoQueryVOList;
     }

+ 3 - 3
yiqi-core/src/main/resources/mapper/core/GoodsSkuMapper.xml

@@ -329,9 +329,6 @@
         </if>
 
     </select>
-    <select id="getGoodsSkuNumsByGoodsId" resultType="java.lang.Long" parameterType="java.lang.Long">
-        select count(1) from goods_sku where goods_id = #{goodsId} and del_flag = 0
-    </select>
 
     <select id="selectGoodsSkuListByGoodsId" resultType="com.yiqi.core.domain.GoodsSku">
         select * from goods_sku where goods_id = #{goodsId} and del_flag = 0
@@ -352,6 +349,9 @@
             </if>
             group by st.goods_id
     </select>
+    <select id="getGoodsSkuNumsByGoodsId" resultType="com.yiqi.core.domain.vo.GoodsSkuNumDto">
+        select sum(stock) as goodsStockNum, count(1) as goodsItemNum from goods_sku where goods_id = #{goodsId} and del_flag = 0
+    </select>
 
     <update id="minusGoodsSkuStockByHq">
         update goods_sku set stock = stock - #{buyNum} where id = #{skuId} and status = '0' and stock >= #{buyNum}

+ 3 - 0
yiqi-core/src/main/resources/mapper/core/GoodsSkuStoreMapper.xml

@@ -50,6 +50,9 @@
             #{item}
         </foreach>
     </select>
+    <select id="getGoodsStoreSkuNumsByGoodsId" resultType="com.yiqi.core.domain.vo.GoodsSkuNumDto">
+        select sum(stock) as goodsStockNum, count(1) as goodsItemNum from goods_sku_store where  source_type = '02' and target_id = #{storeId} and goods_id = #{goodsId}
+    </select>
 
     <insert id="insertGoodsSkuStore" useGeneratedKeys="true"
             keyProperty="id">