|
|
@@ -80,18 +80,6 @@
|
|
|
</template>
|
|
|
</modal-module>
|
|
|
|
|
|
- <modal-module :show="breakShow" @click="breakConfirm" :maskClosable="true" title="拆散数量" padding="30rpx 30rpx" >
|
|
|
- <template v-slot:content>
|
|
|
- <div class="app-modal-input-wrap">
|
|
|
- <div class="inp-list-line">
|
|
|
- <div class="line-input">
|
|
|
- <input type="number" ref="input" style="width:61.8%;text-align:center;" :focus="breakFocus" v-model="breakNum" :adjust-position="false" class="inp-input" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </modal-module>
|
|
|
-
|
|
|
<uni-popup ref="globalClassImgRef" 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 globalClassData" :key="index" @tap.stop="globalChangeClass(index,item)" style="margin-bottom:20upx;margin-left:3upx;">
|
|
|
@@ -128,9 +116,11 @@
|
|
|
<view style="width:100vw;margin-top:8upx;"><button @click="orderRecord()">下单记录</button></view>
|
|
|
<view style="width:100vw;margin-top:8upx;"><button @click="onStockChange()">路上库存变动</button></view>
|
|
|
<!-- <view style="width:100vw;margin-top:8upx;"><button @click="ptAuth()">申请平台认证</button></view> -->
|
|
|
+ <view style="width:100vw;margin-top:8upx;"><button @click="preSell()">预售</button></view>
|
|
|
+ <view style="width:100vw;margin-top:8upx;"><button @click="doWaste()">报损</button></view>
|
|
|
+ <view style="width:100vw;margin-top:8upx;"><button @click="doPart()">拆散</button></view>
|
|
|
<view style="width:100vw;margin-top:8upx;"><button @click="delItem()">删除</button></view>
|
|
|
<view style="width:100vw;margin-top:8upx;"><button @click="sendStock()">分配库存</button></view>
|
|
|
- <view style="width:100vw;margin-top:8upx;"><button @click="preSell()">预售</button></view>
|
|
|
<view style="width:100vw;margin-top:30upx;"><button @click="closeRightShow()">取消</button></view>
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
@@ -147,6 +137,30 @@
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
|
|
|
+ <modal-module :show="wasteShow" @click="wasteConfirm" :maskClosable="true" title="报损数量" padding="30rpx 30rpx" >
|
|
|
+ <template v-slot:content>
|
|
|
+ <view class="app-modal-input-wrap">
|
|
|
+ <view class="inp-list-line">
|
|
|
+ <view class="line-input">
|
|
|
+ <input type="number" ref="input" style="width:61.8%;text-align:center;" @blur="wasteBlur" :focus="wasteFocus" v-model="wasteNum" :adjust-position="false" class="inp-input" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ </modal-module>
|
|
|
+
|
|
|
+ <modal-module :show="partShow" @click="partConfirm" :maskClosable="true" title="拆散数量" padding="30rpx 30rpx" >
|
|
|
+ <template v-slot:content>
|
|
|
+ <view class="app-modal-input-wrap">
|
|
|
+ <view class="inp-list-line">
|
|
|
+ <view class="line-input">
|
|
|
+ <input type="number" ref="input" style="width:61.8%;text-align:center;" @blur="partBlur" :focus="partFocus" v-model="partNum" :adjust-position="false" class="inp-input" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ </modal-module>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -160,6 +174,8 @@ import { print,cancelDiscountPrice,cancelPreSell,delStatusUpdate,cancelFullOffFn
|
|
|
import { getHdPoster,getSkPoster,breakItem,changeFrontHide,applyAuth,changeHalf,moveToLosing } from '@/api/item'
|
|
|
import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
|
|
|
import ModalModule from "@/components/plugin/modal"
|
|
|
+import { partItem } from "@/api/part"
|
|
|
+import { wastage } from "@/api/order"
|
|
|
export default {
|
|
|
name: "list",
|
|
|
components: {
|
|
|
@@ -188,10 +204,12 @@ export default {
|
|
|
warning:0,
|
|
|
currentInfo:{},
|
|
|
posterUrl:'',
|
|
|
- breakNum:'',
|
|
|
- breakFocus:false,
|
|
|
- breakShow:false,
|
|
|
- halfRemark:''
|
|
|
+ wasteNum:'',
|
|
|
+ wasteShow:false,
|
|
|
+ wasteFocus:false,
|
|
|
+ partNum:'',
|
|
|
+ partShow:false,
|
|
|
+ partFocus:false,
|
|
|
};
|
|
|
},
|
|
|
computed:{
|
|
|
@@ -206,6 +224,82 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ doPart(){
|
|
|
+ this.closeRightShow()
|
|
|
+ this.partShow = true
|
|
|
+ let that = this
|
|
|
+ setTimeout(x => {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ that.partFocus = true
|
|
|
+ })
|
|
|
+ }, 300)
|
|
|
+ },
|
|
|
+ partBlur(){
|
|
|
+ this.partFocus = false
|
|
|
+ },
|
|
|
+ closePartPop(){
|
|
|
+ this.partShow = false
|
|
|
+ this.partFocus = false
|
|
|
+ this.partNum = ''
|
|
|
+ },
|
|
|
+ partConfirm(val){
|
|
|
+ let that = this
|
|
|
+ if (val.index == 0) {
|
|
|
+ this.closePartPop()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(Number(that.partNum)<0){
|
|
|
+ that.$msg('请填写数量')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ let product = [{ productId:this.currentInfo.id,bigNum:that.partNum,smallNum:null,classId:0,itemId:this.currentInfo.itemId,ratio:this.currentInfo.ratio }]
|
|
|
+ that.$util.confirmModal({content:'确认拆散?'},() => {
|
|
|
+ partItem({product:JSON.stringify(product),remark:''}).then((res) => {
|
|
|
+ if(res.code == 1){
|
|
|
+ that.closePartPop()
|
|
|
+ that.$msg('拆散成功')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ doWaste(){
|
|
|
+ this.closeRightShow()
|
|
|
+ this.wasteShow = true
|
|
|
+ let that = this
|
|
|
+ setTimeout(x => {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ that.wasteFocus = true
|
|
|
+ })
|
|
|
+ }, 300)
|
|
|
+ },
|
|
|
+ wasteBlur(){
|
|
|
+ this.wasteFocus = false
|
|
|
+ },
|
|
|
+ closeWastePop(){
|
|
|
+ this.wasteShow = false
|
|
|
+ this.wasteFocus = false
|
|
|
+ this.wasteNum = ''
|
|
|
+ },
|
|
|
+ wasteConfirm(val){
|
|
|
+ let that = this
|
|
|
+ if (val.index == 0) {
|
|
|
+ this.closeWastePop()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(Number(that.wasteNum)<0){
|
|
|
+ that.$msg('请填写数量')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ let product = [{ productId:this.currentInfo.id,bigNum:that.wasteNum,smallNum:null,classId:0,itemId:this.currentInfo.itemId,ratio:this.currentInfo.ratio }]
|
|
|
+ that.$util.confirmModal({content:'确认报损?'},() => {
|
|
|
+ wastage({product:JSON.stringify(product),remark:''}).then((res) => {
|
|
|
+ if(res.code == 1){
|
|
|
+ that.closeWastePop()
|
|
|
+ that.$msg('报损成功')
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
moveToLose(){
|
|
|
this.moveLabelShow = true
|
|
|
this.moveNum = this.currentInfo.stock?parseFloat(this.currentInfo.stock):0
|
|
|
@@ -255,55 +349,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- breakSingleItem(item){
|
|
|
- let that = this
|
|
|
- this.breakNum = 1
|
|
|
- that.$util.confirmModal({content:'确定拆1扎?'},() => {
|
|
|
- that.breakAction()
|
|
|
- })
|
|
|
- },
|
|
|
- breakMore(){
|
|
|
- this.closeRightShow()
|
|
|
- this.breakShow = true
|
|
|
- this.breakNum = null
|
|
|
- setTimeout(x => {
|
|
|
- this.$nextTick(() => this.setBreakFocus())
|
|
|
- }, 200)
|
|
|
- },
|
|
|
- breakAction(){
|
|
|
- let that = this
|
|
|
- breakItem({breakNum:that.breakNum,id:that.currentInfo.id}).then(res=>{
|
|
|
- if(res.code == 1){
|
|
|
- that.breakShow = false
|
|
|
- that.breakFocus = false
|
|
|
- that.$msg(res.msg)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- breakConfirm(val){
|
|
|
- let that=this;
|
|
|
- if (val.index == 0) {
|
|
|
- that.breakShow = false
|
|
|
- that.breakFocus = false
|
|
|
- return false
|
|
|
- }
|
|
|
- if (this.breakNum == null) {
|
|
|
- that.$msg('请填写数量')
|
|
|
- that.breakFocus = true
|
|
|
- return false
|
|
|
- }
|
|
|
- if (Number(this.breakNum) <= 0) {
|
|
|
- that.$msg('数量不能小于1')
|
|
|
- that.breakFocus = true
|
|
|
- return false
|
|
|
- }
|
|
|
- that.$util.confirmModal({content:'确认拆'+that.breakNum+'份?'},() => {
|
|
|
- that.breakAction()
|
|
|
- })
|
|
|
- },
|
|
|
- setBreakFocus(){
|
|
|
- this.breakFocus = true
|
|
|
- },
|
|
|
cancelPreSellFn(item){
|
|
|
let that = this
|
|
|
this.$util.confirmModal({content:'确认取消预售?'},() => {
|