|
|
@@ -1,89 +1,68 @@
|
|
|
+<wxs src='../../../utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
|
|
|
+
|
|
|
<!-- 弹窗 编辑/新建-->
|
|
|
<van-popup show="{{show}}" position="bottom" bind:close="onClosePopup" custom-class="dk-popup">
|
|
|
<view style="position:relative; top:280rpx;z-index: 1;background-color: transparent; height: 44rpx;"></view>
|
|
|
|
|
|
<!--标题-->
|
|
|
- <view class="special-topic">
|
|
|
+ <view class="special-topic" wx:if="{{type=='sale'}}">
|
|
|
<!-- 图片 -->
|
|
|
<view class="special-topic-content">
|
|
|
- <van-image radius="15rpx" custom-class="goods-pop-image" fit="fill" src="{{ form.iconThumPath }}"></van-image>
|
|
|
+ <van-image radius="15rpx" custom-class="goods-pop-image" fit="fill" src="{{ form[iconCol] }}"></van-image>
|
|
|
</view>
|
|
|
<view class="special-topic-title">
|
|
|
<!-- 标签 标题-->
|
|
|
- <dk-title titleTag="{{form.titleTag}}" title="{{form.title}}"></dk-title>
|
|
|
+ <dk-title titleTag="{{form[titleTagCol]}}" title="{{form[titleCol]}}"></dk-title>
|
|
|
<view style="padding-top: 10rpx;">
|
|
|
- <dk-text fontWeight="normal" value="{{form.desc}}"></dk-text>
|
|
|
+ <dk-text fontWeight="normal" value="{{form[descCol]}}"></dk-text>
|
|
|
</view>
|
|
|
<view style="display: flex;padding-top: 5rpx;">
|
|
|
<view class="price-pop-class">
|
|
|
- <dk-cell height="46rpx" spaceWidth="1rpx" left="0" fontSize="14" contentColor="#CAA977" fontWeight="bold" title="标价:" content="{{form.pricePromotion}}"></dk-cell>
|
|
|
+ <dk-cell height="46rpx" spaceWidth="1rpx" left="0" fontSize="14" contentColor="#CAA977" fontWeight="bold" title="{{priceTitle}}" content="{{form[priceCol]}}"></dk-cell>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view style="padding-right: 30rpx;float: right;">
|
|
|
- <dk-text fontWeight="normal" value="{{form.desc}}"></dk-text>
|
|
|
+ <dk-text fontWeight="normal" value="{{form[subCol]}}"></dk-text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
- <!--内容-->
|
|
|
+ <view class="special-basic-topic" wx:else>
|
|
|
+ <view class="special-basic-topic-title">{{title}}</view>
|
|
|
+ <view class="special-basic-topic-checkbox" wx:if="{{defaultFlagCol}}"><van-checkbox value="{{ form[defaultFlagCol] }}" bind:change="changeDefault" label-class="special-basic-topic-checkbox-label">{{defaultFlagTitle}}</van-checkbox></view>
|
|
|
+ </view>
|
|
|
<view class="pop-content-class">
|
|
|
- <van-cell-group border="{{ false }}">
|
|
|
-
|
|
|
- <!--销售价格-->
|
|
|
- <van-cell border="{{ false }}" title-width="410rpx">
|
|
|
- <view slot="title">
|
|
|
- 销售价格
|
|
|
- </view>
|
|
|
- <view Cell Slot="value">
|
|
|
- <dk-number-input center="right" data-key="priceSale" inputValue="{{currentSkuChoosedItem.priceSale}}" bind:triggerBindValue="changeSalesPriceField"></dk-number-input>
|
|
|
- </view>
|
|
|
- </van-cell>
|
|
|
- <van-cell border="{{ false }}" title-width="410rpx">
|
|
|
- <view slot="title">
|
|
|
- 销售金额
|
|
|
- </view>
|
|
|
- <view Cell Slot="value">
|
|
|
- <dk-number-input center="right" data-key="itemAmount" inputValue="{{currentSkuChoosedItem.itemAmount}}" bind:triggerBindValue="changeItemAmountField"></dk-number-input>
|
|
|
- </view>
|
|
|
- </van-cell>
|
|
|
-
|
|
|
- <!--正常品显示-->
|
|
|
- <van-cell wx:if="{{currentSkuChoosedItem.promotionType==0}}" border="{{ false }}" title-width="410rpx" disabled="{{currentSkuChoosedItem.flgGift}}">
|
|
|
- <view slot="title" style="color:#95A8CB">
|
|
|
- 标价折扣
|
|
|
+ <!--内容-->
|
|
|
+ <view wx:for="{{contentObj}}" wx:for-item="item" data-item="{{item}}" wx:key="index">
|
|
|
+ <!--文本框-->
|
|
|
+ <van-field wx:if="{{item.type=='str'}}" label-class="{{item.required?'red-label':'nomal-label' }}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" value="{{ form[item.code]}}" input-align="left" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" autosize border="{{ false }}" readonly="{{!!item.readonly}}" input-class="dk-cell-value-class" maxlength="{{item.maxlength?item.maxlength:50}}" right-icon="{{item.rightIcon}}" bind:change="changeField" errorMessage="{{item.errMsg}}">
|
|
|
+ </van-field>
|
|
|
+ <!--下拉-->
|
|
|
+ <van-field wx:if="{{item.type=='drop'}}" label-class="{{item.required?'red-label':'nomal-label' }}" data-name="{{item.name}}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" value="{{ form[item.name]}}" input-align="left" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" is-link catchtap="open" autosize border="{{ false }}" readonly="{{true}}" input-class="dk-cell-value-class" data-type='{{item.dropType}}' errorMessage="{{item.errMsg}}">
|
|
|
+ </van-field>
|
|
|
+ <!--选择框-->
|
|
|
+ <van-field wx:if="{{item.type=='checkbox'}}" input-width="200rpx" input-class="dk-cell-value-class" label-class="nomal-label" input-align="right" label="{{item.title?item.title:$t[item.code]}}" autosize border="{{ false }}" readonly="{{true}}" errorMessage="{{item.errMsg}}">
|
|
|
+ <view slot="end" style="text-align: right;padding-left: 10rpx;" data-item="{{item}}" data-index="{{index}}" data-value="{{form[item.code]}}" data-key="{{item.code}}" catchtap="changeCheckBox">
|
|
|
+ <van-checkbox shape="round" value="{{form[item.code]}}" />
|
|
|
</view>
|
|
|
- <dk-text color="#1B365D" fontSize="13px" fontWeight="nomal" value="{{(currentSkuChoosedItem.discountStandard || currentSkuChoosedItem.discountStandard ==0)?(currentSkuChoosedItem.discountStandard+ '%'):'' }}"></dk-text>
|
|
|
- </van-cell>
|
|
|
-
|
|
|
- <!--促销品显示-->
|
|
|
- <van-cell wx:if="{{currentSkuChoosedItem.promotionType !=0 }}" border="{{ false }}" title-width="410rpx">
|
|
|
- <view slot="title" style="color:#95A8CB">
|
|
|
- 标准售价折扣
|
|
|
- </view>
|
|
|
- <dk-text color="#1B365D" fontSize="13px" fontWeight="nomal" value="{{currentSkuChoosedItem.discountPromotion?(currentSkuChoosedItem.discountPromotion+ '%'):'' }}"></dk-text>
|
|
|
+ </van-field>
|
|
|
+ <!--数量step-->
|
|
|
+ <van-cell wx:if="{{item.type=='step'}}" border="{{ false }}" title="数量" title-class="{{item.required?'red-label':'nomal-label' }}">
|
|
|
+ <van-stepper value="{{form[item.code]}}" integer="{{true}}" data-index="{{index}}" min="0" max="{{item.max?item.max:999999999}}" bind:change="changeStep" />
|
|
|
</van-cell>
|
|
|
+ <!--数字类-->
|
|
|
+ <dk-number-input wx:if="{{item.type=='number'}}" fontSize="14" left="30rpx" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" center="left" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" errorMessage="{{item.errMsg}}" contentRight="true" titleValue="{{item.title?item.title:$t[item.code]}}" inputColor="#1B365D" titleFontWeight="bold" titleColor="{{item.required?'#E4002B':'#95A8CB'}}" inputValue="{{form[item.code]}}" bind:triggerBindValue="changeNumberField"></dk-number-input>
|
|
|
+ <!--备注-->
|
|
|
+ <van-field wx:if="{{item.type=='textarea'}}" type="textarea" label-class="{{item.required?'red-label':'nomal-label' }}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" value="{{ form[item.code]}}" input-align="left" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" autosize border="{{ false }}" readonly="{{!!item.readonly}}" input-class="dk-cell-value-class" maxlength="{{item.maxlength?item.maxlength:500}}" right-icon="{{item.rightIcon}}" bind:change="changeField" errorMessage="{{item.errMsg}}">
|
|
|
+ </van-field>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
|
|
|
- <!--赠品标识-->
|
|
|
- <van-cell title-class="nomal-label" title="赠品标识" border="{{ false }}" value-class="value-class">
|
|
|
- <van-checkbox shape="round" value="{{ currentSkuChoosedItem.flgGift}}" data-index="{{index}}" data-key="flgGift" bind:change="changeSkuFlgGift" />
|
|
|
- </van-cell>
|
|
|
- <view style="height: 100rpx;"></view>
|
|
|
+ <view style="height: 30rpx;background-color: #FFFFFF;"></view>
|
|
|
|
|
|
- <view style="text-align: center;">
|
|
|
- <van-button round size="large" color="#1B365D" custom-style="height:88rpx;width:640rpx;" type="info" data-item="{{currentSkuChoosedItem}}" size="small" bindtap="updateCurrentSkuChoosedItem">确定</van-button>
|
|
|
- </view>
|
|
|
- </van-cell-group>
|
|
|
+ <view style="text-align: center;background-color: #FFFFFF">
|
|
|
+ <van-button round size="large" color="#1B365D" custom-style="height:88rpx;width:640rpx;margin-bottom:40rpx" type="info" size="small" bindtap="commit">确定</van-button>
|
|
|
</view>
|
|
|
+</van-popup>
|
|
|
|
|
|
- <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>
|
|
|
+<!--弹出-->
|
|
|
+<dk-single-dropdown-item show="{{showDrop}}" typeName='{{dropType}}' bind:commit='chooseData' bind:muticlose='muticlose'></dk-single-dropdown-item>
|