于继渤 1 год назад
Родитель
Сommit
5b4f7da2ab

+ 1 - 0
api/pages/ivt/inboundItem.js

@@ -13,6 +13,7 @@ module.exports = {
       prefix: 'mdm-server/ivt/inboundItem/', 
       costCheckOk:'cost_check_ok',
       selectCostCheck:'select_cost_check',
+      selectCostCheckList:'select_cost_check_list',
 
   },
 

+ 0 - 1
app.json

@@ -120,7 +120,6 @@
                 "pages/inventory-check/add/add",
                 "pages/inventory-check/detail/detail",
                 "pages/cost-check/cost-check",
-                "pages/cost-check/add/add",
                 "pages/ivt-warning-report/ivt-warning-report",
                 "pages/ivt-warning-report/ivit-warning-report-setting/ivit-warning-report-setting"
             ]

+ 0 - 95
package-inventory/pages/cost-check/add/add.js

@@ -1,95 +0,0 @@
-const mixins = require('@/mixins/index.js')
-Page({
-  mixins: [mixins],
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    tableData: [],
-    // 路由
-    routeObjName: 'inboundItem',
-    buttonSaveList: [
-      { code: 'add', title: mixins.$t('costCheck'), },
-    ],
-    // 内容一定
-    content: [
-      {
-        left: { tag: 'brandName', title: 'skuModel', type: 'title' },
-      },
-      {
-        left: { name: 'skuName', },
-      },
-      {
-        left: { name: 'priceInto', type: 'price' },
-        right: { name: 'costPrice', title: '入库核对单价', type: 'price' }
-      },
-      {
-        left: { name: 'nonStdCode', title: '色号:' },
-        right: { name: 'whName' },
-
-      },
-      {
-        left: { name: 'skuSpec', title: '规格:' },
-        right: { name: 'packBox', title: '箱片:' },
-      },
-      {
-        left: { name: 'intoQty', title: '入库数量:' },
-        right: { name: 'seriesName', title: '系列:' },
-      }
-    ],
-    
-  },
-  /**
-  * @desc : 入库单据输入事件
-  * @date : 2024/2/1 15:49
-  * @author : 于继渤
-  */
-  changeAmount(e) {
-    let index = e.detail.index
-    let key = e.detail.key
-    let value = e.detail.value
-    let tableData = this.data.tableData;
-    if (tableData && tableData[index]) {
-      tableData[index][key] = Number(value)
-      tableData[index].costAmt = (Number(tableData[index][key] * tableData[index].intoQty)).toFixed(2)
-    }
-    this.setData({
-      tableData: tableData
-    })
-  },
-  /**
-   * @desc : 设置保存参数
-   * @date : 2024/2/1 15:49
-   * @author : 于继渤
-   */
-  setParams(params) {
-    params = []
-    params = this.data.tableData
-    return params
-  },
-
-  /**
-   * @desc : 保存数据服务
-   * @date : 2024/2/1 15:49
-   * @author : 于继渤
-   */
-  saveData() {
-    return this.excute(this.data.service, this.data.service.costCheckOk, this.data.params);
-  },
-  /**
-  * 生命周期函数--监听页面加载
-  */
-  loadInit() {
-    let that = this
-    const eventChannel = this.getOpenerEventChannel()
-    eventChannel.on('params', function (data) {
-      data.chooseList.forEach(it => {
-        it.costPrice =  it.costPrice ? it.costPrice :  it.priceInto 
-        it.costAmt = Number(it.costPrice)* Number(it.intoQty)
-      })
-      that.setData({
-        tableData: data.chooseList
-      })
-    })
-  }
-})

+ 0 - 4
package-inventory/pages/cost-check/add/add.json

@@ -1,4 +0,0 @@
-{
-  "usingComponents": {},
-  "navigationBarTitleText":"成本核对"
-}

+ 0 - 5
package-inventory/pages/cost-check/add/add.wxml

@@ -1,5 +0,0 @@
-<!-- 列表区 -->
-<dk-list list="{{tableData}}" detailReportFlag="{{true}}" titleImageFlag="{{false}}" flgPoint="{{false}}" chooseFlag="{{false}}" bind:choose="listChoose" title="intoNo" subTitle="intoDate" status="intoStatusName" buttonList="{{popbuttonList}}" content="{{content}}" contentCol="{{contentCol}}" bind:changeNumberInput="changeAmount" contentObj="{{contentObj}}"></dk-list>
-
-<!--  保存 -->
-<dk-save-button btnAutoWidthFlag="{{true}}"  btnRightFlag="{{false}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="save"></dk-save-button>

+ 0 - 1
package-inventory/pages/cost-check/add/add.wxss

@@ -1 +0,0 @@
-/* package-inventory/pages/cost-check/add/add.wxss */

+ 316 - 236
package-inventory/pages/cost-check/cost-check.js

