王英杰 1 年間 前
コミット
80b158989b

+ 7 - 4
components/dkbase/dk-form-bill/dk-form-bill.js

@@ -468,12 +468,16 @@ Component({
         return;
       }
       let ds = e.currentTarget.dataset;
+      if (this.data.type == Constants.billType.purInto) {//采购入库的时候 打开商品的pup 就要计算箱片
+        ds.item['intoingBox'] = parseInt(ds.item.itemQty / ds.item.packBox)
+        ds.item['intoingPiece'] = Number(ds.item.itemQty % ds.item.packBox)
+      }
       this.setData({
         dataIndex: ds.index,
         dataItem: JSON.stringify(ds.item),
         showPop: true,
       })
-
+    
       this.triggerEvent("openChoosedItemInfo", {
         item: ds.item,
         index: ds.index
@@ -892,8 +896,7 @@ Component({
      * @author : 周兴
      * @date   : 2024/1/26 11:46
      */
-    openChooseItems(e) {
-
+    openChooseItems(e) { 
       if (this.data.selectGoodsUrl) {
         this.setData({
           item: null
@@ -1666,7 +1669,7 @@ Component({
      * @date : 2024/2/1 15:49
      * @author : 于继渤
      */
-    changeStep(e) {
+    changeStep(e) { 
       let key = e.detail.key
       let value = e.detail.value
       let dataItem = JSON.parse(this.data.dataItem)

+ 3 - 3
package-base-select/pages/select-goods/select-goods.wxml

@@ -52,7 +52,7 @@
 
 <view style="height:100%;background: #F8F9FD ;" class="{{(active == 0 && controlFlags.choosewhFlag)?'addtop':''}}">
   <!-- 商品编码的列表 走sku-->
-  <scroll-view scroll-y='{{true}}' bindscrolltolower='scrollToLower' lower-threshold='100' wx:if="{{active == 0 &&( billType == 'pur' || billType == 'sale'  || billType == 'saleOut' ||  billType ==  'saleOutReturn')}}" class="goods-class" style="height:calc({{windowHeight+'px'}} - 295rpx);overflow: scroll;">
+  <scroll-view scroll-y='{{true}}' bindscrolltolower='scrollToLower' lower-threshold='100' wx:if="{{active == 0 &&( billType == 'pur'|| billType == 'purInto' || billType == 'sale'  || billType == 'saleOut' ||  billType ==  'saleOutReturn')}}" class="goods-class" style="height:calc({{windowHeight+'px'}} - 295rpx);overflow: scroll;">
     <van-cell-group style="display: flex;justify-content: flex-end;width: calc({{windowWidth+'px'}} - 20rpx);" custom-class="cell-width">
       <view wx:for="{{tableData}}" wx:key="index" border="{{ false }}" class="goods-cell-class" data-item="{{item}}" bind:tap="openAddItemInfo">
         <view class="goods-item-class">
@@ -76,7 +76,7 @@
               <view style="width: 85%;">
 
 
-                <view wx:if="{{billType == 'pur'}}">
+                <view wx:if="{{billType == 'pur'||billType == 'purInto'}}">
                   <!-- <view style="color: #002340A6;font-size:22rpx;font-weight: 500;">采购价</view> -->
                   <dk-cell height="46rpx" spaceWidth="1rpx" left="0" fontSize="14" contentColor="#FF7B1A" fontWeight="700" title="" content="{{item.pricePurchase?item.pricePurchase:0}}"></dk-cell>
                 </view>
@@ -224,7 +224,7 @@
               <view style="display: flex; ">
                 <dk-text value="{{item.skuName}}"></dk-text>
               </view>
-              <view style="display: flex;margin-top:20rpx;" wx:if="{{billType == 'pur'}}">
+              <view style="display: flex;margin-top:20rpx;" wx:if="{{billType == 'pur'||billType == 'purInto'}}">
                 <!-- 标准价/标价-->
                 <view style="width: 85%;">
                   <dk-cell height="46rpx" spaceWidth="1rpx" left="0" fontSize="13" contentColor="#CAA977" fontWeight="bold" title=" " content="{{item.pricePurchase?item.pricePurchase:0}}"></dk-cell>

+ 3 - 2
package-purchase/pages/purchase-receipt/add/add.js

@@ -38,14 +38,15 @@ Page({
         title: mixins.$t("inboundPrice"),
         required: true
       }, 
-      { code: 'intoingBox', type: 'step', title: mixins.$t("goodsBox"), required: true },
-      { code: 'intoingPiece', type: 'step', title: mixins.$t("goodsPiece"), required: true },
+
       {
         code: 'itemQty',
         type: 'step',
         title: mixins.$t("count"), //'数量',
         required: true
       },
+      { code: 'intoingBox', type: 'step', title: mixins.$t("goodsBox"), required: true },
+      { code: 'intoingPiece', type: 'step', title: mixins.$t("goodsPiece"), required: true },
       {
         code: 'whId',
         name: 'whName',

+ 2 - 0
package-purchase/pages/purchase-receipt/detail/detail.js

@@ -79,6 +79,8 @@ Page({
         title: mixins.$t("count"),//'数量',
         required: true
       },
+      { code: 'intoingBox', type: 'step', title: mixins.$t("goodsBox"), required: true },
+      { code: 'intoingPiece', type: 'step', title: mixins.$t("goodsPiece"), required: true },
       {
         code: 'whId',
         name: 'whName',

+ 30 - 47
package-purchase/pages/purchase-receipt/detail/detail.wxml

@@ -4,62 +4,45 @@
 <loading wx:if="{{loading}}" ></loading>
  
 
+<view class="detail-top" >
+    <image class="scan-image" fit="fill" src="{{imageUrl+'/detail_sale_order.png'}}"></image>
 
-<!-- 蓝色信息相关 -->
-<view style="margin: 0px 34rpx 26rpx 34rpx;border-radius: 15rpx;box-shadow:2px 2px 5px #e5e5e6;">
-  <view style="flex-direction: column;justify-content: center;align-items: flex-start;background: linear-gradient(90.12deg, #718AC6 0.84%, #4A5E98 99.43%);border-radius: 15rpx;">
-    <!-- 供应商 -->
-    <view style="display: flex;padding-right: 32rpx;">
-
-      <view style="padding-left: 32rpx;padding-top: 19rpx;width: 39rpx;">
-        <view catchtap="toCustomer" style="width: 39rpx;height: 39rpx;background-color: #95A8CB;border-radius:50%;">
-          <view style="width: 39rpx; height: 39rpx;text-align: center;">
-            <van-image round width="20rpx" height="24rpx" src="/static/image/Vector.png" />
-          </view>
-        </view>
-      </view>
-      <view style="padding-left: 14rpx;padding-top: 19rpx;font-size: 26rpx;line-height: 36rpx;color: #FFFFFF;">
-        {{itemData.supplierName?itemData.supplierName:''}}
-      </view>
  
-    </view>
-    <!-- 收货人 -->
-    <view style="display: flex;padding-right: 32rpx;">
-
-      <view style="padding-left: 32rpx;padding-top: 19rpx;width: 39rpx;">
-        <view catchtap="toCustomer" style="width: 39rpx;height: 39rpx;background-color: #95A8CB;border-radius:50%;">
-          <view style="width: 39rpx; height: 39rpx;text-align: center;">
-            <van-image round width="20rpx" height="24rpx" src="/static/image/Vector.png" />
-          </view>
-        </view>
-      </view>
-      <view style="padding-left: 14rpx;padding-top: 19rpx;font-size: 26rpx;line-height: 36rpx;color: #FFFFFF;">
-        {{itemData.orgName?itemData.orgName:''}} 
+    <view class="detail-top-sup" style="display: flex;">
+      <view style="width: 10%;">
+        <image class="scan-image-icon" fit="fill" src="{{imageUrl+'/order_billing_detail_01.png'}}"></image>
       </view>
 
-      <view style="padding-left: 22rpx;padding-top: 19rpx;font-size: 26rpx;line-height: 36rpx;color: #FFFFFF;">
-        {{itemData.staffName?itemData.staffName:''}}
-      </view>
-
-
-    </view>
-    
-    <!-- 日期 -->
-    <view style="display: flex;padding-left: 32rpx;padding-top: 16rpx;padding-bottom: 15rpx;padding-right: 32rpx;">
-      <view style="display: flex; width: 50%;line-height: 36rpx;" data-type='deliveryType'>
-        <view style="font-size: 24rpx;line-height: 36rpx;color: #FFFFFF;">
-          采购日期:{{ itemData.makeTime ? wxmlUtil.format(itemData.makeTime) : '' }}
+      <view>
+        <view style="display: flex;">
+          {{itemData.supplierName?itemData.supplierName:''}}
         </view>
-      </view>
-      <view style="display: flex; width: 50%;line-height: 36rpx;" data-key="DeliveryFlag" catchtap="openData">
-        <view style="font-size: 24rpx;line-height: 36rpx;color: #FFFFFF;">
-         {{formType==1?"预计入库日期":"入库日期"}}:{{ formType==1?itemData.pickupDate:itemData.intoDate }}
+
+        <view style="z-index: 2;padding-top: 20rpx;">
+          <view style="display: flex;">
+            <view>
+              {{itemData.orgName?itemData.orgName:''}}
+            </view>
+            <view style="padding-left: 20rpx;">
+              {{itemData.staffName?itemData.staffName:''}}
+            </view>
+          </view>
         </view>
+        <!-- 日期 -->
+        <view   style="display: flex; width: 100%; padding-top: 16rpx;padding-bottom: 15rpx;padding-right: 15rpx; justify-content: space-between; font-size: 24rpx;">
+          <view style="display: flex;  line-height: 36rpx;">
+            {{$t['makingTime']}}:{{ itemData.makeTime?wxmlUtil.formatDate(itemData.makeTime):'' }}
+          </view>
+          <view style="display: flex;  line-height: 36rpx;" catchtap="openData">
+            {{$t['intoDate']}}:{{ itemData.pickupDate?wxmlUtil.formatDate(itemData.pickupDate):'' }}
+          </view>
+        </view> 
+       
       </view>
     </view>
   </view>
-</view> 
-<dk-form-bill id="{{formName}}"  routeObjName="{{routeObjName}}" 
+ 
+<dk-form-bill type="purInto" id="{{formName}}"  routeObjName="{{routeObjName}}" 
 cardList="{{cardList}}"  titleTagCol="shortName" titleCol="skuModel"  iconCol="imagesUrl" descCol="skuName" priceCol="priceInto" pupPriceCol="pricePurchase" quantityCol="{{intoStatusflag?'intoingQty':'intoQty'}}"  sumAmountCol ="itemAmt"sumQuantityCol="itemQty"
 contentObj="{{contentObj}}" model:value="{{formData}}" popContent = "{{popContent}}" 
 bind:chooseData = "chooseData"  popType = "sale" priceTitle = "{{$t['referencePrice']+':'}}" bind:delItem="setGoods" bind:setGoods="setGoods" bind:editItems="setGoods">

+ 47 - 0
package-purchase/pages/purchase-receipt/detail/detail.wxss

@@ -10,6 +10,53 @@
   z-index: 2;
   display: flex;
 }
+
+.detail-top {
+	position: relative;
+	border: 1px solid #F3FBFF;
+	margin: 10px 32rpx 10px 32rpx;
+	background-color: #FFFF;
+	background: radial-gradient(61.26% 65.52% at 6.12% 18.49%, #CDD8FF 0%, #F3FAFF 100%);
+	padding: 20rpx;
+	border-radius: 16rpx;
+}
+
+
+.detail-top-sup {
+	color: #002340;
+	font-weight: bold;
+	font-size: 28rpx;
+	padding: 10rpx;
+}
+
+.detail-top-color {
+	font-weight: bold;
+	color: #002340;
+	font-size: 14px;
+	padding: 10rpx;
+}
+.scan-image {
+  width: 200rpx;
+  height: 200rpx;
+  position: absolute;
+  right: 0;
+  bottom: 0;
+  border-radius: 0px 0px 16rpx 0px;
+}
+
+.detail-top {
+  position: relative;
+  border: 1px solid #F3FBFF;
+  margin: 10px 32rpx 10px 32rpx;
+  background-color: #FFFF;
+  background: radial-gradient(61.26% 65.52% at 6.12% 18.49%, #CDD8FF 0%, #F3FAFF 100%);
+  padding: 20rpx;
+  border-radius: 16rpx;
+}
+.scan-image-icon {
+	width: 40rpx;
+	height: 40rpx;
+}
 .btn-add-class {
   background: #8091A9;
   border-radius: 50%;

+ 1 - 0
utils/Constants.js

@@ -286,6 +286,7 @@ module.exports = {
     sale: 'sale',
     // 采购订单
     pur: 'pur',
+    purInto:'purInto',
     out: 'out',
     purReturn: 'purReturn',
     inventory: 'inventory',