Browse Source

采购跟踪表

王英杰 1 year ago
parent
commit
ec124cc3e2

+ 6 - 1
app.json

@@ -9,7 +9,10 @@
         "pages/company/company",
         "pages/company/company",
         "pages/add-company/add-company",
         "pages/add-company/add-company",
         "pages/product/product",
         "pages/product/product",
-        "components/dkbase/dk-customer-detail/dk-customer-detail"
+        "components/dkbase/dk-customer-detail/dk-customer-detail",
+        "components/dkbase/dk-step/dk-step",
+        "components/dkbase/dk-goos-list-step/dk-goos-list-step"
+        
     ],
     ],
     "subPackages": [
     "subPackages": [
         {
         {
@@ -307,6 +310,8 @@
         "dk-save-button": "components/dkbase/dk-save-button/dk-save-button",
         "dk-save-button": "components/dkbase/dk-save-button/dk-save-button",
         "dk-search": "components/dkbase/dk-search/dk-search",
         "dk-search": "components/dkbase/dk-search/dk-search",
         "dk-side-pull-menu": "components/dkbase/dk-side-pull-menu/dk-side-pull-menu",
         "dk-side-pull-menu": "components/dkbase/dk-side-pull-menu/dk-side-pull-menu",
+        "dk-step": "components/dkbase/dk-step/dk-step",
+        "dk-goos-list-step": "components/dkbase/dk-goos-list-step/dk-goos-list-step", 
         "dk-table": "components/dkbase/dk-table/dk-table",
         "dk-table": "components/dkbase/dk-table/dk-table",
         "dk-tabs": "components/dkbase/dk-tabs/dk-tabs",
         "dk-tabs": "components/dkbase/dk-tabs/dk-tabs",
         "dk-tag": "components/dkbase/dk-tag/dk-tag",
         "dk-tag": "components/dkbase/dk-tag/dk-tag",

+ 102 - 0
components/dkbase/dk-goos-list-step/dk-goos-list-step.js

@@ -0,0 +1,102 @@
+
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    list:{
+      type:Array,
+      value:[]
+    },
+    titleCol:{
+      type:String,
+      value:''
+    },
+
+    titleTagCol:{
+      type:String,
+      value:''
+    },
+    descCol:{
+      type:String,
+      value:''
+    },
+
+    priceCol:{
+      type:String,
+      value:''
+    },
+    quantityCol:{
+      type:String,
+      value:'' 
+    },
+    title:{
+      type:String,
+      value:''  
+    },
+    type:{
+      type:String,
+      value:''
+    },
+    no:{
+      type:String,
+      value:''
+    },
+    
+    sumAmountCol:{
+      type:String,
+      value:''
+    },
+
+    sumQuantity:{
+      type:String,
+      value:''
+    },
+  },
+
+  options: {
+    multipleSlots: true
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    expandCard(e) {
+      let cardList = this.data.cardList
+      let index = e.currentTarget.dataset.index
+      if (cardList[index]) {
+        // 收缩的时候需要展示信息
+        let expand = cardList[index].expand
+        cardList[index].info = undefined
+        if (expand) {
+          let form = this.data.form
+          let infoCols = e.currentTarget.dataset.item.infoCols
+          if (infoCols && infoCols.length > 0) {
+            let info = ''
+            infoCols.forEach(it => {
+              if (form[it]) {
+                info += form[it] + '/'
+              }
+            })
+            if (info.length > 0) {
+              info = info.substring(0, info.length - 1);
+              cardList[index].info = info
+            }
+          }
+        }
+        cardList[index].expand = !expand
+        this.setData({
+          cardList: cardList
+        })
+      }
+    },
+  }
+})

+ 4 - 0
components/dkbase/dk-goos-list-step/dk-goos-list-step.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 72 - 0
components/dkbase/dk-goos-list-step/dk-goos-list-step.wxml

@@ -0,0 +1,72 @@
+<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
+<view class="dk-card-outer-class">
+  <view class="dk-card-class">
+    <view wx:if="{{title}}" class="item-class">
+      <view class="item-title-class">{{title}}
+        <view style="font-size: 13px;font-weight: 500;">{{no ? list[0][no] : ''}}</view>
+      </view>
+      <view>
+        <dk-tag type="primary" padding="0 20rpx" height="40rpx" color="#9FAEE5" textColor="#FFFFFF" radius="5rpx" roundFlag="{{true}}" value="{{!expand?'展开':'收起'}}" catchtap="expandCard" data-item="{{card}}" data-index="{{cardIndex}}"></dk-tag>
+      </view>
+    </view>
+    <view></view>
+    <view wx:for="{{list}}" data-item="{{item}}" wx:for-item="item" wx:key="index" border="{{ false }}">
+
+      <van-card wx:if="{{item.show || item.show == undefined}}">
+        <view slot="thumb">
+          <van-image radius="5px" width="90" height="90" src="{{item[iconCol] }}" />
+        </view>
+        <view slot="title" style="display: flex;">
+          <view style="display: flex;">
+            <dk-title titleTag="{{item[titleTagCol]}}" title="{{item[titleCol]}}"></dk-title>
+          </view>
+        </view>
+        <view slot="desc" data-item="{{item}}">
+          <view style="display:flex;width: 100%;">
+            <dk-text fontWeight="nomal" value="{{item[descCol]}}"></dk-text>
+          </view>
+        </view>
+        <view slot="price">
+          <view style="display: flex;width: 100%;justify-content: center;align-items: center;">
+            <view style="width: 60%;">
+              <dk-cell contentFontSize="16" height="25rpx" fontWeight="700" left="0rpx" contentColor="#FF7B1A" title="" content="{{ item[priceCol]}}"></dk-cell>
+            </view>
+            <view style="width: 40%;text-align: right;">
+              <dk-text fontWeight="nomal" fontWeight="700" value="{{'x ' + item[quantityCol]}}"></dk-text>
+            </view>
+          </view>
+        </view>
+      
+      </van-card>
+      <view  style="width: 50%;text-align: left;font-size:14px;color: #95A8CB;">
+            <van-image width="20px" height="20px" src="/static/image/edit.png" />
+            备注:<span style="line-height:56rpx;">{{item['remarks'] ? item['remarks'] : '请输入内容'}}</span>
+          </view> 
+      <!-- 明细左下 -->
+      <view wx:if="{{card.contentBottomLeft}}" wx:for="{{card.contentBottomLeft}}" style="display: flex;width: 100%;margin-top:5px;align-items: center;" wx:for-item="item_" data-item="{{item_}}" wx:for-index="index_" catchtap="openContentBottomLeft">
+        <view wx:if="{{item_.type=='remarks'}}" style="width: 50%;text-align: left;font-size:14px;color: #95A8CB;">
+          <van-image width="20px" height="20px" src="/static/image/edit.png" />
+          备注:<span style="line-height:56rpx;">{{item[item_.code] ? item[item_.code] : '请输入内容'}}</span>
+        </view>
+      </view>
+
+    </view>
+    <block style="text-align: center; " wx:if="{{card.displayNum && list.length > card.displayNum}}">
+      <view wx:if="{{card.showMore}}" class="expand-class" data-card="{{card}}" data-index="{{cardIndex}}" bindtap='expand'>
+        点击收起部分
+        <van-icon name="arrow-up" />
+      </view>
+      <view wx:else class="expand-class" data-card="{{card}}" data-index="{{cardIndex}}" bindtap='expand'>
+        展开查看更多
+        <van-icon name="arrow-down" />
+      </view>
+    </block>
+    <view class="amount-item-class" style="display: flex;" wx:if="{{type === 'sale'}}">
+
+        <dk-cell titleColor="#95A8CB;" title="{{'共计 ' + (sumQuantity ? list[0][sumQuantity] : '') + '件'}}" amount="{{false}}"></dk-cell>
+         
+          <dk-cell fontSize="16" fontWeight="bold" contentFontWeight="700" contentColor="#FF7B1A" titleColor="#1B365D;" title="合计" content="{{sumAmountCol ? list[0][sumAmountCol] : ''}}"></dk-cell>
+    </view>
+  </view>
+
+</view>

+ 34 - 0
components/dkbase/dk-goos-list-step/dk-goos-list-step.wxss

@@ -0,0 +1,34 @@
+/**card的外部样式*/
+.dk-card-outer-class {
+  margin: 10px 32rpx 10px 32rpx;
+  margin-top: 10px;
+  border-radius: 15rpx;
+  /* box-shadow: 2px 2px 5px #e5e5e6; */
+}
+
+/**card的样式*/
+.dk-card-class {
+  background: #FFFFFF;
+  border-radius: 16rpx;
+  padding: 5rpx;
+  margin-bottom: 20rpx;
+  box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.08);
+  /* box-shadow: 0px -6px 20px 0px rgba(0, 0, 0, 0.08); */
+  
+
+}
+.item-class {
+  display: flex;
+  font-size: 30rpx;
+  padding: 20rpx;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.item-title-class {
+  margin-left: 14rpx;
+  font-size: 15px;
+  color: #1B365D;
+  font-weight: 600;
+  width: 80%;
+}

+ 37 - 0
components/dkbase/dk-step/dk-step.js

@@ -0,0 +1,37 @@
+// components/Step/step.js
+Component({
+  options:{
+    multipleSlots:true
+  },
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    //步骤条数据
+    stepList:{
+      type:Array,
+      value:[
+        {
+          name:"名称",
+          event:"步骤内容",
+          time:"2021-07-19:12:30:01",
+          status:"0"
+        }
+      ]
+    }
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+
+  }
+})

