|
|
@@ -2,10 +2,10 @@
|
|
|
<view class="app-content">
|
|
|
<view class="ex-page">
|
|
|
<view class="top-bar">
|
|
|
- <view style="font-size:32upx;color:blue;font-weight:bold;margin-left:30upx;padding:10upx 0 10upx 0;" v-if="Number(itemId)>0 && respond.remainNum && Number(respond.remainNum)>0">
|
|
|
+ <view style="font-size:34upx;color:blue;font-weight:bold;margin-left:30upx;padding:10upx 0 10upx 0;" v-if="Number(itemId)>0 && respond.remainNum && Number(respond.remainNum)>0">
|
|
|
{{ respond.remainName }} 剩 {{ respond.remainNum }}份
|
|
|
</view>
|
|
|
- <view style="font-size:32upx;color:black;font-weight:bold;margin-left:30upx;padding:10upx 0 10upx 0;" v-if="Number(customId)>0">
|
|
|
+ <view style="font-size:34upx;color:black;font-weight:bold;margin-left:30upx;padding:10upx 0 10upx 0;" v-if="Number(customId)>0">
|
|
|
【{{ customName }}】预订的花材
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -25,6 +25,11 @@
|
|
|
<text style="position: absolute;top:68upx;left:150upx;font-weight:bold;color:red;font-size:24upx;" v-if="item.hasRemark == 1">{{ item.remark?item.remark:'' }}</text>
|
|
|
<t-tr>
|
|
|
<t-td>
|
|
|
+ <view>
|
|
|
+ <view style="text-align:left;" v-if="showSelect==true">
|
|
|
+ <text class="iconfont iconweixuanzhong" style="font-size:30upx;color:#dddddd;" v-if="item.isCheck==0"></text>
|
|
|
+ <text class="iconfont iconxuanzhong" style="font-size:30upx;color:#3385FF;" v-else></text>
|
|
|
+ </view>
|
|
|
<view class="name" :class="[item.bookNum == item.onNum ? 'finish' : 'normal']" style="width:170upx;position: relative;">
|
|
|
{{item.name}}
|
|
|
<image :src="`${constant.imgUrl}/ghs/book/box1.png`" style="width:35upx;height:35upx;display: inline-block;position: absolute;top:48upx;"
|
|
|
@@ -32,6 +37,7 @@
|
|
|
<image :src="`${constant.imgUrl}/ghs/book/remark2.png`" style="width:39upx;height:39upx;display: inline-block;position: absolute;top:44upx;left:50upx;"
|
|
|
mode="widthFix" v-if="item.hasRemark == 1"></image>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
</t-td>
|
|
|
<t-td><view class="num" :class="[item.bookNum == item.onNum ? 'finish' : 'normal']">{{item.bookNum?parseFloat(item.bookNum):0}}</view></t-td>
|
|
|
<t-td><view class="num" :class="[item.bookNum == item.onNum ? 'finish' : 'normal']">{{item.onNum?parseFloat(item.onNum):0}}</view></t-td>
|
|
|
@@ -53,6 +59,12 @@
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
|
|
|
+ <view class="app-footer">
|
|
|
+ <button class="admin-button-com big blue" @click="changeShowSelect" style="margin-right:30upx;">{{ showSelect == true ? '取消' : '选择' }}</button>
|
|
|
+ <button class="admin-button-com big blue" @click="checkAll" style="margin-right:30upx;">{{ getAll == true ? '全不选' : '全选中' }}</button>
|
|
|
+ <button class="admin-button-com big blue" @click="goOn">全上齐</button>
|
|
|
+ </view>
|
|
|
+
|
|
|
<uni-popup ref="actRef" background-color="#fff" type="center" :animation="false" class="class-popup-style" :is-mask-click="false">
|
|
|
<view style="max-height:99vh;overflow: scroll;padding:15upx;">
|
|
|
<view style="text-align:center;font-size:32upx;font-weight:bold;">{{ currentItem.name ? currentItem.name:'未命名' }}</view>
|
|
|
@@ -101,13 +113,12 @@
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
|
|
|
-
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import SelectList from "@/components/plugin/selectList";
|
|
|
-import { getBookItemCustomList,goOnFn,toBoxFn,goOffFn,cancelBoxFn } from "@/api/book"
|
|
|
+import { getBookItemCustomList,goOnFn,toBoxFn,goOffFn,cancelBoxFn,batchGoOnFn } from "@/api/book"
|
|
|
import { bookAddStockFn,bookDelStockFn } from "@/api/inventory"
|
|
|
import { list } from "@/mixins";
|
|
|
import ShopSelect from "@/components/module/shopSelect";
|
|
|
@@ -136,7 +147,9 @@ export default {
|
|
|
currentItem:null,
|
|
|
respond:{remainNum:0,remainName:''},
|
|
|
currentNum:'',
|
|
|
- needRefresh:0
|
|
|
+ needRefresh:0,
|
|
|
+ showSelect:false,
|
|
|
+ getAll:false
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
@@ -154,6 +167,55 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['setUserShopAll']),
|
|
|
+ goOn(){
|
|
|
+ let that = this
|
|
|
+ if (this.$util.isEmpty(this.bookData)){
|
|
|
+ this.$msg('没有数据')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ let ids = []
|
|
|
+ this.bookData.forEach((item,idx,arr) => {
|
|
|
+ if(item.isCheck == 1){
|
|
|
+ ids.push(item.id)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (this.$util.isEmpty(ids)){
|
|
|
+ this.$msg('请选择')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.$util.confirmModal({content:'确认选中上齐'},() => {
|
|
|
+ batchGoOnFn({ids:JSON.stringify(ids)}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg('操作成功')
|
|
|
+ that.getStatList()
|
|
|
+ that.showSelect = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ checkAll(){
|
|
|
+ if(this.showSelect == false){
|
|
|
+ this.$msg('请选择')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if (this.$util.isEmpty(this.bookData)){
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if(this.getAll == true){
|
|
|
+ this.getAll = false
|
|
|
+ this.bookData.forEach((item,idx,arr) => {
|
|
|
+ item.isCheck = 0
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.getAll = true
|
|
|
+ this.bookData.forEach((item,idx,arr) => {
|
|
|
+ item.isCheck = 1
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ changeShowSelect(){
|
|
|
+ this.showSelect = this.showSelect == false ? true : false
|
|
|
+ },
|
|
|
goChange(){
|
|
|
this.$refs.actRef.close()
|
|
|
this.$util.pageTo({ url: "/admin/book/itemCustomBookChange?id="+this.currentItem.id+'&customId='+this.currentItem.customId+'&itemId='+this.currentItem.itemId+'&customName='+this.currentItem.customName+'&itemName='+this.currentItem.name})
|
|
|
@@ -221,8 +283,12 @@ export default {
|
|
|
this.$util.pageTo({ url: "/admin/book/itemCustomDetail?parentId="+this.currentItem.id})
|
|
|
},
|
|
|
goAction(item){
|
|
|
- this.currentItem = item
|
|
|
- this.$refs.actRef.open('center')
|
|
|
+ if(this.showSelect == false){
|
|
|
+ this.currentItem = item
|
|
|
+ this.$refs.actRef.open('center')
|
|
|
+ }else{
|
|
|
+ item.isCheck = 1
|
|
|
+ }
|
|
|
},
|
|
|
addOnNum(){
|
|
|
if(Number(this.currentNum)<=0){
|
|
|
@@ -323,7 +389,11 @@ export default {
|
|
|
uni.hideLoading()
|
|
|
this.respond = res.data
|
|
|
if (!this.$util.isEmpty(res.data.list)) {
|
|
|
- that.bookData = res.data.list
|
|
|
+ let oldList = res.data.list
|
|
|
+ const newList = oldList.map((ele) => {
|
|
|
+ return {...ele,isCheck:0}
|
|
|
+ })
|
|
|
+ that.bookData = newList
|
|
|
}else{
|
|
|
that.bookData=[]
|
|
|
}
|
|
|
@@ -345,6 +415,7 @@ export default {
|
|
|
.main-view {
|
|
|
flex: 1;
|
|
|
background-color: #f9fbfc;
|
|
|
+ margin-bottom:160upx;
|
|
|
.space-view {
|
|
|
background-color: #fff;
|
|
|
.num{
|