|
|
@@ -2,8 +2,11 @@
|
|
|
<view class="app-content">
|
|
|
<view class="billing_box_bg">
|
|
|
<view class="input-wrap" >
|
|
|
+ <view style="padding:0upx 0upx 0upx 0upx;margin-right:10upx;" >
|
|
|
+ <button class="admin-button-com middle blue" @click="selectFlowerNumFn()">图片分类</button>
|
|
|
+ </view>
|
|
|
<view class="search-bar">
|
|
|
- <app-search-module v-model="py" placeholder="输入拼音首字母搜索" @input="searchFn" />
|
|
|
+ <app-search-module v-model="py" placeholder="输拼音首字母也可以搜" @input="searchFn" />
|
|
|
</view>
|
|
|
<view style="float:right">
|
|
|
<button class="admin-button-com middle blue" @click="removeFromSave(0)">清除花材</button>
|
|
|
@@ -26,42 +29,31 @@
|
|
|
<block v-if="!$util.isEmpty(globalClassItemList)">
|
|
|
<view class="item_list_bx selectAll" v-for="(classItem, classIndex) in globalClassItemList" :key="classIndex" :id="`class_${classIndex}`">
|
|
|
<view class="item_list_title">{{ classItem.className }}</view>
|
|
|
-
|
|
|
- <view v-if="classItem.child && !$util.isEmpty(classItem.child)">
|
|
|
-
|
|
|
- <template v-for="(productItem, productIndex) in classItem.child">
|
|
|
- <view style="height: 160upx" :id="`class_${classItem.classId}_${productItem.id}`" :key="productIndex">
|
|
|
- <Commondity v-if="classItem.isActive"
|
|
|
- :checkStock="true"
|
|
|
- :info="productItem"
|
|
|
- @showAddModelFn="showAddModelFn"
|
|
|
- @replaceItemFn="replaceItemFn"
|
|
|
- ></Commondity>
|
|
|
- </view>
|
|
|
- </template>
|
|
|
-
|
|
|
- </view>
|
|
|
- <view v-else>
|
|
|
- <view style="height:260upx;text-align:center;color:#CCCCCC;position: relative;">
|
|
|
- <view style="position: absolute;margin:auto;top:130upx;left:0;right:0;bottom:0;">暂无花材</view>
|
|
|
+ <template v-for="(productItem, productIndex) in classItem.child">
|
|
|
+ <view style="height: 175upx" :id="`class_${classItem.classId}_${productItem.id}`" :key="productIndex">
|
|
|
+ <Commondity v-if="classItem.isActive"
|
|
|
+ :checkStock="true"
|
|
|
+ :info="productItem"
|
|
|
+ @showAddModelFn="showAddModelFn"
|
|
|
+ @replaceItemFn="replaceItemFn"
|
|
|
+ ></Commondity>
|
|
|
</view>
|
|
|
- </view>
|
|
|
-
|
|
|
+ </template>
|
|
|
</view>
|
|
|
</block>
|
|
|
<block v-else>
|
|
|
- <app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(globalClassItemList)" />
|
|
|
+ <app-wrapper-empty title="加载中" :is-empty="$util.isEmpty(globalClassItemList)" />
|
|
|
</block>
|
|
|
<!--花材列表 end -->
|
|
|
</scroll-view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
- <modal-module :show="isAddModel" @cancel="addItemModelHidden" @click="confirmAddItemModel" :title="customData.itemName" color="#333" :size="32" padding="30rpx 30rpx" >
|
|
|
+ <modal-module :show="isAddModel" @cancel="addItemModelHidden" @click="confirmAddItemModel" :title="customData.name" color="#333" :size="32" padding="30rpx 30rpx" >
|
|
|
<template slot="customContent">
|
|
|
<view class="select-cmd_bx" v-if="customData">
|
|
|
- <view class="kc"><text class="unit_price">库存 {{ customData.stock?parseFloat(customData.stock):0 }}</text></view>
|
|
|
- <view class="num_bx">
|
|
|
+ <view class="kc"><text class="unit_price">库存 {{ customData.stock||0 }}</text></view>
|
|
|
+ <view class="num_bx">
|
|
|
|
|
|
<!-- #ifdef APP-PLUS -->
|
|
|
<input style="width: 260upx" v-model="customData.bigCount" v-if="globalUnitType == 0" type="number" />
|
|
|
@@ -75,6 +67,7 @@
|
|
|
<input style="width: 260upx" v-model="customData.smallCount" v-if="globalUnitType == 1" :focus="isAddInputFocus" type="number" />
|
|
|
<text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 1">{{customData.smallUnit}}</text>
|
|
|
<!-- #endif -->
|
|
|
+ <image @click="switchGlobalUnitType" :src="`${constant.imgUrl}/icon/switch/switch128.png`" style="width:86upx;height:86upx;" mode="widthFix"></image>
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -82,9 +75,24 @@
|
|
|
</modal-module>
|
|
|
|
|
|
<!-- 花材不足提示框 -->
|
|
|
- <modal-module :show="showSubmitModel" title="确认下一步?" color="#333" :size="32" padding="30rpx 30rpx" >
|
|
|
+ <modal-module :show="showSubmitModel" title="确认下一步?" color="#333" :size="32" padding="30upx 30upx" >
|
|
|
</modal-module>
|
|
|
- <FooterCart :price="allPrice" :count="allCount" @confirm="confirmToSave" ></FooterCart>
|
|
|
+
|
|
|
+ <FooterCart :price="allPrice" :count="allCount" @confirm="confirmToSave" :selectJobType="selectJobType" ></FooterCart>
|
|
|
+
|
|
|
+ <uni-popup ref="selectFlowerNumRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
|
|
|
+ <view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
|
|
|
+
|
|
|
+ <view v-for="(item, index) in globalClassItemList" :key="index" @tap.stop="changeClass(index)" style="margin-bottom:20upx;margin-left:3upx;">
|
|
|
+ <image :src="item.classCover" style="width:120upx;height:120upx;border-radius:10upx;"></image>
|
|
|
+ <view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;">{{item.className}}</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
+ <image v-if="showClassRemind" @click="hideClassRemind" style="position:absolute;width:610upx;height:699upx;top:225upx;left:80upx;z-index:9999;" :src="`${constant.imgUrl}/class_remind.png`"></image>
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -99,7 +107,7 @@ import ModalModule from "@/components/plugin/modal";
|
|
|
import { COMMODITY_TYPE } from "@/utils/declare";
|
|
|
import productMins from "@/mixins/product";
|
|
|
export default {
|
|
|
- name: "index",//拆散
|
|
|
+ name: "index",
|
|
|
components: {
|
|
|
AppTabs,
|
|
|
AppSearchModule,
|
|
|
@@ -121,20 +129,41 @@ export default {
|
|
|
smallCount: 0,
|
|
|
userPrice:0
|
|
|
},
|
|
|
- showSubmitModel: false
|
|
|
+ showSubmitModel: false,
|
|
|
+ unitType:0,
|
|
|
+ showClassRemind:false,
|
|
|
+ autoLoad: false
|
|
|
};
|
|
|
},
|
|
|
- computed: {
|
|
|
- },
|
|
|
- onUnload() {
|
|
|
+ onLoad(){
|
|
|
+ this.initData({requestType:'part'})
|
|
|
},
|
|
|
methods: {
|
|
|
+ changeClass(index){
|
|
|
+ this.$refs.selectFlowerNumRef.close()
|
|
|
+ this.swichClass(index)
|
|
|
+ },
|
|
|
+ selectFlowerNumFn(){
|
|
|
+ this.$refs.selectFlowerNumRef.open('top')
|
|
|
+ },
|
|
|
+ hideClassRemind(){
|
|
|
+
|
|
|
+ },
|
|
|
+ switchGlobalUnitType(){
|
|
|
+ if(this.globalUnitType == 0){
|
|
|
+ this.globalUnitType = 1
|
|
|
+ this.customData.bigCount = null
|
|
|
+ }else{
|
|
|
+ this.globalUnitType = 0
|
|
|
+ this.customData.smallCount = null
|
|
|
+ }
|
|
|
+ },
|
|
|
confirmToSave() {
|
|
|
if(this.$util.isEmpty(this.selectList)){
|
|
|
this.$msg('请选择花材')
|
|
|
return false
|
|
|
}
|
|
|
- this.$util.pageTo({ url: "/admin/part/confirm",type:2})
|
|
|
+ this.$util.pageTo({ url: "/admin/breakage/confirm",type:2})
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
@@ -147,10 +176,10 @@ export default {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
.input-wrap {
|
|
|
- padding: 22upx 20upx 22upx 30upx;
|
|
|
+ display: flex;
|
|
|
+ padding: 22upx 20upx 22upx 13upx;
|
|
|
.search-bar {
|
|
|
- display:inline-block;
|
|
|
- width:530upx;
|
|
|
+ flex: 1;
|
|
|
}
|
|
|
}
|
|
|
.scroll-middle_bx {
|
|
|
@@ -212,6 +241,7 @@ export default {
|
|
|
height: calc(100vh - 140upx);
|
|
|
flex: 1;
|
|
|
box-sizing: border-box;
|
|
|
+
|
|
|
}
|
|
|
.item_list_bx {
|
|
|
padding: 40upx 16upx;
|