wangyingjie 2 anni fa
parent
commit
8b1ec6edc2
26 ha cambiato i file con 205 aggiunte e 422 eliminazioni
  1. 5 5
      api/pages/ivt/inbound.js
  2. 2 3
      api/pages/mst/goodsSku.js
  3. 5 6
      app.json
  4. 0 0
      package-base-select/pages/select-choose-org/select-choose-org.js
  5. 0 0
      package-base-select/pages/select-choose-org/select-choose-org.json
  6. 0 0
      package-base-select/pages/select-choose-org/select-choose-org.wxml
  7. 1 0
      package-base-select/pages/select-choose-org/select-choose-org.wxss
  8. 0 0
      package-base-select/pages/select-choose-staff/select-choose-staff.js
  9. 0 0
      package-base-select/pages/select-choose-staff/select-choose-staff.json
  10. 0 0
      package-base-select/pages/select-choose-staff/select-choose-staff.wxml
  11. 1 0
      package-base-select/pages/select-choose-staff/select-choose-staff.wxss
  12. 124 98
      package-base-select/pages/select-suppliers/select-suppliers.js
  13. 36 55
      package-base-select/pages/select-suppliers/select-suppliers.wxml
  14. 30 3
      package-base-select/pages/select-suppliers/select-suppliers.wxss
  15. 0 0
      package-base-select/pages/select-warehouse/select-warehouse.js
  16. 0 0
      package-base-select/pages/select-warehouse/select-warehouse.json
  17. 0 0
      package-base-select/pages/select-warehouse/select-warehouse.wxml
  18. 0 0
      package-base-select/pages/select-warehouse/select-warehouse.wxss
  19. 0 5
      package-purchase/pages/purchase-based-sales/purchase-based-sales.js
  20. 1 1
      package-purchase/pages/purchase-based-sales/purchase-based-sales.wxml
  21. 0 1
      package-purchase/pages/purchase-receipt/choose-org/choose-org.wxss
  22. 0 1
      package-purchase/pages/purchase-receipt/choose-staff/choose-staff.wxss
  23. 0 162
      package-purchase/pages/purchase-receipt/choose-supplier/choose-supplier.js
  24. 0 4
      package-purchase/pages/purchase-receipt/choose-supplier/choose-supplier.json
  25. 0 46
      package-purchase/pages/purchase-receipt/choose-supplier/choose-supplier.wxml
  26. 0 32
      package-purchase/pages/purchase-receipt/choose-supplier/choose-supplier.wxss

+ 5 - 5
api/pages/ivt/inbound.js

@@ -26,13 +26,13 @@ module.exports = {
       detail: { key: 'detail', url: '/package-purchase/pages/purchase-receipt/detail/detail'  },
       add: { key: 'add', url: '/package-purchase/pages/purchase-receipt/add/add'  },
       addOther: { key: 'addOther', url: '/package-inventory/pages/other-warehousing/other-warehousing'  },
-      chooseSupplier: { key: 'chooseSupplier', url: '/package-purchase/pages/purchase-receipt/choose-supplier/choose-supplier'  },
-      chooseStaff: { key: 'chooseStaff', url: '/package-purchase/pages/purchase-receipt/choose-staff/choose-staff'  },
+      chooseSupplier: { key: 'chooseSupplier', url: '/package-base-select/pages/select-suppliers/select-suppliers'  },
+      chooseStaff: { key: 'chooseStaff', url: '/package-base-select/pages/select-choose-staff/select-choose-staff'  },
       staffadd: { key: 'staffadd', url: '/package-basic-data/pages/staff/add/add'  },
-      chooseOrg: { key: 'chooseOrg',url: '/package-purchase/pages/purchase-receipt/choose-org/choose-org' }, 
-      chooseWh: { key: 'chooseWh', url: '/package-basic-data/pages/product-file/warehouse-archives/warehouse-archives'  },
+      chooseOrg: { key: 'chooseOrg',url: '/package-base-select/pages/select-choose-org/select-choose-org' }, 
+      chooseWh: { key: 'chooseWh', url: '/package-base-select/pages/select-warehouse/select-warehouse'  },
       choosePurchaseOrder: { key: 'choosePurchaseOrder', url: '/package-purchase/pages/purchase-receipt/choose-purchase-order/choose-purchase-order'  },
-      
+    
     }
   } 
 };

