添加删除按钮
This commit is contained in:
@@ -1,24 +1,25 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="sticky search-confirm-wrap">
|
||||
<view class="sticky search-confirm-wrap" style="z-index: 11;">
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-13 zd-row jcflexstart">
|
||||
<view :class="crType === 'OUT' ? 'zd-col-10' : 'zd-col-16'"><search-box placeholder="输入查询条件" v-model="val1" /></view>
|
||||
<view v-if="crType === 'OUT'" class="zd-col-6 select_wraper mgl10">
|
||||
<view :class="crType === 'OUT' ? 'zd-col-8' : 'zd-col-16'"><search-box placeholder="关键字" v-model="val1" /></view>
|
||||
<view v-if="crType === 'OUT'" class="zd-col-8 select_wraper mgl10">
|
||||
<zxz-uni-data-select placeholder="选择仓管员" v-model="value2" filterable :localdata="range2"></zxz-uni-data-select>
|
||||
</view>
|
||||
<view class="zd-col-8 mgl10 zd-row jcflexstart">
|
||||
<view class="pop_label mgr1">全部数据</view>
|
||||
<view class="relative">
|
||||
<switch :checked="isChecked" color="#007de7"/>
|
||||
<text @tap="setWStatus" style="position: absolute;display: inline-block;width: 75px; height: 26px;left: 0;"></text>
|
||||
<text @tap="setWStatus" style="position: absolute;display: inline-block;width: 55px; height: 26px;left: 0;"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-col-11 zd-row jcflexend">
|
||||
<button class="confirm-button" @tap="toSearch">查询</button>
|
||||
<button class="confirm-button" :disabled="disabled1" @tap="_easOutInBillSync">同步</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': checkData.length === 0}" :disabled="disabled1" @tap="_easOutInBillDelete">删除</button>
|
||||
<button v-if="id !== 'CGRKD'" class="confirm-button" :class="{'confirm-button_disabled': !subCheckData.length}" @tap="showPop(2, '', '')">库位分配</button>
|
||||
<button v-if="id !== 'CGRKD'" class="confirm-button" :class="{'confirm-button_disabled': !subCheckData.length}" @tap="inWarehouseSure">库存提交</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': checkData.length === 0}" :disabled="disabled1" @tap="_easOutInBillUpdate">单据审核</button>
|
||||
@@ -205,8 +206,8 @@
|
||||
import Pagination from '@/components/Pagination.vue'
|
||||
import GridDetail from '@/components/GridDetail.vue'
|
||||
import UpTop from '@/components/upTop.vue'
|
||||
import {getWarehouseInfo, getUserInfo, easOutInBillPage, easOutInBillDetailPage, viewAssignDtl, inWarehouseAssignLocation, updateAssignDtl, addAssignDtl, inWarehouseCommit, easOutInBillUpdate, easOutInBillSync} from '@/utils/getData2.js'
|
||||
// import {updateAssignDtl, addAssignDtl, inWarehouseCommit, easOutInBillUpdate, easOutInBillSync} from '@/utils/getData2.js'
|
||||
import {getWarehouseInfo, getUserInfo, easOutInBillPage, easOutInBillDetailPage, viewAssignDtl, inWarehouseAssignLocation, updateAssignDtl, addAssignDtl, inWarehouseCommit, easOutInBillUpdate, easOutInBillSync, easOutInBillDelete} from '@/utils/getData2.js'
|
||||
// import {updateAssignDtl, addAssignDtl, inWarehouseCommit, easOutInBillUpdate, easOutInBillSync, easOutInBillDelete} from '@/utils/getData2.js'
|
||||
// import {getWarehouseInfo, getUserInfo, easOutInBillPage, easOutInBillDetailPage, viewAssignDtl, inWarehouseAssignLocation} from '@/utils/mork2.js'
|
||||
export default {
|
||||
components: {
|
||||
@@ -610,6 +611,32 @@
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
// 点击删除按钮
|
||||
async _easOutInBillDelete () {
|
||||
this.disabled1 = true
|
||||
if (!this.checkData.length) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let type = this.id === 'CGRKD' ? 'SRMINOUT' : 'EASINOUT'
|
||||
let res = await easOutInBillDelete(type, this.checkData)
|
||||
if (res.code === 1) {
|
||||
this.disabled1 = false
|
||||
this.checkData = []
|
||||
this.subCheckData = []
|
||||
this._easOutInBillPage()
|
||||
} else {
|
||||
this.disabled1 = false
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -642,15 +669,15 @@
|
||||
/deep/ .uni-select__selector-item
|
||||
color #fff
|
||||
/deep/ uni-switch .uni-switch-input
|
||||
width 70px
|
||||
width 55px
|
||||
height 26px
|
||||
border-color: #8e99a4;
|
||||
background-color: #8e99a4;
|
||||
&:before
|
||||
width 70px
|
||||
width 55px
|
||||
height 26px
|
||||
/deep/ uni-switch .uni-switch-input.uni-switch-input-checked:after
|
||||
transform translateX(44px)
|
||||
transform translateX(28px)
|
||||
/deep/ uni-switch .uni-switch-input:before
|
||||
background-color: #8e99a4;
|
||||
height 26px
|
||||
|
||||
Reference in New Issue
Block a user