王英杰 1 year ago
parent
commit
c04fca543a

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

@@ -17,8 +17,8 @@ module.exports = {
     routeUrl: {
         goodsSku: {
             add: { key: 'add', url: '/package-basic-data/pages/product-file/add/add'  },
-            edit: { key: 'edit', url: '/package-basic-data/pages/product-file/add/add'  },
-          goodsBrand: { key: 'goodsBrand', url: '/package-basic-data/pages/product-file/product-brand/product-brand'  },
+            edit: { key: 'edit', url: '/package-basic-data/pages/product-file/add/add'  }, 
+          goodsBrand: { key: 'chooseServiceCategory', url: '/package-base-select/pages/select-data/select-data',type:'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'  }, 

+ 1 - 2
app.json

@@ -34,8 +34,7 @@
                 "pages/basic-data/basic-data",
                 "pages/basic-data/basic-data-sort/basic-data-sort",
                 "pages/product-file/product-file",
-                "pages/product-file/add/add",
-                "pages/product-file/product-brand/product-brand",
+                "pages/product-file/add/add", 
                 "pages/product-file/product-types/product-types",
                 "pages/product-file/product-series/product-series",
                 "pages/product-file/metering-unit/metering-unit",

+ 1 - 1
package-base-select/pages/select-data/select-data.js

@@ -571,7 +571,7 @@ Page({
       case Constants.chooseType.brand:
         title = "品牌"
         this.setData({
-          addUrl: '/package-basic-data/pages/basic-data/basic-data',
+          addUrl: '/package-basic-data/pages/product-attribute/product-attribute',
           routeObjName: 'common',
           method: 'goodsBrandListBy',
           chooseFlag: route.chooseFlag,

+ 0 - 147
package-basic-data/pages/product-file/product-brand/product-brand.js

@@ -1,147 +0,0 @@
-/*******************************************************************************
-* Copyright(c) 2022 dongke All rights reserved. / Confidential
-* 类的信息:
-*		1.程序名称:
-* 编辑履历:
-*		作者				日期					版本				修改内容
-*		王英杰		 2024-1-24			1.00		    商品品牌
-*******************************************************************************/ 
-const util = require('@/utils/util.js')
-const mixins = require('@/mixins/index.js')
-const app = getApp()
-
-Page({
-  mixins: [mixins],
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    dataItem:{},
-    tableData: [],
-    formDataName: mixins.$t('goodsBrand'),
-    popContent:
-    [
-      { code: 'brandCode', type: 'str', title: mixins.$t('brandCode'), required: false, readonly: true, },
-      { code: 'brandName', type: 'str', title: mixins.$t('brandName'), required: true },
-      { code: 'shortName', type: 'str', title: mixins.$t('abbreviation'), required: true },
-      { code: 'supplierIds', name: 'supplierNames', title: 'supplier', type: 'choose', required: false, dropType: 'supplier',  urlKey: 'selectProductAttributeSuppliers', },
-      { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
-    ],
-    commonService: app.globalData['commonService'],
-    goodsBrandService: app.globalData['goodsBrandService'], 
- 
-        // 路由
-    routeObjName: 'goodsBrand',
-  },
-   /**
-     * @desc   : 点击变色
-     * @author : 王英杰
-     * @date   : 2024/1/26 11:46
-     */ 
-  toChecked(e) {
-    console.log(e)
-    let index = e.currentTarget.dataset.index
-    let item = e.currentTarget.dataset.item
-    let tableData = this.data.tableData
-    tableData.forEach(res => {
-      res.checked = false
-    })
-    tableData[index].checked = true
-    this.setData({
-      tableData: tableData
-    })
-    const eventChannel = this.getOpenerEventChannel(); 
-    eventChannel.emit('bindData', { data: {id:item.brandId,name:item.brandName} })
-    wx.navigateBack({
-      delta: 1
-    }) 
-  },
-    /**
-     * @desc   : 侧滑事件
-     * @author : 王英杰
-     * @date   : 2024/1/26 11:46
-     */
-    changeSwipe(e) {
-      console.log("e",e)
-      let item = e.currentTarget.dataset.item
-      //停用启用
-      let param = {
-        brandId: item.brandId,
-        flgValid: !item.flgValid,
-      }
-      this.setData({
-        formData: JSON.stringify(param)
-      })
-      //执行编辑操作
-      this.save({})
-    },
- /**
- * @desc : 打开新建弹窗
- * @author : 王英杰
- * @date : 2024/1/23 9:16
- */
-  toAdd() {
-    this.setData({
-      showPop: true
-    })
-  },
-  /**
- * @desc : 关闭弹窗
- * @author : 王英杰
- * @date : 2024/1/23 9:16
- */
-  onClosePopup() {
-    this.setData({
-      showPop: false
-    })
-  },
-/**
-  * @desc : 查询数据
-  * @date : 2024/2/1 15:49
-  * @author : 王英杰
-  */
- getData(params) {
-  return this.excute(this.data.commonService, this.data.commonService.goodsBrandListBy, params);
-},
-  /**
-   * @desc   : 新建编辑事件
-   * @author : 王英杰
-   * @date   : 2024/1/26 11:46
-   */
-  editItems(e) {
-    let data = e.detail.form
-    this.setData({
-      formData: JSON.stringify(data)
-    })
-    //执行保存编辑操作
-    this.save({})
-  },
-
-  /**
-   * @desc : 保存编辑
-   * @author : 王英杰
-   * @date : 2022/5/26 20:16
-   */
-  saveData(params) {
-    if (params.brandId) { //编辑 
-      return this.excute(this.data.goodsBrandService, this.data.goodsBrandService.update, params);
-    } else { //新建
-      return this.excute(this.data.goodsBrandService, this.data.goodsBrandService.insert, params);
-    }
-    
-   
-  },
-  
-     /**
-   * @desc :保存接口的 后续处理方法
-   * @date : 2024/2/1 15:49
-   * @author : 王英杰
-   */ 
-  handleData(data) { 
-    this.setData({
-      showPop: false, 
-    })
-  this.searchData()
-  },
-
-})

+ 0 - 4
package-basic-data/pages/product-file/product-brand/product-brand.json

@@ -1,4 +0,0 @@
-{
-    "usingComponents": {},
-    "navigationBarTitleText": "商品品牌"
-}

+ 0 - 79
package-basic-data/pages/product-file/product-brand/product-brand.wxml

@@ -1,79 +0,0 @@
-<!-- 前台导入wxmlUtil.wxs -->
-<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
-<!-- 顶部信息 -->
-<van-sticky scroll-top="0">
-   <!-- 查询条件 -->
-   <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['skuName'])}}">
-  </dk-dropdown-menu>
-</van-sticky>
-
-
-
-<!-- 内容列表 -->
-<view style="width: 100%;">
-  <view wx:for="{{tableData}}" wx:key="index" class="main-class"> 
-      <view bind:tap="toChecked" data-index="{{index}}" data-item="{{item}}" class="{{item.checked ? 'main-foot-1' : 'main-foot'}}" style="border-radius:15rpx;" style="{{item.checked ?'background-color: #E1E5EE;':''}}">
-        <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.brandName}}
-              </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="{{$t['brandCode']}}" copyValue="{{item.code}}"></dk-text>
-                </view>
-                <view class="table-content-class">
-                  {{item.brandCode ? item.brandCode :''}}
-                </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="{{$t['supplier']}}" copyValue="{{item.supplierName}}"></dk-text>
-                </view>
-                <view class="table-content-class">
-                  {{item.supplierName ? item.supplierName :''}}
-                </view>
-              </view>
-            </view>
-          </view>  
-        </view>
-      </view> 
-  </view>
-  <!-- 保留高度 -->
-  <view style="height: 220rpx;"></view>
-</view>
-
-
- 
-
-<dk-popup type="basic" priceTitle="" priceCol="pricePromotion" subCol="desc" title="{{formDataName}}" value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjName}}" contentObj="{{popContent}}" bind:commit="editItems" validFlag ="{{true}}">
-</dk-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 - 1
package-basic-data/pages/product-file/product-brand/product-brand.wxss

@@ -1 +0,0 @@
-/* package-basic-data/pages/product-file/product-brand/product-brand.wxss */