+ 2 - 3
api/pages/mst/goodsSku.js

@@ -20,9 +20,8 @@ module.exports = {
           goodsBrand: { key: 'goodsBrand', url: '/package-basic-data/pages/product-file/product-brand/product-brand'  },
           goodsCategory: { key: 'goodsCategory', url: '/package-basic-data/pages/product-file/product-types/product-types'  },
           unit: { key: 'unit', url: '/package-basic-data/pages/product-file/metering-unit/metering-unit'  },
-          goodsSeries: { key: 'goodsSeries', url: '/package-basic-data/pages/product-file/product-series/product-series'  },
-          openingInventory: { key: 'openingInventory', url: '/package-basic-data/pages/product-file/warehouse-archives/warehouse-archives'  },
-         
+          goodsSeries: { key: 'goodsSeries', url: '/package-basic-data/pages/product-file/product-series/product-series'  }, 
+          openingInventory: { key: 'openingInventory', url: '/package-base-select/pages/select-warehouse/select-warehouse'  },
         }
     }
 };

+ 5 - 6
app.json

@@ -35,8 +35,7 @@
                 "pages/product-file/product-brand/product-brand",
                 "pages/product-file/product-types/product-types",
                 "pages/product-file/product-series/product-series",
-                "pages/product-file/metering-unit/metering-unit",
-                "pages/product-file/warehouse-archives/warehouse-archives",
+                "pages/product-file/metering-unit/metering-unit", 
                 "pages/product-attribute/product-attribute",
                 "pages/product-attribute/product-types/product-types",
                 "pages/product-attribute/supplier-list/supplier-list",
@@ -135,9 +134,6 @@
                 "pages/supplier-list/supplier-list",
                 "pages/supplier-list/add/add",
                 "pages/purchase-receipt/add/add",
-                "pages/purchase-receipt/choose-supplier/choose-supplier",
-                "pages/purchase-receipt/choose-org/choose-org",
-                "pages/purchase-receipt/choose-staff/choose-staff",
                 "pages/purchase-receipt/choose-purchase-order/choose-purchase-order"
             ]
         },
@@ -209,7 +205,10 @@
                 "pages/select-product-types/select-product-types",
                 "pages/select-product-attribute-suppliers/select-product-attribute-suppliers",
                 "pages/select-source-purchase-order/select-source-purchase-order",
-                "pages/select-source-purchase-order-reversal/select-source-purchase-order-reversal"
+                "pages/select-source-purchase-order-reversal/select-source-purchase-order-reversal",
+                "pages/select-choose-org/select-choose-org",
+                "pages/select-choose-staff/select-choose-staff",
+                "pages/select-warehouse/select-warehouse"
             ]
         }
     ],

+ 0 - 0
package-purchase/pages/purchase-receipt/choose-org/choose-org.js → package-base-select/pages/select-choose-org/select-choose-org.js


+ 0 - 0
package-purchase/pages/purchase-receipt/choose-org/choose-org.json → package-base-select/pages/select-choose-org/select-choose-org.json


+ 0 - 0
package-purchase/pages/purchase-receipt/choose-org/choose-org.wxml → package-base-select/pages/select-choose-org/select-choose-org.wxml


+ 1 - 0
package-base-select/pages/select-choose-org/select-choose-org.wxss

@@ -0,0 +1 @@
+/* package-base-select/pages/select-choose-org/select-choose-org.wxss */

+ 0 - 0
package-purchase/pages/purchase-receipt/choose-staff/choose-staff.js → package-base-select/pages/select-choose-staff/select-choose-staff.js


+ 0 - 0
package-purchase/pages/purchase-receipt/choose-staff/choose-staff.json → package-base-select/pages/select-choose-staff/select-choose-staff.json