+ 4 - 0
components/dkbase/dk-step/dk-step.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 57 - 0
components/dkbase/dk-step/dk-step.wxml

@@ -0,0 +1,57 @@
+<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
+<view class="ct-wx-step">
+  <view class='ct-wx-cell-list' wx:key="{{item}}" wx:for="{{stepList}}">
+    <view style="display: flex;">
+      <view class='ct-wx-cell-point  default'></view>
+      <view style="height:10px;color:#E4E4E4;font-size: 12px; margin-left: 2vw;">
+        {{ wxmlUtil.formatDate(item.makeTime)}}
+      </view>
+    </view>
+    <view class='ct-wx-cell-line '>
+      <view wx:if="{{item.type === '核销信息'}}">
+        <view class="dk-card-outer-class">
+          <view class="dk-card-class">
+            <view class="item-class">
+              <view class="item-title-class">{{item.type}}
+                <view style="font-size: 13px;font-weight: 500;">{{item.no ? item.no : ''}}</view>
+              </view>
+              <view>
+                <dk-tag type="primary" padding="0 20rpx" height="40rpx" color="#9FAEE5" textColor="#FFFFFF" radius="5rpx" roundFlag="{{true}}" value="{{!expand?'展开':'收起'}}" catchtap="expandCard" data-item="{{card}}" data-index="{{cardIndex}}"></dk-tag>
+              </view>
+            </view>
+            <view></view>
+            <view style="display:flex;padding: 5vw;" border="{{ false }}">
+              <view style="color:#95A8CB;font-size:13px;place-self:center;margin-right: 5vw;">核销金额 </view>
+              <view>
+                <dk-cell left="0rpx" center="center" fontSize="15" contentFontSize="18" contentColor="#1B365D" spaceWidth="0" contentFontWeight="700" amount="{{true}}" content="{{item.sumShouldHandle?item.sumShouldHandle:0}}"></dk-cell>
+              </view>
+            </view>
+            <view style="display:flex;padding: 5vw;" border="{{ false }}">
+              <view style="color:#95A8CB;font-size:13px;place-self:center;margin-right: 5vw;">优惠金额 </view>
+              <view>
+                <dk-cell left="0rpx" center="center" fontSize="15" contentFontSize="18" contentColor="#1B365D" spaceWidth="0" contentFontWeight="700" amount="{{true}}" content="{{item.sumWaiveAmt?item.sumWaiveAmt:0}}"></dk-cell>
+              </view>
+            </view>
+            <view style="display:flex;padding: 5vw;" border="{{ false }}">
+              <view style="color:#95A8CB;font-size:13px;place-self:center;margin-right: 5vw;">预付抵扣 </view>
+              <view>
+                <dk-cell left="0rpx" center="center" fontSize="15" contentFontSize="18" contentColor="#1B365D" spaceWidth="0" contentFontWeight="700" amount="{{true}}" content="{{item.sumUsePaymentResidue?item.sumUsePaymentResidue:0}}"></dk-cell>
+              </view>
+            </view>
+            <view style="display:flex;padding: 5vw;" border="{{ false }}">
+              <view style="color:#95A8CB;font-size:13px;place-self:center;margin-right: 5vw;">收款金额 </view>
+              <view>
+                <dk-cell left="0rpx" center="center" fontSize="15" contentFontSize="18" contentColor="#1B365D" spaceWidth="0" contentFontWeight="700" amount="{{true}}" content="{{item.sumAmtRec?item.sumAmtRec:0}}"></dk-cell>
+              </view>
+            </view>
+          </view>
+        </view>
+      </view>
+      <view wx:else>
+      
+        <dk-goos-list-step list="{{item.itemResponseList}}" no="no" title="{{item.type}}" titleCol="skuName" titleTagCol="brandName" descCol="skuCode" priceCol="pricePur" quantityCol="itemQty"></dk-goos-list-step>
+      </view>
+
+    </view>
+  </view>
+</view>