@@ -1,7 +1,15 @@
+/*******************************************************************************
+ * Copyright(c) 2022 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:选品
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		于继渤		 2024-1-23			1.00		    选品
+ *******************************************************************************/
 const mixins = require('@/mixins/index.js')
-const api = require('@/utils/api.js');
+import Dialog from '@/dist/dialog/dialog.js';
+import { toThousandCents } from '@/utils/common';
 const config = require('@/config/config.js');
-const Constants = require('@/utils/Constants');
 const util = require('@/utils/util.js')
 const app = getApp()
 Page({
@@ -10,286 +18,358 @@ Page({
    * 页面的初始数据
    */
   data: {
-    tableData: [],
-    showSearch: false,
-    initSearchFlag: true,
-    buttonSaveList: [
-      { code: 'add', title: mixins.$t('costCheck'), },
-    ],
-    contentSaveList: [{
-      code: 'flag',
-      title: mixins.$t("allChoose"),
-      type: 'checkbox'
-    },],
-    cardList: ['main'],
-    refreshByAdd:true,
-    contentObj: {
-      main: [
-        { code: 'intoType', name: 'intoType', type: 'chooseAndStr', required: true, title: mixins.$t('intType'), urlKey: 'chooseIntType' },
-        { code: 'supName', type: 'str', required: false, title: mixins.$t('supplier') },
-        { code: 'enterWhDate', name: 'enterWhDate', type: 'dateDay', required: false },
-        { code: 'createTime', name: 'createTime', type: 'dateDay', required: false },
-        { code: 'staffId', name: 'staffName', type: 'choose', required: false, title: mixins.$t('staffId'), urlKey: 'chooseStaff' },
-        { code: 'orgId', name: 'orgName', type: 'choose', required: false, title: mixins.$t('orgTwo'), urlKey: 'chooseOrg' }
-      ]
-    },
-    // 查询条件
-    searchContent: [{
-      code: 'intoDate',
-      title: mixins.$t('currentMonth'),//本月',
-      defaultValue: 2,
-      searchType: Constants.searchType.date
-    },
-    {
-      code: 'staff',
-      title: mixins.$t("staffId"),
-      dropType: 'staff'
-    },
-    {
-      code: 'org',
-      title: mixins.$t("orgId"),
-      dropType: 'org'
-    },
-    {
-      code: 'choose',
-      title: mixins.$t('choose'),//'筛选',
-      searchType: Constants.searchType.pick
+    imageUrl: config.image_url + '/static/img/',
+    routeObjName: 'goodsSku',
+    dataItem: '{}',
+    formData: '{}',
+    choosedGoodsList: [],
+    commonService: app.globalData['commonService'],
+    inboundItemService: app.globalData['inboundItemService'],
+    typeList: [{
+      brandName: '全部品牌'
     }],
-    // 查询条件-筛选
-    pullMenuList: [
-      {
-        code: 'intoStatus',
-        pullType: 'mSelect',
-        typeName: 'intoStatus'
-      },
-      {
-        code: 'staffName',
-      },
-      {
-        code: 'orgName',
-      },
-      {
-        code: 'supName',
-      },
-      {
-        code: 'intoDate',
-        dataType: 'date'
-      },
-      {
-        code: 'viewNoCostDocuments',
-        dataType: 'checkbox'
-      },
-    ],
-    statusImage: 'verified.png',
-    // 内容一定
-    content: [
-      {
-        left: { tag: 'brandName', title: 'skuModel', type: 'title' },
-      },
-      {
-        left: { name: 'skuName', },
-      },
-      {
-        left: { name: 'priceInto', type: 'price' },
-        right: { name: 'intoQty', type: 'qty' }
-      },
-      {
-        left: { name: 'nonStdCode', title: '色号:' },
-        right: { name: 'whName' },
+    brandId: null,
+    active: 0,
+    // 确定按钮
+    buttonList: [{
+      name: 'confirm',
+      title: '保存'
+    }],
+    dateDefault: {
+      text: '本月',
+      value: 3
+    },
+    contentList: [],
+    createtimeShow: false,
+    backFlag: false,
+    navigateBackFlag: true,
+    topTitle: '1.本功能只更新选定时间内没成本价格的商品;2.核对对应单据成本'
+  },
 
+  /**
+   * @desc : 日期组件后的回调
+   * @author : 周兴
+   * @date : 2024/1/26 12:16
+   */
+  dateCommit(e) {
+    console.log('日期组件后的回调')
+    let data = e.detail.date
+    let code = e.detail.code
+    let formData = JSON.parse(this.data.formData)
+    formData['intoDateStart'] = data[0]
+    formData['intoDateEnd'] = data[1]
+    let dateDefault = e.detail.dateDefault
+    this.setData({
+      defaultValue: {
+        value: dateDefault.value,
+        text: dateDefault.text
       },
-      {
-        left: { name: 'skuSpec', title: '规格:' },
-        right: { name: 'seriesName', title: '系列:' },
-      }
-    ],
-    contentObjList: {
-      '已核对':
-        [
-          {
-            left: { tag: 'brandName', title: 'skuModel', type: 'title' },
-          },
-          {
-            left: { name: 'skuName', },
-          },
-          {
-            left: { name: 'costPrice', type: 'price' },
-            right: { name: 'intoQty', type: 'qty' }
-          },
-          {
-            left: { name: 'nonStdCode', title: '色号:' },
-            right: { name: 'whName' },
+      // createtimeShow: false
+    })
 
-          },
-          {
-            left: { name: 'skuSpec', title: '规格:' },
-            right: { name: 'seriesName', title: '系列:' },
-          }
-        ],
-        '未核对':
-        [
-          {
-            left: { tag: 'brandName', title: 'skuModel', type: 'title' },
-          },
-          {
-            left: { name: 'skuName', },
-          },
-          {
-            left: { name: 'priceInto', type: 'price' },
-            right: { name: 'intoQty', type: 'qty' }
-          },
-          {
-            left: { name: 'nonStdCode', title: '色号:' },
-            right: { name: 'whName' },
+    this.setData({
+      formData: JSON.stringify(formData),
+    })
+    // 调取查询
+    this.doSearch();
+    if (!this.data.createtimeShow) {
 
-          },
-          {
-            left: { name: 'skuSpec', title: '规格:' },
-            right: { name: 'seriesName', title: '系列:' },
-          }
-        ]
-    },
-    // 路由
-    routeObjName: 'inboundItem',
-  },
+    }
 
+  },
   /**
-  * @desc : 全选
-  * @date : 2024/2/1 15:49
-  * @author : 于继渤
-  */
-  allChoose(e) {
-    let btnFormData = this.data.btnFormData ? JSON.parse(this.data.btnFormData) : ''
-    let tableData = this.data.tableData
-    tableData.forEach(res => {
-      res.checked = btnFormData.flag
-    })
+   * @desc : 打开日期
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  openCreatetime() {
     this.setData({
-      tableData: tableData
+      createtimeShow: !this.data.createtimeShow
+    })
+  },
+  openTitle() {
+    let that = this
+    Dialog.alert({
+      message: that.data.topTitle,
+      theme: 'round-button',
+      confirmButtonText: '知道了'
+    }).then(() => {
+      // on close
+    });
+  },
+
+  /**
+ * @desc : 反回
+ * @date : 2024/2/1 15:49
+ * @author : 于继渤
+ */
+  onClickLeft() {
+    wx.navigateBack({
+      data: 1
     })
   },
+
+
+
+
   /**
-  * @desc : 选择事件
-  * @date : 2024/2/1 15:49
-  * @author : 于继渤
-  */
-  listChoose(e) {
+   * @desc : 删除已选
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  delChoosedGoodsItem(e) {
+    let index = e.currentTarget.dataset.index
+    let choosedGoodsList = this.data.choosedGoodsList
     let tableData = this.data.tableData
-    tableData[e.detail.index].checked = e.detail.checked
+    tableData[choosedGoodsList[index]['tableDataIndex']]['isFlgCostCheck'] = false
+    choosedGoodsList.splice(index, 1)
     this.setData({
+      choosedGoodsList: choosedGoodsList,
       tableData: tableData
     })
   },
   /**
-  * @desc : 核对成本跳转
-  * @date : 2024/2/1 15:49
-  * @author : 于继渤
-  */
-  toAdd() {
+   * @desc : 补录
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  addItem(e) {
+    let choosedGoodsList = this.data.choosedGoodsList
     let tableData = this.data.tableData
-    let chooseList = []
-    chooseList = tableData.filter(res => {
-      return res.checked
-    })
-    if (chooseList.length == 0) {
-      util.showToast('请选择一条数据');
+    let item = e.currentTarget.dataset.item
+    let index = e.currentTarget.dataset.index
+    if (tableData[index]['isFlgCostCheck']) {
+      //已经点击补录 无法再次点击
       return
     }
-    let this_ = this
-    wx.navigateTo({
-      url: this.data.route.add.url,
-      events: {
-        // 回调后
-        bindData: function (data) {
-      
- 
-        }
-      },
-      success: function (res) {
-        // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
-        res.eventChannel.emit('params', {
-          chooseList: chooseList
-        })
-      }
+    if (tableData[index].costPrice == 0) {
+      //成本价未修改 等于0  无法点击
+      return
+    }
+    tableData[index]['isFlgCostCheck'] = true
+    item.tableDataIndex = index
+    choosedGoodsList.push(item)
+    this.setData({
+      tableData: tableData,
+      choosedGoodsList: choosedGoodsList
     })
   },
-  onShow(){
-    this.searchData()
-  },
+
   /**
-  * @desc : 选择数据源
-  * @date : 2024/2/1 15:49
-  * @author : 于继渤
-  */
-  chooseData(e) {
-    let formData = JSON.parse(this.data.formData)
-    let code = e.detail.code
-    let data = e.detail.data.data
-    if (code == "staffId") { //员工
-      formData.staffId = data.id
-      formData.staffName = data.name
-    }
-    if (code == "orgId") { //部门
-      formData.orgId = data.id
-      formData.orgName = data.name
-    }
-    if (code == "intoType") { //部门
-      formData.intoType = data.name
+   * @desc : 列表成本输入
+   * @date : 2024/7/2 15:49
+   * @author : 于继渤
+   */
+  changeNumberTableBlur(e) {
+    console.log(e)
+    let inputValue = e.detail.value ? Number(e.detail.value) : 0
+    let index = e.currentTarget.dataset.index
+    let tableData = this.data.tableData
+    tableData[index].costPrice = inputValue
+    if (tableData[index].itemList && tableData[index].itemList.length > 0) {
+      tableData[index].itemList.forEach(res => {
+        res.costPrice = inputValue
+        res.costAmt = Number(res.intoQty * res.costPrice)
+      })
     }
     this.setData({
-      formData: JSON.stringify(formData)
+      tableData: tableData
     })
   },
   /**
-    * @desc : 查询
-    * @date : 2024/2/1 15:49
-    * @author : 于继渤
-    */
-  doSearch() {
-    let formData = JSON.parse(this.data.formData)
-    if (!formData.intoType) {
-      util.showToast('请输入/选择入库类型');
-      return
+   * @desc : 已选入库成本输入
+   * @date : 2024/7/2 15:49
+   * @author : 于继渤
+   */
+  changeNumberBlur(e) {
+    let inputValue = e.detail.value ? Number(e.detail.value) : 0
+    let index = e.currentTarget.dataset.index
+    let choosedGoodsList = this.data.choosedGoodsList
+    choosedGoodsList[index].costPrice = inputValue
+    if (choosedGoodsList[index].itemList && choosedGoodsList[index].itemList.length > 0) {
+      choosedGoodsList[index].itemList.forEach(res => {
+        res.costPrice = inputValue
+        res.costAmt = Number(res.intoQty * res.costPrice)
+      })
     }
     this.setData({
-      btnFormData: JSON.stringify({ flag: false }),
-      showSearch: false
+      choosedGoodsList: choosedGoodsList
     })
-    // 重新查询
-    this.searchData()
   },
+
+
+
   /**
-    * @desc : 重置
-    * @date : 2024/2/1 15:49
-    * @author : 于继渤
-    */
-  resetting() {
+   * @desc : 左侧分类切换
+   * @author : 于继渤
+   * @date : 2024/1/23 9:16
+   */
+  changeSidebar(e) {
+    let index = e.detail
+    let typeList = this.data.typeList
     this.setData({
-      formData: null
+      brandId: typeList[index].brandId
     })
+    this.searchData()
+  },
+  /**
+   * @desc : 查询
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  doSearch() {
+    this.searchData()
   },
 
   /**
-    * @desc : 设置查询参数
-    * @date : 2024年3月8日
-    * @author : 于继渤
-    */
+   * @desc : 设置查询参数
+   * @author : 于继渤
+   * @date : 2024/1/23 9:16
+   */
   setSearchParams(params) {
-    if(params.intoDateStart.indexOf('/') != -1){
-      params.intoDateStart =  params.intoDateStart.replace(/\//g, '-')
-      params.intoDateEnd =  params.intoDateEnd.replace(/\//g, '-')
-    }
-    return params;
+    let formData = JSON.parse(this.data.formData)
+    params.intoDateStart = formData.intoDateStart ? formData.intoDateStart : null
+    params.intoDateEnd = formData.intoDateEnd ? formData.intoDateEnd : null
+    params.brandId = this.data.brandId ? this.data.brandId : null
+    return params
   },
   /**
-   * @desc : 加载数据
+   * @desc : 查询
+   * @date : 2024/2/1 15:49
    * @author : 于继渤
-   * @date : 2024/1/23 9:16
    */
   getData(params) {
+    return this.excute(this.data.inboundItemService, this.data.inboundItemService.selectCostCheckList, params);
+  },
 
-    return this.excute(this.data.service, this.data.service.selectCostCheck, params);
+  /**
+   * @desc : 处理返回数据
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  handleSearchData(tableData) {
+    console.log('处理返回数据', tableData)
+    if (tableData && tableData.length > 0) {
+      tableData.forEach(res => {
+        //处理具体明细
+        if (res.itemList) {
+          res.itemList = JSON.parse(res.itemList.value)
+        }
+
+        if (res.skuImages && res.skuImages.length > 0) {
+          res.skuImages.forEach(item => {
+            item.url = config.image_url + item.path
+          });
+          res.imagesUrl = res.skuImages[0].url
+        }
+      })
+
+      this.setData({
+        tableData: tableData
+      })
+    }
+  },
+
+
+
+  /**
+   * @desc : 获取品牌
+   * @date : 2024/2/1 15:49
+   * @author : 姜永辉
+   */
+  getGoodsBrandNoPage() {
+    return this.excute(this.data.commonService, this.data.commonService.getGoodsBrandNoPage, {}).then(res => {
+      this.setData({
+        typeList: this.data.typeList.concat(res.data.data)
+      })
+    })
   },
 
 
+  /**
+   * @desc : 顶部切换
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  changeTag(e) {
+    this.setData({
+      active: e.detail.index
+    })
+  },
+  selectedProduct(e) {
+    this.setData({
+      active: e.currentTarget.dataset.active
+    })
+  },
+
+
+
+  /**
+   * @desc : 设置保存参数
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  setParams(params) {
+    params = []
+    let choosedGoodsList = this.data.choosedGoodsList
+    if (choosedGoodsList.length == 0) {
+      // 是否弹出询问框
+      Dialog.alert({
+        message: '至少选择一条数据',
+      }).then(() => {
+      }).catch(() => {
+      })
+      return
+    }
+    //设置参数
+    let saveList = []
+    choosedGoodsList.forEach(res => {
+      if (res.itemList && res.itemList.length > 0) {
+        res.itemList.forEach(it => {
+          saveList.push(it)
+        })
+      }
+    })
+    params = saveList
+    return params
+  },
+  /**
+   * @desc : 保存数据服务
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  saveData() {
+    return this.excute(this.data.inboundItemService, this.data.inboundItemService.costCheckOk, this.data.params);
+  },
+
+  /**
+ * @desc : 处理保存后续事件
+ * @date : 2024/2/1 15:49
+ * @author : 于继渤
+ */
+  handleSaveData() {
+    //清空数据
+    this.setData({
+      choosedGoodsList: []
+    })
+    this.searchData()
+  },
+  /**
+   * @desc : 初始化
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  onLoad() {
+    this.getGoodsBrandNoPage()
+    let _this = this;
+    wx.getSystemInfo({
+      success: function (res) {
+        _this.setData({
+          gradeCode: app.globalData.company.gradeCode,
+          windowHeight: res.windowHeight,
+          windowWidth: res.windowWidth
+        })
+      }
+    })
+  },
 })

+ 4 - 2
package-inventory/pages/cost-check/cost-check.json

@@ -1,4 +1,6 @@
 {
-    "usingComponents": {},
-    "navigationBarTitleText":"成本核对"
+  "usingComponents": {},
+  "navigationBarTitleText":"成本补录",
+  "navigationStyle": "custom",
+  "backgroundColor": "#1B365D"
 }

+ 132 - 31
package-inventory/pages/cost-check/cost-check.wxml

@@ -1,51 +1,152 @@
-<!-- 前台导入wxmlUtil.wxs -->
+<wxs src='/utils/numberFormat.wxs' module="numberFormat"></wxs>
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
-<loading wx:if="{{loading}}"></loading>
-<van-sticky wx:if="{{!showSearch}}" scroll-top="0" id="sticky">
-  <!-- 查询条件 -->
-  <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['inOrderNo','skuName','skuModel'])}}">
-  </dk-dropdown-menu>
-</van-sticky>
-
+<loading wx:if="{{loading}}" loadingName="加载中" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
 
-<!-- 列表区 -->
-<dk-list wx:if="{{!showSearch}}" statusImageFlag="{{true}}" statusImageFlagValue="flgCostCheck" statusImage="{{statusImage}}" list="{{tableData}}" detailReportFlag="{{true}}" titleImageFlag="{{false}}" flgPoint="{{false}}" chooseFlag="{{true}}" bind:choose="listChoose" title="intoNo" subTitle="intoDate" status="intoStatusName" buttonList="{{popbuttonList}}" content="{{content}}" contentCol="flgCostCheckName" contentObj="{{contentObjList}}"></dk-list>
+<van-dialog id="van-dialog" />
+<van-sticky offset-top="{{ 0 }}">
+  <dk-navbar titleFontColor="#000000" navbarTitle="成本补录" bind:clickBack="onClickLeft" operateShow="{{false}}" bind:getNavbarHeight="getNavbarHeight" />
 
+  <view style="display: flex;">
+    <view style="width: 85%;">
+      <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['skuName','skuModel'])}}">
+      </dk-dropdown-menu>
+    </view>
+    <view class="scan-class" bind:tap="openCreatetime">
 
+      <view style="font-size:30rpx;">{{dateDefault.text}}</view>
+      <view style="display: flex;align-items: center;margin-left: 14rpx;">
+        <van-icon color="#1B365D" size="12px" name="arrow-down" />
+      </view>
+    </view>
+  </view>
+  <div class="scrolling-text" bind:tap="openTitle">
+    <span>{{topTitle}}</span>
+  </div>
+  <van-dialog id="van-dialog" />
 
+  <view style="display: flex;margin-left: 24rpx;margin-right: 24rpx;margin-top: 10rpx;">
+    <view bind:tap="selectedProduct" data-active="{{0}}" class="{{ active == 0 ?'selected-product selected-product-color-01' : 'selected-product selected-product-color-02'}}">
+      商品列表
+    </view>
+    <view bind:tap="selectedProduct" data-active="{{1}}" class="{{ active == 0 ? 'selected-product selected-product-color-02' : 'selected-product selected-product-color-01'}}" style="position: relative;">
+      <view>补录商品</view>
+      <view wx:if="{{choosedGoodsList.length > 0}}" style="position: absolute;top:16rpx;right: 40rpx;">
+        <view class="icon">{{choosedGoodsList.length}}</view>
+      </view>
+    </view>
+  </view>
+</van-sticky>
 
-<!-- 显示没用更多 -->
-<van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">{{$t['noMore']}}~</van-divider>
 
-<view style="position: fixed;bottom: 230rpx;right: 30rpx;">
-  <view bind:tap="export" class="btn-add-class">
-    <van-icon name="share" color="#FFFFFF" size="60rpx" />
-  </view>
-</view>
+<view style="height:100%;background: #F8F9FD ;">
+  <scroll-view scroll-y='{{true}}' bindscrolltolower='scrollToLower' lower-threshold='100' wx:if="{{active == 0}}" 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">
+          <view>
+            <van-image radius="15rpx" custom-class="goods-item-image" fit="fill" src="{{item.imagesUrl}}" />
+          </view>
+          <view style="margin-left: 26rpx;width: 100%;margin-top: 10rpx;position: relative;">
+            <view>
+              <dk-title title="{{item.skuModel}}"></dk-title>
+            </view>
+            <view style="display: flex;padding-top: 10rpx;">
+              <dk-text fontSize="24rpx" value="{{item.skuName}}" data-item="{{item}}" bind:tap="openAddItemInfo"></dk-text>
+            </view>
+            <view style="position:absolute;bottom: -5px;width: 100%;">
+              <view style="display: flex;align-items: center;">
+                <view style="font-size: 12px;color:#002340;padding-right: 10rpx;width: 15%;">
+                  成本
+                </view>
+                <view style="width: 55%;">
+                  <!-- <dk-cell height="46rpx" spaceWidth="1rpx" left="0" fontSize="14" contentColor="#FF7B1A" fontWeight="700" title="" content="{{item.costPrice}}"></dk-cell> -->
 
+                  <dk-number-input sign="¥" digits="{{2}}" fontSize="14" left="0rpx"  data-item="{{item}}" data-index="{{index}}"  center="left" readonly="{{false}}" titleValue="" inputColor="#FF7B1A" titleFontWeight="normal" inputValue="{{item.costPrice}}" bind:triggerBindValue="changeNumberTableBlur" ></dk-number-input>
+                </view>
+                <view>
+                  <view bind:tap="addItem" data-item="{{item}}" data-index="{{index}}" style="display: flex;align-items: center;border-radius: 16rpx;padding:10rpx;color: #fff;padding-left: 20rpx;padding-right: 20rpx;{{item.isFlgCostCheck ? 'background-color: #95A8CB' : 'background-color: #3E69F6;'}}">
+                    <view style="font-size: 12px;">补录</view>
+                  </view>
+                </view>
 
-<!--  保存 -->
-<dk-save-button wx:if="{{!showSearch}}" model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" contentLineFlag="{{true}}" btnRightFlag="{{false}}" bind:change="allChoose" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="toAdd"></dk-save-button>
+              </view>
 
-<view wx:if="{{ showSearch }}" overlay="{{false}}" style="border: 1px solid #000000;border-radius: 16rpx;box-shadow: 0px 10px 20px 0px #E1E5EE99;background: #95A8CB1A;margin:20rpx;margin-top:35%;">
-  <view style="padding:10rpx;">
-    <dk-form id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" contentObj="{{contentObj}}" model:value="{{formData}}" transparentStyle="{{true}}" class="" bind:chooseData="chooseData">
-    </dk-form>
-    <view style="display: flex;width: 90%;margin: 20rpx;">
-      <view style="width: 50%;"></view>
-      <view style="display: flex;width: 50%;justify-content: center;">
-        <view>
-          <van-button plain color="#00A7B5" block custom-style="border-radius: 20rpx;background: #95A8CB1A;width:160rpx;height:60rpx" bind:tap="resetting" type="info">重置</van-button>
-        </view>
-        <view style="margin-left: 15px;">
-          <van-button plain color="#00A7B5" block custom-style="border-radius: 20rpx;background: #95A8CB1A;width:160rpx;height:60rpx" bind:tap="doSearch" type="info">查询</van-button>
+            </view>
+          </view>
         </view>
       </view>
+    </van-cell-group>
+
+    <view wx:if="{{tableData.length!=0}}" style="height:240rpx;"></view>
+    <view wx:if="{{tableData.length==0}}" style="width:100%;">
+      <van-empty description="暂无商品" border="{{ false }}" />
     </view>
+  </scroll-view>
+
+
+
+</view>
+
+<!--已选列表-->
+<view wx:if="{{active == 1}}" class="goods-selected-class">
+  <scroll-view scroll-y='{{true}}' bindscrolltolower='scrollToLower' lower-threshold='100' wx:if="{{active == 1}}" class="goods-class-1" style="height:calc({{windowHeight+'px'}} - 295rpx);overflow: scroll;">
+    <van-cell-group custom-class="width-80">
+      <van-cell wx:if="{{choosedGoodsList.length==0}}" border="{{ false }}">
+        <van-empty description="暂无商品" />
+      </van-cell>
+      <van-cell custom-class="goods-cell-class-1" wx:for="{{choosedGoodsList}}" wx:for-index="index" wx:key="index" data-index="{{index}}" border="{{ false }}">
+        <van-swipe-cell right-width="{{ 65 }}" data-index="{{index}}" async-close bind:close="delChoosedGoodsItem">
+          <view class="goods-item-class" data-item="{{item}}" data-index="{{index}}" catch:tap="openChooseItemInfo">
+            <view>
+              <van-image radius="15rpx" custom-class="goods-item-image" fit="fill" src="{{item.imagesUrl }}" />
+            </view>
+            <view style="margin-left: 26rpx;width: 100%;position: relative;">
+              <view data-item="{{item}}" data-index="{{index}}">
+                <view style="display: flex;">
+                  <dk-title titleTag="{{ }}" title="{{item.skuModel}}"></dk-title>
+                </view>
+                <view style="display: flex; ">
+                  <dk-text value="{{item.skuName}}"></dk-text>
+                </view>
+                <view style="position:absolute;bottom: -5px;width: 100%;">
+                  <view style="display: flex;align-items: center;">
+                    <view style="font-size: 12px;color:#002340;width: 25%;">
+                      入库成本
+                    </view>
+                    <view style="width: 75%;">
+                      <dk-number-input sign="¥" digits="{{2}}" fontSize="14" left="0rpx"  data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" center="left" readonly="{{false}}" titleValue="" inputColor="#FF7B1A" titleFontWeight="normal" inputValue="{{item.costPrice}}" bind:triggerBindValue="changeNumberBlur" ></dk-number-input>
+                    </view>
+                  </view>
+                </view>
+              </view>
+
+            </view>
+          </view>
+          <view slot="right">删除</view>
+        </van-swipe-cell>
+      </van-cell>
 
+    </van-cell-group>
+    <view style="height:220rpx;"></view>
+  </scroll-view>
 
 
+</view>
+
+<van-sidebar activeKey="{{sideKey}}" bindchange="changeSidebar" custom-class="{{active == 0 ? 'left-class' : 'right-class'}}">
+  <view wx:if="{{active != 1}}" class="{{active == 0 && controlFlags.choosewhFlag?'addsidebar':''}}" style=" height:calc({{windowHeight+'px'}} - {{active == 1 ? '270rpx' :'400rpx' }});overflow: scroll;">
+    <van-sidebar-item class="sidebar" wx:key="index" custom-class="{{sideKey - 1 == index? 'sidebar-item-before': (sideKey + 1 == index?'sidebar-item-next':'sidebar-item')}}" title="{{item.brandName}}" data-id="{{item.brandId}}" wx:for="{{typeList}}" />
   </view>
+</van-sidebar>
+
+
 
 
+<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonList}}" contentList="{{contentList}}" bind:open="save"></dk-save-button>
+
+
+<view wx:if="{{createtimeShow}}" style="position: absolute;top: 240rpx;z-index: 99;width: 100%;background-color: rgb(0, 0, 0,0.7);height: 82%;overflow: hidden;">
+  <view style="background-color: #fff;border-radius: 0px 0px 20rpx 20rpx;padding-bottom: 20rpx;">
+    <dk-dropdown-date blankFlag="{{false}}" initFlag="{{false}}" data-item="{{item}}" defaultValue="{{3}}" bind:dateCommit='dateCommit' code="createtime"></dk-dropdown-date>
+  </view>
 </view>

+ 226 - 2
package-inventory/pages/cost-check/cost-check.wxss

@@ -1,3 +1,227 @@
-.van-cell{
-  background: #F4F6FA !important;
+page {
+  background: radial-gradient(218.47% 47.92% at 62.73% 2.94%, rgba(173, 198, 255, 0.93) 11.18%, rgba(173, 198, 255, 0) 49.37%);
+  /* height: 100%; */
+} 
+ .addtop{
+  padding-top: 9px;
+ }
+ .addsidebar{
+  padding-top: 49px;
+ }
+.main-good-class {
+  background-color: #FFFFFF;
+  border-radius: 0px 16px 0px 0px;
+}
+
+.search-class {
+  color: #ADB7C9;
+}
+
+.van-search {
+  background-color: transparent !important;
+}
+
+.van-nav-bar {
+  background-color: transparent !important;
+  color: #191919 !important;
+}
+
+.van-search__content {
+  background: #F8F9FD;
+  border: 1px solid #ffffff;
+  border-radius: 15rpx !important;
+}
+
+.van-sidebar-item--selected {
+  border-color: #3E69F6 !important;
+}
+
+.icon {
+  width: 40rpx;
+  height: 40rpx;
+  background-color: red;
+  border-radius: 50%;
+  box-sizing: border-box;
+  color: white;
+}
+
+.van-empty {
+  border-bottom: 0px solid #ffffff !important;
+}
+
+.van-tab-active-left {
+  background-color: #FFFFFF !important;
+  color: #002340 !important;
+  font-size: 28rpx;
+  border-radius: 8px;
+
+}
+
+.left-class {
+  color: #3E69F6 !important;
+  position: fixed;
+  top: 346rpx;
+  width: 130rpx !important;
+  z-index: 1 !important;
+  border-radius: 16rpx !important;
+}
+
+.sidebar .van-sidebar-item--selected {
+  color: #333333 !important;
+  font-weight: 600 !important;
+}
+
+.sidebar-item {
+  padding: 30rpx 25rpx 20rpx 35rpx !important;
+  font-size: 13px !important;
+  color: #666666 !important;
+  font-weight: 600;
+}
+
+.goods-class {
+  position: fixed;
+  left: 20rpx;
+  /* top: 324rpx; */
+  background-color: #fff;
+  border-radius: 0rpx 16rpx 0rpx 0rpx;
+  border-radius: 16px 0px 0px 0px;
+}
+.goods-class-1 {
+  position: fixed;
+  left: 0rpx;
+  /* top: 324rpx; */
+  background-color: #fff;
+  border-radius: 0rpx 16rpx 0rpx 0rpx;
+  border-radius: 16px 0px 0px 0px;
+}
+.tags-class {
+  margin-top: 20rpx;
+}
+
+.cell-width {
+  width: 85%;
+  margin-right: 10rpx;
+}
+
+.goods-cell-class {
+  margin: 32rpx 32rpx 32rpx 32rpx;
+  padding: 0 20rpx 15rpx 20rpx !important;
+  box-shadow: 0px 10px 20px 0px #0000000D;
+  border-radius: 16rpx;
+}
+.goods-cell-class-1 {
+  /* margin: 32rpx 32rpx 32rpx 32rpx; */
+  width: 100%;
+  margin: 32rpx;
+  padding: 0 20rpx 15rpx 20rpx !important;
+  box-shadow: 0px 10px 20px 0px #0000000D;
+  border-radius: 16rpx;
+}
+/**产品条目的图片**/
+.goods-item-image {
+  width: 150rpx;
+  height: 150rpx;
+  left: 6rpx;
+  top: calc((100% - 166rpx)/2);
+}
+
+/**产品条目的样式**/
+.goods-item-class {
+  display: flex;
+  text-align: left;
+  padding-top: 20rpx;
+}
+
+/* 图标 */
+.van-icon-class {
+  display: flex;
+  align-items: flex-end;
+}
+
+
+
+.selected-product {
+  color: #191919;
+  font-size: 28rpx;
+  padding: 18rpx 52rpx 18rpx 52rpx;
+  border-radius: 8px 8px 0px 0px;
+  width: 50%;
+  text-align: center;
+}
+
+.selected-product-color-01 {
+  background-color: #FFFFFF;
+  color: #333333;
+  font-weight: 600;
+
+}
+
+.selected-product-color-02 {
+  background-color: #FFFFFF4D;
+  color: #333333;
+}
+
+.goods-selected-class {
+  /* padding-top: 98rpx; */
+  /* height: 100%; */
+  background-color: #fff;
+  border-radius: 0px 16px 0px 0px;
+}
+.van-icon-arrow-left{
+  color: #000 !important;
+}
+.scan-image {
+  width: 30rpx;
+  height: 30rpx;
+  color: #fff;
+}
+.scan-class{
+  width: 24%;
+  display: flex;
+  align-items: center;
+  /* margin-right: 12rpx; */
+  color: #1B365D;
+}
+.scan-background-class{
+  display: flex;
+  align-items: center;
+  background-color: #3E69F6;
+  border-radius: 16rpx;
+  padding:10rpx;
+  padding-left: 20rpx;
+  padding-right: 20rpx;
+  color: #fff;
+}
+.width-80 {
+  width: 91%;
+  /* margin: 20rpx; */
+}
+
+.van-nav-bar__title {
+  color: #002340 !important;
+  font-size: 15px !important;
+}
+
+.scrolling-text {
+  overflow: hidden;
+  white-space: nowrap;
+  width: 100%;
+  background-color:#FCD23F;
+  font-size: 12px;
+  padding:10rpx;
+}
+ 
+.scrolling-text span {
+  display: inline-block;
+  padding-left: 100%;
+  animation: marquee 17s linear infinite; /* 调整动画时长和效果 */
+}
+ 
+@keyframes marquee {
+  0% {
+    transform: translateX(0);
+  }
+  100% {
+    transform: translateX(-100%);
+  }
 }