Sfoglia il codice sorgente

Merge branch 'master' of http://git.dongkesoft.com:9001/iBOSS-2.0-Mini/iboss_wx_app

wangyingjie 2 anni fa
parent
commit
b89e03c395

+ 7 - 1
package2/pages/product-attribute/product-attribute.js

@@ -245,7 +245,13 @@ Page({
   },
 
 
-
+  openSingle(e) {
+    console.log(e)
+    let key = e.currentTarget.dataset.key
+    wx.navigateTo({
+      url: './' + key +'/'+key,
+    })
+  },
   /**
    * @desc : 分类切换
    * @author : 于继渤

+ 1 - 1
package2/pages/product-attribute/product-attribute.wxml

@@ -219,7 +219,7 @@
     </van-field>
     <van-field disabled="{{false}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="red-label" maxlength="50" value="{{'蒙娜丽莎瓷砖'}}" input-align="right" label="品牌名称" placeholder="{{'请输入' + '品牌名称'}}" autosize border="{{ false }}">
     </van-field>
-    <van-field label-class="nomal-label" input-width="200rpx" input-class="dk-cell-value-class" input-align="right" data-key="product-types" maxlength="25" type="text" value="{{'' }}" label="供应商" placeholder="请选择" autosize border="{{ false }}" right-icon="arrow" color="#95A8CB" catchtap="openSingle" readonly="{{true}}">
+    <van-field label-class="nomal-label" input-width="200rpx" input-class="dk-cell-value-class" input-align="right" data-key="supplier-list" maxlength="25" type="text" value="{{'' }}" label="供应商" placeholder="请选择" autosize border="{{ false }}" right-icon="arrow" color="#95A8CB" catchtap="openSingle" readonly="{{true}}">
     </van-field>
   </view>
 

+ 132 - 63
package2/pages/product-attribute/product-types/product-types.js

@@ -1,66 +1,135 @@
-// package2/pages/product-attribute/product-types/product-types.js
+/*******************************************************************************
+ * Copyright(c) 2022 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		于继渤		 2024-1-23			1.00		    商品种类
+ *******************************************************************************/
 Page({
 
-    /**
-     * 页面的初始数据
-     */
-    data: {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad(options) {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload() {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
-
-    },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage() {
-
-    }
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    tableData: []
+  },
+  toChecked(e) {
+    console.log(e)
+    let index = e.currentTarget.dataset.index
+    let tableData = this.data.tableData
+    tableData.forEach(res => {
+      res.checked = false
+    })
+    tableData[index].checked = true
+    this.setData({
+      tableData: tableData
+    })
+  },
+
+  toAdd() {
+    this.setData({
+      showPopup: true
+    })
+  },
+  /**
+ * @desc : 关闭弹窗
+ * @author : 于继渤
+ * @date : 2024/1/23 9:16
+ */
+  onClosePopup() {
+    this.setData({
+      showPopup: false
+    })
+  },
+
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    this.setData({
+
+      tableData: [
+        {
+          name: '陶瓷类',
+          code: 'PP00001',
+          supplierName: '广东蒙娜丽莎新型材料集团有限公司',
+          checked: false,
+          arrow_1: false,
+          arrow_1_list: []
+        },
+        {
+          name: '浴室柜类',
+          code: 'PP00002',
+          checked: false,
+          arrow_1: true,
+          arrow_1_list: [
+            {
+              name: '原木柜',
+              code: 'PP00002',
+              checked: false,
+              arrow_2: true,
+              arrow_2_list: [
+                {
+                  name: '原木柜(主柜)',
+                  code: 'PP00002',
+                  checked: false,
+                }
+              ]
+            }
+          ]
+        }
+      ]
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
 })

+ 2 - 1
package2/pages/product-attribute/product-types/product-types.json

@@ -1,3 +1,4 @@
 {
-    "usingComponents": {}
+    "usingComponents": {},
+    "navigationBarTitleText": "商品属性"
 }

+ 129 - 2
package2/pages/product-attribute/product-types/product-types.wxml

@@ -1,2 +1,129 @@
-<!--package2/pages/product-attribute/product-types/product-types.wxml-->
-<text>package2/pages/product-attribute/product-types/product-types.wxml</text>
+<!-- 顶部信息 -->
+<van-sticky scroll-top="0">
+  <van-search model:value="{{ searchText }}" bind:change="onSearchText" bind:search="doSearch" placeholder="输入要素名称/备注"> </van-search>
+</van-sticky>
+
+
+
+<!-- 内容列表 -->
+<view style="width: 100%;">
+  <view wx:for="{{tableData}}" wx:key="index" class="main-class">
+    <van-swipe-cell right-width="{{ 65 }}">
+      <view data-index="{{index}}" class="main-foot" style="border-radius:15rpx;">
+        <view class="table-content">
+          <view class="table-content-row">
+            <view style="display: flex;">
+              <view style="width: 10%;" bind:tap="openArrow" data-index="{{index}}">
+                <van-icon name="{{item.arrow_1 ? 'arrow-down':'arrow'}}" color="#1B365D" />
+              </view>
+
+
+              <view style="font-size: 14px;font-weight: 600;width: 80%;" bind:tap="openArrow" data-index="{{index}}">
+                {{item.name}}
+              </view>
+
+
+              <view style="width: 10%;text-align: right;" bind:tap="toChecked">
+                <van-checkbox value="{{item.checked}}" data-index="{{index}}" checked-color="#1989FA" />
+              </view>
+
+            </view>
+
+          </view>
+
+          <view class="table-row" wx:if="{{item.arrow_1}}">
+            <view wx:for="{{item.arrow_1_list}}" wx:for-index="arrow_1_index" wx:for-item="arrow_1_item" class="table-content-row" style="width:100%;margin-left: 20rpx;">
+              <view style="display: flex;">
+                <view style="width: 10%;" bind:tap="openArrow" data-index="{{index}}">
+                  <van-icon name="{{arrow_1_item.arrow_2 ? 'arrow-down':'arrow'}}" color="#1B365D" />
+                </view>
+                <view style="font-size: 14px;font-weight: 600;width: 80%;" bind:tap="openArrow" data-index="{{arrow_1_index}}">
+                  {{arrow_1_item.name}}
+                </view>
+                <view style="width: 10%;text-align: right;" bind:tap="toChecked">
+                  <van-checkbox value="{{arrow_1_item.checked}}" data-index="{{index}}" checked-color="#1989FA" />
+                </view>
+              </view>
+
+              <view class="table-row" style="width: 100%;" wx:if="{{arrow_1_item.arrow_2}}">
+                <view wx:for="{{arrow_1_item.arrow_2_list}}" wx:for-index="arrow_2_index" wx:for-item="arrow_2_item" class="table-content-row" style="width:100%;padding-left:10px;padding-right: 2rpx;">
+                  <view style="display: flex;">
+                    <view style="width: 10%;" bind:tap="openArrow" data-index="{{index}}">
+                      <van-icon name="{{arrow_2_item.arrow_2 ? 'arrow-down':'arrow'}}" color="#1B365D" />
+                    </view>
+                    <view style="font-size: 14px;font-weight: 600;width: 80%;" bind:tap="openArrow" data-index="{{arrow_2_index}}">
+                      {{arrow_2_item.name}}
+                    </view>
+                    <view style="width: 10%;text-align: right;" bind:tap="toChecked">
+                      <van-checkbox value="{{arrow_2_item.checked}}" data-index="{{index}}" checked-color="#1989FA" />
+                    </view>
+                  </view>
+                </view>
+              </view>
+            </view>
+          </view>
+
+
+
+        </view>
+      </view>
+      <view data-index="{{index}}" bind:tap="onCloseDel" slot="right">{{item.flagValue ? '停用' : '启用'}}</view>
+    </van-swipe-cell>
+
+  </view>
+  <!-- 保留高度 -->
+  <view style="height: 220rpx;"></view>
+</view>
+
+
+<!-- 弹窗 新建-->
+<van-popup show="{{showPopup}}" position="bottom" bind:close="onClosePopup" custom-class="function-pop-class">
+
+  <view style="background-color:#F8F9FD;color:#1B365D;font-size: 17px;font-weight: 600;display: flex;justify-content: left;align-items: center;padding: 40rpx;">
+    <view>商品种类</view>
+  </view>
+
+  <van-field input-width="200rpx" disabled="{{true}}" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" data-key="addressNo" maxlength="50" value="{{ 'ZL00001' }}" input-align="right" label="种类编码" placeholder="" autosize border="{{ false }}" bind:change="changeCustomerFormField">
+  </van-field>
+
+
+
+  <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="red-label" data-key="addressNo" maxlength="50" value="{{ '浴室柜' }}" input-align="right" label="种类名称" placeholder="" autosize border="{{ false }}" bind:change="changeCustomerFormField">
+  </van-field>
+
+  <van-field label-class="nomal-label" input-width="200rpx" input-class="dk-cell-value-class" input-align="right" data-key="product-types" maxlength="25" type="text" value="{{ showPopupItem.name }}" label="父级" placeholder="请选择" autosize border="{{ false }}" right-icon="arrow" color="#95A8CB" catchtap="openSingle" readonly="{{true}}">
+  </van-field>
+
+
+  <van-field disabled="{{false}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" maxlength="50" value="" input-align="right" label="备注" placeholder="{{'请输入' + '备注'}}" autosize border="{{ false }}">
+  </van-field>
+
+
+  <view style="display: flex; padding:35rpx 34rpx 62rpx 34rpx;">
+    <view style="width:48%">
+      <van-button size="large" plain round color="#1B365D" custom-style="height:88rpx;" bind:click="onClosePopup" type="default">取消
+      </van-button>
+    </view>
+    <view style="width: 4%;"></view>
+    <view style="width:48%;">
+      <van-button size="large" round color="#1B365D" custom-style="height:88rpx;" bind:click="allClean" type="default">保存
+      </van-button>
+    </view>
+  </view>
+</van-popup>
+
+
+<!-- 底部加号 -->
+<!-- <view style="position: fixed;bottom: 230rpx;right: 30rpx;">
+  <view bind:tap="toAdd" 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> -->
+
+
+
+
+
+
+<!-- 底部信息 -->
+<dk-save-bottom flagTypeName="product-file-add-select" bottomClass="{{true}}" bind:submit="toClose" bind:allClean="toAdd" />

+ 119 - 63
package2/pages/product-attribute/supplier-list/supplier-list.js

@@ -1,66 +1,122 @@
-// package2/pages/product-attribute/supplier-list/supplier-list.js
+/*******************************************************************************
+ * Copyright(c) 2022 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		于继渤		 2024-1-24			1.00		    供应商列表
+ *******************************************************************************/
 Page({
 
-    /**
-     * 页面的初始数据
-     */
-    data: {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad(options) {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload() {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
-
-    },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage() {
-
-    }
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    tableData: []
+  },
+  toChecked(e) {
+    console.log(e)
+    let index = e.currentTarget.dataset.index
+    let tableData = this.data.tableData
+    tableData.forEach(res => {
+      res.checked = false
+    })
+    tableData[index].checked = true
+    this.setData({
+      tableData: tableData
+    })
+  },
+
+  toAdd() {
+    this.setData({
+      showPopup: true
+    })
+  },
+  /**
+ * @desc : 关闭弹窗
+ * @author : 于继渤
+ * @date : 2024/1/23 9:16
+ */
+  onClosePopup() {
+    this.setData({
+      showPopup: false
+    })
+  },
+
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    this.setData({
+
+      tableData: [
+        {
+          name: '佛山蒙娜丽莎瓷砖',
+          code: '张经理',
+          phone: '156 5678 5643',
+          brand:'蒙娜丽莎瓷砖',
+          account:'-6.000.00',
+          checked: false
+        },
+        {
+          name: '佛山蒙娜丽莎瓷砖',
+          code: '张经理',
+          phone: '156 5678 5643',
+          brand:'蒙娜丽莎瓷砖',
+          account:'-6.000.00',
+          checked: false
+        },
+      ]
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
 })

+ 2 - 1
package2/pages/product-attribute/supplier-list/supplier-list.json

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

+ 155 - 2
package2/pages/product-attribute/supplier-list/supplier-list.wxml

@@ -1,2 +1,155 @@
-<!--package2/pages/product-attribute/supplier-list/supplier-list.wxml-->
-<text>package2/pages/product-attribute/supplier-list/supplier-list.wxml</text>
+<!-- 顶部信息 -->
+<van-sticky scroll-top="0">
+  <van-search model:value="{{ searchText }}" bind:change="onSearchText" bind:search="doSearch" placeholder="输入供应商名称/联系人/电话/品牌/服务类别/备注"> </van-search>
+</van-sticky>
+
+
+
+<!-- 内容列表 -->
+<view style="width: 100%;">
+  <view wx:for="{{tableData}}" wx:key="index" class="main-class">
+    <van-swipe-cell right-width="{{ 65 }}">
+      <view bind:tap="toChecked" data-index="{{index}}" class="main-foot" style="border-radius:15rpx;">
+        <view class="table-content">
+          <view class="table-content-row">
+            <view style="display: flex;">
+              <view>
+                <van-checkbox value="{{item.checked}}" data-index="{{index}}" checked-color="#1989FA" />
+              </view>
+
+
+              <view style="font-size: 14px;font-weight: 600;width: 80%;margin-left: 20rpx;">
+                {{item.name}}
+              </view>
+
+              <view class="oas-title-value" data-item="{{item}}" catchtap="onclik">
+                <van-icon size="25" name="ellipsis" color="#1B365D" />
+              </view>
+
+            </view>
+
+          </view>
+          <view style="width: 100%;flex-direction: row; margin-top: 0px;">
+            <view class="table-content-row">
+              <view style="display: flex;width: 100%;">
+                <view style="width: 80%;display: flex;">
+                  <view class="table-content-row-font">
+                    <dk-text fontSize="14px" color="#95A8CB" fontWeight="nomal" value="联系人" copyValue="{{item.code}}"></dk-text>
+                  </view>
+                  <view class="table-content-class">
+                    {{item.code ? item.code :''}}
+                  </view>
+                </view>
+
+                <view style="width: 20%;text-align: center;">
+                  <dk-tag type="primary" height="32rpx" color="#EAF1FF" textColor="#606EB2" radius="5rpx" roundFlag="{{true}}" value="{{'采购供应商'}}"></dk-tag>
+                </view>
+              </view>
+
+
+
+            </view>
+          </view>
+
+          <view class="table-row">
+            <view class="table-content-row">
+              <view style="display: flex;">
+                <view class="table-content-row-font">
+                  <dk-text fontSize="14px" color="#95A8CB" fontWeight="nomal" value="联系电话" copyValue="{{item.phone}}"></dk-text>
+                </view>
+                <view class="table-content-class">
+                  {{item.phone ? item.phone :''}}
+                </view>
+              </view>
+            </view>
+          </view>
+
+          <view class="table-row">
+            <view class="table-content-row">
+              <view style="display: flex;">
+                <view class="table-content-row-font">
+                  <dk-text fontSize="14px" color="#95A8CB" fontWeight="nomal" value="供货品牌" copyValue="{{item.brand}}"></dk-text>
+                </view>
+                <view class="table-content-class">
+                  {{item.brand ? item.brand :''}}
+                </view>
+              </view>
+            </view>
+          </view>
+
+          <view style="width: 100%;flex-direction: row; margin-top: 0px;padding-top: 20rpx;">
+            <view class="table-content-row" style="display: flex;">
+              <view style="display: flex;width:85%">
+                <view class="table-content-row-font">
+                  <dk-text fontSize="14px" color="#1B365D" fontWeight="nomal" value="应付款" copyValue="{{item.account}}"></dk-text>
+                </view>
+                <view class="table-content-class" style="color:#CAA977;">
+                  {{item.account ? item.account :''}}
+                </view>
+              </view>
+              <view style="display: flex;width:15%;text-align: right;">
+                <dk-tag height="40rpx" plain="true" color="#00A7B5" textColor="#00A7B5" radius="5rpx" roundFlag="{{true}}" value="{{'打电话'}}"></dk-tag>
+              </view>
+            </view>
+          </view>
+
+
+        </view>
+      </view>
+      <view data-index="{{index}}" bind:tap="onCloseDel" slot="right">{{item.flagValue ? '停用' : '启用'}}</view>
+    </van-swipe-cell>
+
+  </view>
+  <!-- 保留高度 -->
+  <view style="height: 220rpx;"></view>
+</view>
+
+
+<!-- 弹窗 新建-->
+<van-popup show="{{showPopup}}" position="bottom" bind:close="onClosePopup" custom-class="function-pop-class">
+
+  <view style="background-color:#F8F9FD;color:#1B365D;font-size: 17px;font-weight: 600;display: flex;justify-content: left;align-items: center;padding: 40rpx;">
+    <view>供应商</view>
+  </view>
+
+  <van-field input-width="200rpx" disabled="{{true}}" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" data-key="addressNo" maxlength="50" value="{{ '张经理' }}" input-align="right" label="联系人" placeholder="" autosize border="{{ false }}" bind:change="changeCustomerFormField">
+  </van-field>
+
+  <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="red-label" data-key="addressNo" maxlength="50" value="{{ '蒙娜丽莎瓷砖' }}" input-align="right" label="供应商名称" placeholder="" autosize border="{{ false }}" bind:change="changeCustomerFormField">
+  </van-field>
+
+
+  <van-field input-width="200rpx" disabled="{{false}}" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" data-key="addressNo" maxlength="50" value="{{ '156 5678 5643' }}" input-align="right" label="联系人电话" placeholder="" autosize border="{{ false }}" bind:change="changeCustomerFormField">
+  </van-field>
+  <van-field disabled="{{false}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" maxlength="50" value="" input-align="right" label="备注" placeholder="{{'请输入' + '备注'}}" autosize border="{{ false }}">
+  </van-field>
+
+
+  <view style="display: flex; padding:35rpx 34rpx 62rpx 34rpx;">
+    <view style="width:48%">
+      <van-button size="large" plain round color="#1B365D" custom-style="height:88rpx;" bind:click="onClosePopup" type="default">取消
+      </van-button>
+    </view>
+    <view style="width: 4%;"></view>
+    <view style="width:48%;">
+      <van-button size="large" round color="#1B365D" custom-style="height:88rpx;" bind:click="allClean" type="default">保存
+      </van-button>
+    </view>
+  </view>
+</van-popup>
+
+
+<!-- 底部加号 -->
+<view style="position: fixed;bottom: 230rpx;right: 30rpx;">
+  <view bind:tap="toAdd" 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>
+
+
+
+
+
+
+<!-- 底部信息 -->
+<dk-save-bottom flagTypeName="product-file-add-select" bottomClass="{{true}}" bind:submit="toClose" bind:allClean="toAdd" />

+ 0 - 9
package2/pages/product-file/product-series/product-series.wxml

@@ -16,20 +16,11 @@
               <view>
                 <van-checkbox value="{{item.checked}}" data-index="{{index}}" checked-color="#1989FA" />
               </view>
-
-
               <view style="font-size: 14px;font-weight: 600;width: 80%;margin-left: 20rpx;">
                 {{item.name}}
               </view>
-
             </view>
-
           </view>
-   
-
-
-
-
         </view>
       </view>
       <view data-index="{{index}}" bind:tap="onCloseDel" slot="right">{{item.flagValue ? '停用' : '启用'}}</view>