+ 71 - 0
components/dkbase/dk-step/dk-step.wxss

@@ -0,0 +1,71 @@
+.ct-wx-step{
+  /* 
+  width: 96%;
+  margin-left: 2%;
+  box-shadow: 0px 2px 10px rgba(102, 102, 102, 0.09);
+  border-radius: 6px; */
+  background: #FFFFFF;
+  padding: 12px 0px;
+}
+.ct-wx-cell-list{
+  padding: 0 12px;
+}
+.ct-wx-cell-line{
+  padding-left: 12px;
+  color: #666666;
+  font-size: 12px;
+  margin-left: 5px;
+  border-left: 1px solid #E4E4E4;
+  height: auto; 
+}
+.last{
+  color: #333333;
+  border-left: 1px solid #FFB93F;
+}
+.default{
+  background: #E4E4E4;
+}
+.piont-last{
+  background: #FFB93F;
+}
+.ct-wx-cell-point{
+  border-radius: 50%;
+  width: 10px;
+  height: 10px;
+  border-radius: 50%;
+  opacity: 1;
+}
+/**card的外部样式*/
+.dk-card-outer-class {
+  margin: 10px 32rpx 10px 32rpx;
+  margin-top: 10px;
+  border-radius: 15rpx;
+  /* box-shadow: 2px 2px 5px #e5e5e6; */
+}
+
+/**card的样式*/
+.dk-card-class {
+  background: #FFFFFF;
+  border-radius: 16rpx;
+  padding: 5rpx;
+  margin-bottom: 20rpx;
+  box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.08);
+  /* box-shadow: 0px -6px 20px 0px rgba(0, 0, 0, 0.08); */
+  
+
+}
+.item-class {
+  display: flex;
+  font-size: 30rpx;
+  padding: 20rpx;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.item-title-class {
+  margin-left: 14rpx;
+  font-size: 15px;
+  color: #1B365D;
+  font-weight: 600;
+  width: 80%;
+}

+ 25 - 13
package-purchase/pages/pur-track-report/detail/detail.js

@@ -7,6 +7,26 @@ Page({
      * 页面的初始数据
      * 页面的初始数据
      */
      */
     data: {
     data: {
+      stepList:[
+        {
+          name:"下单时间",
+          event:"",
+          time:"2021-07-19:12:30:01",
+          status:"0"
+        },
+        {
+          name:"支付时间",
+          event:"微信小程序,微信支付10.00元",
+          time:"2021-07-19:12:30:01",
+          status:"0"
+        },
+        {
+          name:"降锁时间",
+          event:"",
+          time:"2021-07-19:12:30:01",
+          status:"1"//status步骤条状态。=1表示最后一条渲染不同样式
+        }
+      ],
     // 路由
     // 路由
     routeObjName: 'report',
     routeObjName: 'report',
     purList:[],
     purList:[],
@@ -26,24 +46,16 @@ Page({
         if(res.data.data && res.data.data.length > 0){
         if(res.data.data && res.data.data.length > 0){
           let purList =  res.data.data.filter(item=>{
           let purList =  res.data.data.filter(item=>{
             return item.type== '采购订单'
             return item.type== '采购订单'
-          })
-          let purIntoList =  res.data.data.filter(item=>{
-            return item.type== '采购入库'
-          })
-          let purReturnList =  res.data.data.filter(item=>{
-            return item.type== '采购退货'
           }) 
           }) 
-          let verificationList =  res.data.data.filter(item=>{
-            return item.type== '核销信息'
+          let stepList =  res.data.data.filter(item=>{
+            return item.type !== '采购订单'
           }) 
           }) 
           if(purList&&purList[0]&&purList[0].itemResponseList&&purList[0].itemResponseList.length>0){
           if(purList&&purList[0]&&purList[0].itemResponseList&&purList[0].itemResponseList.length>0){
             purList = purList[0].itemResponseList
             purList = purList[0].itemResponseList
-          }
+          } 
           this.setData({
           this.setData({
-            purList:purList,
-            purIntoList:purIntoList,
-            purReturnList:purReturnList,
-            verificationList:verificationList,
+            stepList:stepList,
+            purList:purList, 
           })
           })
         }
         }
   
   

+ 4 - 10
package-purchase/pages/pur-track-report/detail/detail.wxml

@@ -41,9 +41,7 @@
     </view>
     </view>
 
 
 
 
-  </view>
-
-
+  </view> 
   <view style="display: flex;padding:10rpx;  margin: 10px 22rpx 10px 22rpx;margin-top: 10px;border-radius: 15rpx;">
   <view style="display: flex;padding:10rpx;  margin: 10px 22rpx 10px 22rpx;margin-top: 10px;border-radius: 15rpx;">
     <view style="background-color:#F4F9FF;width:25%;padding:10rpx;border-radius: 16rpx;">
     <view style="background-color:#F4F9FF;width:25%;padding:10rpx;border-radius: 16rpx;">
       <view style="font-size:13px;text-align: center;margin-top: 10rpx;">订单数量</view>
       <view style="font-size:13px;text-align: center;margin-top: 10rpx;">订单数量</view>
@@ -59,17 +57,13 @@
     </view>
     </view>
     <view style="background-color:#F4F9FF;width: 25%;padding:10rpx;border-radius: 16rpx;margin-left: 20rpx;">
     <view style="background-color:#F4F9FF;width: 25%;padding:10rpx;border-radius: 16rpx;margin-left: 20rpx;">
       <view style="font-size:13px;text-align: center;margin-top: 10rpx;">核销金额</view>
       <view style="font-size:13px;text-align: center;margin-top: 10rpx;">核销金额</view>
-      <dk-cell left="0rpx" center="center" fontSize="15" contentFontSize="18" contentColor="#1B365D" spaceWidth="0" contentFontWeight="700" amount="{{false}}" content="{{0}}"></dk-cell>
+      <dk-cell left="0rpx" center="center" fontSize="15" contentFontSize="18" contentColor="#1B365D" spaceWidth="0" contentFontWeight="700" amount="{{true}}" content="{{0}}"></dk-cell>
     </view>
     </view>
   </view>
   </view>
  
  
   <dk-goos-list type="sale" list="{{purList}}" title="商品明细" titleCol="skuName" titleTagCol="brandName" descCol="skuCode" priceCol="pricePur" sumAmountCol="sumAmount" sumQuantity="sumQuantity" quantityCol="itemQty"></dk-goos-list>
   <dk-goos-list type="sale" list="{{purList}}" title="商品明细" titleCol="skuName" titleTagCol="brandName" descCol="skuCode" priceCol="pricePur" sumAmountCol="sumAmount" sumQuantity="sumQuantity" quantityCol="itemQty"></dk-goos-list>
 
 
-  <dk-goos-list list="{{purIntoList}}" no="no" title="采购入库" titleCol="skuName" titleTagCol="brandName" descCol="skuCode" priceCol="pricePur" quantityCol="itemQty"></dk-goos-list>
-
-  <dk-goos-list list="{{saleReturnList}}" no="no" title="采购退货" titleCol="skuName" titleTagCol="brandName" descCol="skuCode" priceCol="priceSale" quantityCol="itemQty"></dk-goos-list>
-
-
-
+   
+  <dk-step stepList="{{stepList}}" > </dk-step> 
 
 
 </view>
 </view>