|
@@ -18,9 +18,16 @@
|
|
|
<t-th><view style="width:90upx;color:black;">客户</view></t-th>
|
|
<t-th><view style="width:90upx;color:black;">客户</view></t-th>
|
|
|
</t-tr>
|
|
</t-tr>
|
|
|
<template v-if="!$util.isEmpty(bookData)">
|
|
<template v-if="!$util.isEmpty(bookData)">
|
|
|
- <view v-for="(item, index) in bookData" :key="index" @click="goAction(item)">
|
|
|
|
|
|
|
+ <view v-for="(item, index) in bookData" :key="index" @click="goAction(item)" style="position: relative;">
|
|
|
|
|
+ <text style="position: absolute;top:68upx;left:190upx;font-weight:bold;color:red;font-size:24upx;">小菊一箱凑数</text>
|
|
|
<t-tr>
|
|
<t-tr>
|
|
|
- <t-td><view class="name" :class="[item.bookNum == item.onNum ? 'finish' : 'normal']">{{item.name}}</view></t-td>
|
|
|
|
|
|
|
+ <t-td>
|
|
|
|
|
+ <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:49upx;"
|
|
|
|
|
+ mode="widthFix" v-if="item.box == 1"></image>
|
|
|
|
|
+ </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.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>
|
|
<t-td><view class="num" :class="[item.bookNum == item.onNum ? 'finish' : 'normal']">{{item.onNum?parseFloat(item.onNum):0}}</view></t-td>
|
|
|
<t-td><view class="num" :class="[item.bookNum == item.onNum ? 'finish' : 'normal']">{{item.roadNum?parseFloat(item.roadNum):0}}</view></t-td>
|
|
<t-td><view class="num" :class="[item.bookNum == item.onNum ? 'finish' : 'normal']">{{item.roadNum?parseFloat(item.roadNum):0}}</view></t-td>
|
|
@@ -48,8 +55,8 @@
|
|
|
<input v-model="currentNum" type="number" @focus="currentNum=''" style="height:100upx;border:1upx solid #CCCCCC;text-align:center;font-size:38upx;width:420upx;" placeholder="数量" />
|
|
<input v-model="currentNum" type="number" @focus="currentNum=''" style="height:100upx;border:1upx solid #CCCCCC;text-align:center;font-size:38upx;width:420upx;" placeholder="数量" />
|
|
|
</view>
|
|
</view>
|
|
|
<view style="margin-top:6upx;">
|
|
<view style="margin-top:6upx;">
|
|
|
- <button class="admin-button-com big blue" style="margin-right:20upx;width:200upx;" @click="onNum()">上架</button>
|
|
|
|
|
- <button class="admin-button-com big blue" style="width:200upx;" @click="outNum()">下架</button>
|
|
|
|
|
|
|
+ <button class="admin-button-com big blue" style="margin-right:20upx;width:200upx;" @click="addOnNum()">上架</button>
|
|
|
|
|
+ <button class="admin-button-com big blue" style="width:200upx;" @click="delOnNum()">下架</button>
|
|
|
</view>
|
|
</view>
|
|
|
<view style="margin-top:10upx;">
|
|
<view style="margin-top:10upx;">
|
|
|
<button class="admin-button-com big blue" style="margin-right:15upx;width:200upx;" @click="toSj()">上齐</button>
|
|
<button class="admin-button-com big blue" style="margin-right:15upx;width:200upx;" @click="toSj()">上齐</button>
|
|
@@ -91,7 +98,7 @@
|
|
|
<script>
|
|
<script>
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import SelectList from "@/components/plugin/selectList";
|
|
import SelectList from "@/components/plugin/selectList";
|
|
|
-import { getBookItemCustomList } from "@/api/book"
|
|
|
|
|
|
|
+import { getBookItemCustomList,goOnFn,toBoxFn,goOffFn,cancelBoxFn } from "@/api/book"
|
|
|
import { list } from "@/mixins";
|
|
import { list } from "@/mixins";
|
|
|
import ShopSelect from "@/components/module/shopSelect";
|
|
import ShopSelect from "@/components/module/shopSelect";
|
|
|
import DateSelect from "@/components/module/dateSelect";
|
|
import DateSelect from "@/components/module/dateSelect";
|
|
@@ -117,7 +124,8 @@ export default {
|
|
|
customName:'',
|
|
customName:'',
|
|
|
customId:0,
|
|
customId:0,
|
|
|
currentItem:null,
|
|
currentItem:null,
|
|
|
- respond:{remainNum:0,remainName:''}
|
|
|
|
|
|
|
+ respond:{remainNum:0,remainName:''},
|
|
|
|
|
+ currentNum:''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
@@ -162,20 +170,85 @@ export default {
|
|
|
this.currentItem = item
|
|
this.currentItem = item
|
|
|
this.$refs.actRef.open('center')
|
|
this.$refs.actRef.open('center')
|
|
|
},
|
|
},
|
|
|
- onNum(){
|
|
|
|
|
-
|
|
|
|
|
|
|
+ addOnNum(){
|
|
|
|
|
+ if(Number(this.currentNum)<=0){
|
|
|
|
|
+ this.$msg('请填写数量')
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ this.$refs.actRef.close()
|
|
|
|
|
+ this.$util.confirmModal({content:'确认上架'+this.currentNum+'份'},() => {
|
|
|
|
|
+ goOnFn({id:this.currentItem.id,num:this.currentNum}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.$msg('操作成功')
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ that.getStatList()
|
|
|
|
|
+ }, 1000)
|
|
|
|
|
+ that.currentNum = ''
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
- outNum(){
|
|
|
|
|
-
|
|
|
|
|
|
|
+ delOnNum(){
|
|
|
|
|
+ if(Number(this.currentNum)<=0){
|
|
|
|
|
+ this.$msg('请填写数量')
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ this.$refs.actRef.close()
|
|
|
|
|
+ this.$util.confirmModal({content:'确认下架'+this.currentNum+'份'},() => {
|
|
|
|
|
+ goOffFn({id:this.currentItem.id,num:this.currentNum}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.$msg('操作成功')
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ that.getStatList()
|
|
|
|
|
+ }, 1000)
|
|
|
|
|
+ that.currentNum = ''
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
toSj(){
|
|
toSj(){
|
|
|
-
|
|
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ this.$refs.actRef.close()
|
|
|
|
|
+ this.$util.confirmModal({content:'确认上齐?'},() => {
|
|
|
|
|
+ goOnFn({id:this.currentItem.id,num:0}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.$msg('操作成功')
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ that.getStatList()
|
|
|
|
|
+ }, 1000)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
toBox(){
|
|
toBox(){
|
|
|
-
|
|
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ this.$refs.actRef.close()
|
|
|
|
|
+ this.$util.confirmModal({content:'确认已装箱?'},() => {
|
|
|
|
|
+ toBoxFn({id:this.currentItem.id}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.$msg('操作成功')
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ that.getStatList()
|
|
|
|
|
+ }, 1000)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
cancelBox(){
|
|
cancelBox(){
|
|
|
-
|
|
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ this.$refs.actRef.close()
|
|
|
|
|
+ this.$util.confirmModal({content:'确认取消装箱?'},() => {
|
|
|
|
|
+ cancelBoxFn({id:this.currentItem.id}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.$msg('操作成功')
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ that.getStatList()
|
|
|
|
|
+ }, 1000)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
cancelAct(){
|
|
cancelAct(){
|
|
|
this.$refs.actRef.close()
|
|
this.$refs.actRef.close()
|