| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311 |
- <wxs module="m1">
- var displayPrice = function (item) {
- var numberFormat = require("/utils/numberFormat.wxs");
- // 如果有促销显示标准售价,如果正常品显示标价
- // if (item.promotionType == 0) {
- //优先显示促销价
- if (item.pricePromotion) {
- return '¥' + numberFormat.toThousandCents(item.pricePromotion)
- } else {
- return '¥' + numberFormat.toThousandCents(item.priceStandard)
- }
- // } else {
- // return '¥' + numberFormat.toThousandCents(item.pricePromotion)
- // }
- // return ''
- }
- module.exports.displayPrice = displayPrice
- </wxs>
- <wxs src='/utils/numberFormat.wxs' module="numberFormat"></wxs>
- <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
- <loading wx:if="{{loading}}" loadingName="加载中" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
- <van-dialog id="van-dialog" />
- <van-sticky offset-top="{{ 0 }}">
- <van-nav-bar title="选择商品" left-text="" left-arrow="{{true}}" bind:click-left="onClickLeft" />
- <view style="display: flex;">
- <view style="width: 85%;">
- <van-search border="{{false}}" bind:search="doSearch" custom-class="search-class" bind:change="onSearchText" model:value="{{ searchText }}" placeholder="输入商品名/商品编码/唯一编码" use-right-icon-slot="{{true}}" placeholder-style="color:#95A8CB">
- </van-search>
- </view>
- <view class="scan-class" style="width: 15%;display: flex;align-items: center;">
- <image class="scan-image" fit="fill" src="{{imageUrl+'scan_image.png'}}"></image>
- </view>
- </view>
- <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'}}">
- 已选商品
- </view>
- </view>
- </van-sticky>
- <!-- <van-tabs type="card" custom-class="tags-class" tab-active-class="{{active==0?'van-tab-active-left':'van-tab-active-right'}}" animated="{{true}}" swipeable="{{true}}" active="{{ active }}" dot bind:change="changeTag">
- <van-tab title="商品列表"></van-tab>
- <van-tab title="已选商品" info="{{choosedGoodsList.length==0?'':choosedGoodsList.length}}"></van-tab>
- </van-tabs> -->
- <view style="height:100%;background: #F8F9FD ;" class="{{ controlFlags.choosewhFlag?'addtop':''}}">
- <!-- 商品编码的列表 走sku-->
- <scroll-view scroll-y='{{true}}' bindscrolltolower='scrollToLower' lower-threshold='100' wx:if="{{active == 0 &&( billType == 'pur' || billType == 'sale' || billType == 'saleOut' )}}" 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.skuImages? item.skuImages.path : '' }}" />
- </view>
- <view style="margin-left: 26rpx;width: 100%; ">
- <!-- 标题 -->
- <view>
- <dk-text fontSize="24rpx" value="{{item.skuCode}}"></dk-text>
- <!-- <dk-title fontSize="28rpx" titleTag="{{item.brandName}}" title="{{item.skuCode}}"></dk-title> -->
- </view>
- <!-- 描述 -->
- <view style="display: flex; ">
- <dk-text fontSize="24rpx" value="{{item.skuName}}"></dk-text>
- </view>
- <view style="display: flex;align-items: flex-end;">
- <!-- 标准价/标价-->
- <view style="width: 85%;">
- <view wx:if="{{billType == 'pur'}}">
- <!-- <view style="color: #002340A6;font-size:22rpx;font-weight: 500;">采购价</view> -->
- <dk-cell height="46rpx" spaceWidth="1rpx" left="0" fontSize="14" contentColor="#FF7B1A" fontWeight="700" title="" content="{{item.pricePurchase?item.pricePurchase:0}}"></dk-cell>
- </view>
- <view wx:else style="margin-top: 30rpx;">
- <!-- <view style="color: #002340A6;font-size:22rpx;font-weight: 500;margin-top: 18rpx;">标价</view> -->
- <dk-cell height="46rpx" spaceWidth="1rpx" left="0" fontSize="14" contentColor="#FF7B1A" fontWeight="700" title="" content="{{item.priceStandard?item.priceStandard:0}}"></dk-cell>
- </view>
- </view>
- <!-- 加号 -->
- <view class="van-icon-class">
- <van-icon data-item="{{item}}" bind:tap="openAddItemInfo" size="25px" name="add-square" style="color:#3E69F6;border-radius: 8px !important;" />
- </view>
- </view>
- </view>
- </view>
- </view>
- <view wx:if="{{tableData.length!=0}}" style="height:180rpx;"></view>
- <van-cell wx:if="{{tableData.length==0}}" border="{{ false }}">
- <view style="width:100%;">
- <van-empty description="暂无商品" />
- </view>
- </van-cell>
- </van-cell-group>
- </scroll-view>
- <!--出库商品 列表 走库存-->
- <view wx:if="{{active == 0 && (billType == 'out' || billType =='purReturn')}}" style="height:calc({{windowHeight+'px'}} - 295rpx);overflow: scroll;" >
- <scroll-view scroll-y='{{true}}' bindscrolltolower='scrollToLower' lower-threshold='100' >
- <view wx:for="{{tableData}}" wx:key="index" catch:tap="openAddItemInfo" data-item="{{item}}" class="main-class" style="width: 75%;margin-left: 166rpx;">
- <view class="main-foot" style="border-radius:15rpx;">
- <view>
- <view class="table-content-row">
- <view style="display:flex;width:100%;">
- <view data-item="{{item}}" style="display:flex;font-size: 15px;">
- <dk-text style="font-size:30rpx;" fontWeight="nomal" value="{{item.skuCode}}"></dk-text>
- </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.skuName}}"></dk-text>
- </view>
- <view class="table-content-class">
- {{item.skuName?item.skuName:''}}
- </view>
- </view>
- </view>
- </view>
- <!-- 库区 -->
- <view class="table-content-row">
- <view style="display: flex;">
- <view class="table-content-row-font">
- <dk-text layoutFlag="{{true}}" fontSize="14px" color="#95A8CB" fontWeight="nomal" value="库区" copyValue="{{item.whName}}"></dk-text>
- </view>
- <view class="table-content-class">
- {{item.whName?item.whName:''}}
- </view>
- </view>
- </view>
- <!-- 库区色号 -->
- <view class="table-content-row">
- <view style="display: flex; justify-content:space-between;">
- <view style="display: flex;">
- <view class="table-content-row-font">
- <dk-text layoutFlag="{{true}}" fontSize="14px" color="#95A8CB" fontWeight="nomal" value="色号" copyValue="{{item.nonStdCode}}"></dk-text>
- </view>
- <view class="table-content-class">
- {{item.nonStdCode?item.nonStdCode:''}}
- </view>
- </view>
- <!-- 加号 -->
- <view class="van-icon-class">
- <van-icon size="25px" name="add" style="color:#1B365D" />
- </view>
- </view>
- </view>
- <!-- 分割线 -->
- <dk-divider marginTop="20rpx" marginBottom="0rpx"></dk-divider>
- <!-- 下半部分 -->
- <view class="table-content-row">
- <view style="display: flex;justify-content:space-between">
- <view style="display: flex;">
- <view class="table-content-row-font">
- <dk-text layoutFlag="{{true}}" fontSize="14px" color="#95A8CB" fontWeight="nomal" value="库存量"></dk-text>
- </view>
- <view style="font-size: 13px;color: #CAA977;">
- {{item.invQty}}
- </view>
- </view>
- <view style="display: flex;">
- <view class="table-content-row-font">
- <dk-text layoutFlag="{{true}}" fontSize="14px" color="#95A8CB" fontWeight="nomal" value="可售量"></dk-text>
- </view>
- <view style="font-size: 13px;color: #CAA977;">
- {{item.usableQty }}
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </scroll-view>
- </view>
- <!--已选列表-->
- <view wx:if="{{active == 1}}" class="goods-selected-class">
- <view class="goods-class" style="height:calc({{windowHeight+'px'}} - 295rpx);overflow: scroll;"></view>
- <van-cell-group style="display: flex;justify-content: flex-end;width: calc({{windowWidth+'px'}} - 20rpx);" 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" wx:for="{{choosedGoodsList}}" 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">
- <view>
- <van-image radius="15rpx" custom-class="goods-item-image" fit="fill" src="{{item.skuImages? item.skuImages.path : '' }}" />
- </view>
- <view style="margin-left: 26rpx;width: 100%;">
- <view data-item="{{item}}" data-index="{{index}}" bind:tap="openChoosedItemInfo">
- <!-- 标题 -->
- <view style="display: flex;">
- <dk-title titleTag="{{item.brandName}}" title="{{item.skuCode}}"></dk-title>
- </view>
- <!-- 描述 -->
- <view style="display: flex; ">
- <dk-text value="{{item.skuName}}"></dk-text>
- </view>
- <view style="display: flex;" wx:if="{{billType == 'pur'}}">
- <!-- 标准价/标价-->
- <view style="width: 85%;">
- <dk-cell height="46rpx" spaceWidth="1rpx" left="0" fontSize="13" contentColor="#CAA977" fontWeight="bold" title=" " content="{{item.pricePurchase?item.pricePurchase:0}}"></dk-cell>
- </view>
- <view style="text-align: right;width: 5%;">
- <van-icon name="arrow" style="font-size:3.5vw;" />
- </view>
- </view>
- <view style="display: flex;" wx:if="{{billType == 'sale'}}">
- <view class="table-content-row-font">
- <dk-text fontSize="14px" color="#95A8CB" fontWeight="nomal" value="库区" copyValue="{{item.whName}}"></dk-text>
- </view>
- <view class="table-content-class">
- {{item.whName?item.whName:''}}
- </view>
- </view>
- <view style="display: flex;" wx:if="{{billType == 'sale'}}">
- <view class="table-content-row-font">
- <dk-text fontSize="14px" color="#95A8CB" fontWeight="nomal" value="商品批次号" copyValue="{{item.nonStdCode}}"></dk-text>
- </view>
- <view class="table-content-class">
- {{item.nonStdCode?item.nonStdCode:''}}
- </view>
- </view>
- </view>
- <view style="display:flex">
- <!-- <view style="padding-top: 5rpx;">
- <dk-text value="数量:"></dk-text>
-
- </view> -->
- <van-stepper value="{{item.itemQty}}" data-index="{{index}}" min="0" integer="{{true}}" max="999999999" bind:change="changeAllreadyChooseQuantity" />
- </view>
- </view>
- </view>
- <view slot="right">删除</view>
- </van-swipe-cell>
- </van-cell>
- </van-cell-group>
- <view style="height:220rpx;"></view>
- </view>
- </view>
- <view wx:if="{{active == 0 && controlFlags.choosewhFlag}}" class="screen-class">
- <van-dropdown-menu active-color="#1B365D" style=" width: calc(100% ) !important; ">
- <!-- 库区 -->
- <van-dropdown-item id="statusItemWareHouse" disabled="{{controlFlags.choosewhReadonly}}" title="{{ form.whName ? form.whName:'仓库' }}" bind:open="dropdowncommit">
- </van-dropdown-item>
- <!-- 可售量排序 -->
- <van-dropdown-item title="{{ orderBy.text?orderBy.text:'可售量升序' }}" value="{{value}}" options="{{ orderBy }}" bind:change="onSwitchChange">
- </van-dropdown-item>
- </van-dropdown-menu>
- </view>
- <van-sidebar activeKey="{{sideKey}}" bindchange="changeSidebar" custom-class="{{active == 0 ? 'left-class' : 'right-class'}}">
- <view wx:if="{{active != 1}}" class="{{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.catName}}" data-id="{{item.catId}}" wx:for="{{typeList}}" />
- </view>
- </van-sidebar>
- <dk-popup wx:if="{{ billType != 'sale' && billType != 'saleOut' }}" type="sale" descCol="skuModel"titleTagCol="shortName" titleCol="skuModel" priceCol="pricePromotion" value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjName}}" priceTitle="参考价:" priceCol="pricePurchase" contentObj="{{popContent}}" bind:commit="editItems">
- </dk-popup>
- <dk-popup wx:if="{{ billType == 'sale' }}" type="sale" titleTagCol="brandName" subCol="skuCode" descCol="skuModel" titleCol="skuName" priceTitle="标价:" priceCol="priceStandard" value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjName}}" contentObj="{{popContent}}" bind:commit="editItems">
- </dk-popup>
- <dk-popup wx:if="{{ billType == 'saleOut' }}" type="sale" titleTagCol="brandName" subCol="skuCode" descCol="skuModel" titleCol="skuName" priceTitle="标价:" priceCol="priceStandard" value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjName}}" contentObj="{{popContent}}" bind:commit="editItems" popupTopObj="{{popupTopObj}}">
- </dk-popup>
- <!-- <dk-save-button cssType="{{ (billType == 'sale' || billType == 'saleOut' )? 'shopping':''}}" model:value="{{btnFormData}}" btnAutoWidthFlag="{{false}}" btnRightFlag="{{true}}" buttonList="{{buttonList}}" contentList="{{contentList}}" bind:open="submit"></dk-save-button> -->
- <dk-save-button cssType="sale" model:value="{{btnFormData}}" btnAutoWidthFlag="{{false}}" btnRightFlag="{{true}}" buttonList="{{buttonList}}" contentList="{{contentList}}" bind:open="submit"></dk-save-button>
- <!-- 仓库 -->
- <dk-single-dropdown-item show="{{whFlag}}" content="{{form.whName}}" id='warehouse' typeName='warehouse' bind:commit='mutiSearch' bind:close='muticlose'>
- </dk-single-dropdown-item>
|