+ 0 - 0
package-purchase/pages/purchase-receipt/choose-staff/choose-staff.wxml → package-base-select/pages/select-choose-staff/select-choose-staff.wxml


+ 1 - 0
package-base-select/pages/select-choose-staff/select-choose-staff.wxss

@@ -0,0 +1 @@
+/* package-base-select/pages/select-choose-staff/select-choose-staff.wxss */

+ 124 - 98
package-base-select/pages/select-suppliers/select-suppliers.js

@@ -1,136 +1,162 @@
-// package-base-select/pages/select-suppliers/select-suppliers.js
+const Constants = require('@/utils/Constants.js');
+const util = require('@/utils/util.js')
+const mixins = require('@/mixins/index.js')
+const app = getApp()
 Page({
-
+  mixins: [mixins],
   /**
    * 页面的初始数据
    */
   data: {
-    statusItem: {
-      text: '佛山居然店'
-    },
-    statusItem2: {
-      text: '张阿暖'
-    },
+    // 路由
+    routeObjName: 'select-product-attribute-suppliers',
+    tableData: [],
+    supplierService: app.globalData['supplierService'],
+    checked: true, //启用标识
+    tagList: [{
+      title: mixins.$t("all") //全部
+    }, {
+      title: mixins.$t("procurementSupplier") //采购供应商
+    }, {
+      title: mixins.$t("serviceProvider") // 服务供应商
+    }],
   },
   /**
- * @desc :  获取数据
- * @author : 周兴
- * @date : 2024/2/21 12:16
- */
-  chooseData(e) {
-    console.log('ff', e);
-    let index = e.currentTarget.dataset.index
-    let tableData = this.data.tableData
-    tableData.forEach(res => {
-      res.checked = false
-    })
-    tableData[index].checked = true
+     * @desc : 切换  全部 采购供应商  服务供应商
+     * @date : 2024/2/1 15:49
+     * @author : 王英杰
+     */
+  onChangeTabs(e) {
+    let index = e.detail.detail.index
     this.setData({
-      tableData: tableData
+      active: index,
     })
+    this.searchData()
+  },
 
-    var pages = getCurrentPages();
-    var prevPage = pages[pages.length - 2]; //上一个页面
-    let formData = prevPage.data.formData
-    let form = {}
-    if (formData) {
-      form = JSON.parse(formData)
+  /**
+   * @desc : 设置查询参数
+   * @date : 2024/2/1 15:49
+   * @author : 王英杰
+   */
+  setSearchParams(params) {
+    let active = this.data.active
+    if (active == 0) { //全部
+      params.supType = ""
+    }
+    if (active == 1) { //采购供应商
+      params.supType = mixins.$t("procurementSupplier") //采购供应商
+    }
+    if (active == 2) { //服务供应商
+      params.supType = mixins.$t("serviceProvider") //采购供应商
+    }
+    if (this.data.checked) { //启用标识开启  
+      params.flgValid = true
+    } else {
+      params.flgValid = false
     }
-    let item = e.currentTarget.dataset.item;
-    let objInfo = {}
-    objInfo.title = item.name
-    objInfo.subTitle = item.phone
-    objInfo.amountCol = '应收金额'
-    objInfo.amount = item.number
-    form.objInfo = objInfo
-    console.log('fff1', objInfo);
-    prevPage.setData({
-      form: form,
-      formData: JSON.stringify(form)
-    })
 
-    wx.navigateBack({
-      delta: 1
-    })
 
 
+
+    return params
   },
   /**
-   * 生命周期函数--监听页面加载
+   * @desc :   处理接口返回数据
+   * @date : 2024/2/1 15:49
+   * @author : 王英杰
    */
-  onLoad(options) {
-    // 接收父页面传递的参数
-    const eventChannel = this.getOpenerEventChannel()
-    eventChannel.on('params', function (data) {
-      console.log('params', data)
-    })
-    this.setData({
-      tableData: [
-        {
-          name: '张多多',
-          phone: '156 5678 5643',
-          number: '0',
-        },
-        {
-          name: '李薇薇',
-          phone: '156 5678 5643',
-          number: '-12335.00',
-        },
-        {
-          name: '王暖暖',
-          phone: '156 5678 5643',
-          number: '3002.00',
-        },
-      ]
-    })
+  handleSearchData(tableData) {
+    //显示已选
+    if (this.data.item && this.data.item.supplierIds) {
+      let supplierIds = this.data.item.supplierIds.split(",")
+      for (var i = 0; i < tableData.length; i++) {
+        // 检查当前对象的 id 是否包含在数组 A 中
+        if (supplierIds.includes(tableData[i].supId)) {
+          // 如果匹配,则修改该对象
+          tableData[i].checked = true
+        }
+      }
+      this.setData({
+        tableData:tableData
+      })
+    }
   },
-
   /**
-   * 生命周期函数--监听页面初次渲染完成
+   * @desc : 查询
+   * @date : 2024/2/1 15:49
+   * @author : 王英杰
    */
-  onReady() {
-
+  getData(params) {
+    return this.excute(this.data.supplierService, this.data.supplierService.selectByCond, params);
   },
 
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow() {
-
-  },
 
   /**
-   * 生命周期函数--监听页面隐藏
+   * @desc : 选择事件
+   * @date : 2024/2/1 15:49
+   * @author : 王英杰
    */
-  onHide() {
-
+  toDetail(e) { 
+    let tableData = this.data.tableData 
+    let index = e.currentTarget.dataset.index
+    let item = e.currentTarget.dataset.item 
+    tableData.forEach(res => {
+      res.checked = false
+    })
+    tableData[index].checked = true
+    this.setData({
+      tableData: tableData
+    })
+    const eventChannel = this.getOpenerEventChannel(); 
+    eventChannel.emit('bindData', { data: {id:item.supId,name:item.supName} })
+    wx.navigateBack({
+      delta: 1
+    }) 
   },
 
   /**
-   * 生命周期函数--监听页面卸载
+   * @desc : 跳转新建页
+   * @date : 2024/2/1 15:49
+   * @author : 王英杰
    */
-  onUnload() {
-
+  toSuppliers() {
+    wx.navigateTo({
+      url: app.globalData.routeUrl.supplier.add.url,
+      success: function (res) {
+        // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
+        res.eventChannel.emit('params', {})
+      }
+    })
   },
-
   /**
-   * 页面相关事件处理函数--监听用户下拉动作
+   * @desc : 将数据带回上一页
+   * @date : 2024/2/1 15:49
+   * @author : 王英杰
    */
-  onPullDownRefresh() {
-
+  toAdd() {
+    let tableData = this.data.tableData
+    let chooseIds = []
+    let chooseNames = []
+    tableData.forEach(res => {
+      if (res.checked) {
+        chooseIds.push(res.supId)
+        chooseNames.push(res.supName)
+      }
+    })
+    const eventChannel = this.getOpenerEventChannel();
+    eventChannel.emit('bindData', { data: { id: chooseIds, name: chooseNames } })
+    wx.navigateBack({
+      delta: 1
+    })
   },
-
   /**
-   * 页面上拉触底事件的处理函数
+   * 生命周期函数--监听页面加载
    */
-  onReachBottom() {
-
+  onLoad(options) {
   },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage() {
-
+  onShow(){
+    this.searchData()
   }
+
 })

+ 36 - 55
package-base-select/pages/select-suppliers/select-suppliers.wxml

@@ -1,65 +1,46 @@
+<!-- 前台导入wxmlUtil.wxs -->
+<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
+<loading wx:if="{{loading}}" loadingName="{{$t['loading']}}" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
 <van-sticky scroll-top="0">
-  <van-search model:value="{{ searchText }}" bind:change="onSearchText" bind:search="doSearch" placeholder="输入供应商名称/地址/编码"> </van-search>
-  <van-dropdown-menu active-color="#1B365D">
-
-    <van-dropdown-item id="statusItem2" title="{{ statusItem2.text }}">
-      <dk-dropdown-switch dataList="{{statusList}}" bind:commit='dropdowncommit'></dk-dropdown-switch>
-    </van-dropdown-item>
-    <van-dropdown-item id="statusItem" title="{{ statusItem.text }}">
-      <dk-dropdown-switch dataList="{{statusList}}" bind:commit='dropdowncommit'></dk-dropdown-switch>
-    </van-dropdown-item>
-
-  </van-dropdown-menu>
-
+    <!-- 查询条件 -->
+    <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['supplierName','contactName','contactPhone'])}}">
+    </dk-dropdown-menu>
+    <dk-tabs active="{{active}}" list="{{tagList}}" bind:onChange="onChangeTabs"> </dk-tabs>
 </van-sticky>
-
-
-<view style="margin: 20rpx 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;color:#FFFFFF;padding:20rpx;padding-top: 40rpx;padding-bottom: 40rpx;">
-      <view style="width: 50%;text-align: center;">
-        <view style="font-size: 13px;">供应商数</view>
-        <view style="font-weight: 600;padding-top: 6rpx;">312</view>
-      </view>
-      <view style="width: 50%;text-align: center;">
-        <view style="font-size: 13px;">应付统计</view>
-        <view style="font-weight: 600;padding-top: 6rpx;">63.38.265.00</view>
-      </view>
+<!-- 暂无数据 -->
+<van-empty wx:if="{{tableData.length<=0}}" description="{{$t['nodata']}}" />
+<!-- 列表区 -->
+<view wx:for="{{tableData}}" data-item="{{item}}" wx:key="index" class="main-class">
+    <view data-index="{{index}}" data-item="{{item}}" catchtap="toDetail" class="{{ item.checked ? 'main-foot checked-true' : 'main-foot'}}" style="position: relative;">
+        <view class="table-content">
+            <!-- 标题行 -->
+            <view class="table-content-row">
+                <view class="table-content-row-title">
+                    <!-- <van-checkbox value="{{item.checked}}" checked-color="#95A8CB" /> -->
+                    <!-- 标题 -->
+                    <view class="title-class" style="width: 50%;">
+                        <dk-text catchtap="toTitle" data-item="{{item}}" textDecoration="underline" fontSize="15px" value="{{item.supName}}"></dk-text>
+                    </view>
+                    <!-- 状态 -->
+                    <view class="status-class" data-item="{{item}}" catchtap="toStatus">
+                        <view class="status-detail-class">{{item.supType}}
+                        </view>
+                    </view>
+                </view>
+            </view>
+        </view>
     </view>
-
-  </view>
 </view>
+<!-- <van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">{{$t['noMore']}}~</van-divider> -->
+<view style="height: 135rpx;"></view>
 
-<view style="margin: 10px 32rpx 10px 32rpx;margin-top: 10px;border-radius: 15rpx;">
-  <view wx:for="{{tableData}}" wx:key="index" class="dk-card-class" data-item="{{item}}" data-index="{{index}}"   style="margin-bottom: 20rpx;padding:10rpx;display: flex;justify-content: left;align-items: center;{{item.checked? 'border: 1px solid #1B365D;':''}}" catchtap="chooseData">
-<!-- 
-    <view style="width: 10%;">
-      <van-checkbox value="{{item.checked}}" data-index="{{index}}" data-item="{{item}}" catchtap="catchtapCheck" checked-color="#1989FA" />
-    </view> -->
-    <view style="width: 100%;">
-
-
-      <van-field label-class="red-label" value="{{ item.name }}" input-align="left" label="供应商名称" placeholder="" data-type='name' readonly="{{true}}" autosize border="{{ false }}" bind:change="fieldChange">
-      </van-field>
 
-      <van-field label-class="nomal-label" value="{{ item.phone }}" input-align="left" label="供应商编码" placeholder="" data-type='name' readonly="{{true}}" autosize border="{{ false }}" bind:change="fieldChange">
-      </van-field>
-
-      <van-field label-class="nomal-label" value="{{ item.number }}" input-align="left" label="应付款" placeholder="" data-type='name' readonly="{{true}}" autosize border="{{ false }}" bind:change="fieldChange">
-      </van-field>
-    </view>
-
-
-
-
-    <view>
-    </view>
+<!-- 底部加号 -->
+<view style="position: fixed;bottom: 230rpx;right: 30rpx;">
+  <view bind:tap="toSuppliers" style="background: #CAA977;border-radius: 50%;display: flex;justify-content: center;align-items: center;padding:20rpx;box-shadow: 0px 17px 22px 0px #1B365D33;">
+    <van-icon name="plus" color="#FFFFFF" size="60rpx" />
   </view>
-
-
-  <view style="height: 220rpx;"></view>
 </view>
 
 
-<!-- 底部信息 -->
-<!-- <dk-save-bottom flagTypeName="selecting-customers" bottomClass="{{true}}"  bind:submit="toClose" bind:allClean="toAdd" /> -->
+ 

+ 30 - 3
package-base-select/pages/select-suppliers/select-suppliers.wxss

@@ -1,4 +1,31 @@
+.table-content-row-title {
+  display: flex;
+  width: 100%;
+  justify-content: space-around;
+}
+
+
+.status-class {
+  width: 25%;
+  height: 49rpx;
+  padding-right: 4rpx;
+}
+
+.status-detail-class {
+  height: 49rpx;
+  line-height: 49rpx;
+  border-radius: 6rpx;
+  background-color: #EAF1FF;
+  text-align: center;
+  width: 100%;
+  font-size: 13px;
+  color: #606EB2;
+  padding: 0 20rpx;
+}
+.checked-true{
+  background: linear-gradient(180deg, #6A9DFB 0%, #FAFCFF 100%);
+}
+.checked-false{
+  background: linear-gradient(180deg, #6A9DFB 0%, #FAFCFF 100%);
+}
 
-.van-cell{
-	padding: 8rpx !important;
-  }

+ 0 - 0
package-basic-data/pages/product-file/warehouse-archives/warehouse-archives.js → package-base-select/pages/select-warehouse/select-warehouse.js


+ 0 - 0
package-basic-data/pages/product-file/warehouse-archives/warehouse-archives.json → package-base-select/pages/select-warehouse/select-warehouse.json


+ 0 - 0
package-basic-data/pages/product-file/warehouse-archives/warehouse-archives.wxml → package-base-select/pages/select-warehouse/select-warehouse.wxml


+ 0 - 0
package-basic-data/pages/product-file/warehouse-archives/warehouse-archives.wxss → package-base-select/pages/select-warehouse/select-warehouse.wxss


File diff suppressed because it is too large
+ 0 - 5
package-purchase/pages/purchase-based-sales/purchase-based-sales.js


+ 1 - 1
package-purchase/pages/purchase-based-sales/purchase-based-sales.wxml

@@ -97,7 +97,7 @@
                       <view style="width: 100%;">
                         <dk-cell contentFontSize="16" height="45rpx" fontWeight="bold" left="0rpx" contentColor="#CAA977" title="" content="{{item_.itemAmt ? item_.itemAmt : 0}}"></dk-cell>
                       </view>
-                      <view style="width: 100%;text-align: right;font-size:24rpx;color: #95A8CB;line-height: 34rpx;">x {{item_.canBuyQuantity }}{{item_.flgNonStandardType == 1 ? (' * ' + item_.nonStandardArea + 'm²'): ''}}</view>
+                      <view style="width: 100%;text-align: right;font-size:24rpx;color: #95A8CB;line-height: 34rpx;">x {{item_.itemQty }} </view>
                     </view>
                   </view>
                   <!-- 底部明细 -->

+ 0 - 1
package-purchase/pages/purchase-receipt/choose-org/choose-org.wxss

@@ -1 +0,0 @@
-/* package-purchase/pages/purchase-receipt/choose-org/choose-org.wxss */

+ 0 - 1
package-purchase/pages/purchase-receipt/choose-staff/choose-staff.wxss

@@ -1 +0,0 @@
-/* package-purchase/pages/purchase-receipt/choose-staff/choose-staff.wxss */

+ 0 - 162
package-purchase/pages/purchase-receipt/choose-supplier/choose-supplier.js

@@ -1,162 +0,0 @@
-const Constants = require('@/utils/Constants.js');
-const util = require('@/utils/util.js')
-const mixins = require('@/mixins/index.js')
-const app = getApp()
-Page({
-  mixins: [mixins],
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    // 路由
-    routeObjName: 'select-product-attribute-suppliers',
-    tableData: [],
-    supplierService: app.globalData['supplierService'],
-    checked: true, //启用标识
-    tagList: [{
-      title: mixins.$t("all") //全部
-    }, {
-      title: mixins.$t("procurementSupplier") //采购供应商
-    }, {
-      title: mixins.$t("serviceProvider") // 服务供应商
-    }],
-  },
-  /**
-     * @desc : 切换  全部 采购供应商  服务供应商
-     * @date : 2024/2/1 15:49
-     * @author : 王英杰
-     */
-  onChangeTabs(e) {
-    let index = e.detail.detail.index
-    this.setData({
-      active: index,
-    })
-    this.searchData()
-  },
-
-  /**
-   * @desc : 设置查询参数
-   * @date : 2024/2/1 15:49
-   * @author : 王英杰
-   */
-  setSearchParams(params) {
-    let active = this.data.active
-    if (active == 0) { //全部
-      params.supType = ""
-    }
-    if (active == 1) { //采购供应商
-      params.supType = mixins.$t("procurementSupplier") //采购供应商
-    }
-    if (active == 2) { //服务供应商
-      params.supType = mixins.$t("serviceProvider") //采购供应商
-    }
-    if (this.data.checked) { //启用标识开启  
-      params.flgValid = true
-    } else {
-      params.flgValid = false
-    }
-
-
-
-
-    return params
-  },
-  /**
-   * @desc :   处理接口返回数据
-   * @date : 2024/2/1 15:49
-   * @author : 王英杰
-   */
-  handleSearchData(tableData) {
-    //显示已选
-    if (this.data.item && this.data.item.supplierIds) {
-      let supplierIds = this.data.item.supplierIds.split(",")
-      for (var i = 0; i < tableData.length; i++) {
-        // 检查当前对象的 id 是否包含在数组 A 中
-        if (supplierIds.includes(tableData[i].supId)) {
-          // 如果匹配,则修改该对象
-          tableData[i].checked = true
-        }
-      }
-      this.setData({
-        tableData:tableData
-      })
-    }
-  },
-  /**
-   * @desc : 查询
-   * @date : 2024/2/1 15:49
-   * @author : 王英杰
-   */
-  getData(params) {
-    return this.excute(this.data.supplierService, this.data.supplierService.selectByCond, params);
-  },
-
-
-  /**
-   * @desc : 选择事件
-   * @date : 2024/2/1 15:49
-   * @author : 王英杰
-   */
-  toDetail(e) { 
-    let tableData = this.data.tableData 
-    let index = e.currentTarget.dataset.index
-    let item = e.currentTarget.dataset.item 
-    tableData.forEach(res => {
-      res.checked = false
-    })
-    tableData[index].checked = true
-    this.setData({
-      tableData: tableData
-    })
-    const eventChannel = this.getOpenerEventChannel(); 
-    eventChannel.emit('bindData', { data: {id:item.supId,name:item.supName} })
-    wx.navigateBack({
-      delta: 1
-    }) 
-  },
-
-  /**
-   * @desc : 跳转新建页
-   * @date : 2024/2/1 15:49
-   * @author : 王英杰
-   */
-  toSuppliers() {
-    wx.navigateTo({
-      url: app.globalData.routeUrl.supplier.add.url,
-      success: function (res) {
-        // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
-        res.eventChannel.emit('params', {})
-      }
-    })
-  },
-  /**
-   * @desc : 将数据带回上一页
-   * @date : 2024/2/1 15:49
-   * @author : 王英杰
-   */
-  toAdd() {
-    let tableData = this.data.tableData
-    let chooseIds = []
-    let chooseNames = []
-    tableData.forEach(res => {
-      if (res.checked) {
-        chooseIds.push(res.supId)
-        chooseNames.push(res.supName)
-      }
-    })
-    const eventChannel = this.getOpenerEventChannel();
-    eventChannel.emit('bindData', { data: { id: chooseIds, name: chooseNames } })
-    wx.navigateBack({
-      delta: 1
-    })
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad(options) {
-  },
-  onShow(){
-    this.searchData()
-  }
-
-})

+ 0 - 4
package-purchase/pages/purchase-receipt/choose-supplier/choose-supplier.json

@@ -1,4 +0,0 @@
-{
-    "usingComponents": {},
-    "navigationBarTitleText": "供应商列表"
-}

+ 0 - 46
package-purchase/pages/purchase-receipt/choose-supplier/choose-supplier.wxml

@@ -1,46 +0,0 @@
-<!-- 前台导入wxmlUtil.wxs -->
-<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
-<loading wx:if="{{loading}}" loadingName="{{$t['loading']}}" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
-<van-sticky scroll-top="0">
-    <!-- 查询条件 -->
-    <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['supplierName','contactName','contactPhone'])}}">
-    </dk-dropdown-menu>
-    <dk-tabs active="{{active}}" list="{{tagList}}" bind:onChange="onChangeTabs"> </dk-tabs>
-</van-sticky>
-<!-- 暂无数据 -->
-<van-empty wx:if="{{tableData.length<=0}}" description="{{$t['nodata']}}" />
-<!-- 列表区 -->
-<view wx:for="{{tableData}}" data-item="{{item}}" wx:key="index" class="main-class">
-    <view data-index="{{index}}" data-item="{{item}}" catchtap="toDetail" class="{{ item.checked ? 'main-foot checked-true' : 'main-foot'}}" style="position: relative;">
-        <view class="table-content">
-            <!-- 标题行 -->
-            <view class="table-content-row">
-                <view class="table-content-row-title">
-                    <!-- <van-checkbox value="{{item.checked}}" checked-color="#95A8CB" /> -->
-                    <!-- 标题 -->
-                    <view class="title-class" style="width: 50%;">
-                        <dk-text catchtap="toTitle" data-item="{{item}}" textDecoration="underline" fontSize="15px" value="{{item.supName}}"></dk-text>
-                    </view>
-                    <!-- 状态 -->
-                    <view class="status-class" data-item="{{item}}" catchtap="toStatus">
-                        <view class="status-detail-class">{{item.supType}}
-                        </view>
-                    </view>
-                </view>
-            </view>
-        </view>
-    </view>
-</view>
-<!-- <van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">{{$t['noMore']}}~</van-divider> -->
-<view style="height: 135rpx;"></view>
-
-
-<!-- 底部加号 -->
-<view style="position: fixed;bottom: 230rpx;right: 30rpx;">
-  <view bind:tap="toSuppliers" style="background: #CAA977;border-radius: 50%;display: flex;justify-content: center;align-items: center;padding:20rpx;box-shadow: 0px 17px 22px 0px #1B365D33;">
-    <van-icon name="plus" color="#FFFFFF" size="60rpx" />
-  </view>
-</view>
-
-
- 

+ 0 - 32
package-purchase/pages/purchase-receipt/choose-supplier/choose-supplier.wxss

@@ -1,32 +0,0 @@
-.table-content-row-title {
-    display: flex;
-    width: 100%;
-    justify-content: space-around;
-  }
-  
-  
-  .status-class {
-    width: 25%;
-    height: 49rpx;
-    padding-right: 4rpx;
-  }
-  
-  .status-detail-class {
-    height: 49rpx;
-    line-height: 49rpx;
-    border-radius: 6rpx;
-    background-color: #EAF1FF;
-    text-align: center;
-    width: 100%;
-    font-size: 13px;
-    color: #606EB2;
-    padding: 0 20rpx;
-  }
-  .checked-true{
-    background: linear-gradient(180deg, #6A9DFB 0%, #FAFCFF 100%);
-  }
-  .checked-false{
-    background: linear-gradient(180deg, #6A9DFB 0%, #FAFCFF 100%);
-  }
-
- 

Some files were not shown because too many files changed in this diff