添加删除按钮
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
<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 class="select_wraper mgl10":class="crType === 'OUT' ? 'zd-col-8' : 'zd-col-16'">
|
||||
<view class="zd-col-12 zd-row jcflexstart">
|
||||
<view :class="crType === 'OUT' ? 'zd-col-8' : 'zd-col-16'"><search-box placeholder="关键字" v-model="val1" /></view>
|
||||
<view class="select_wraper mgl10":class="crType === 'OUT' ? 'zd-col-10' : 'zd-col-16'">
|
||||
<zxz-uni-data-select placeholder="选择仓库" v-model="value1" filterable :localdata="range1"></zxz-uni-data-select>
|
||||
</view>
|
||||
<view v-if="crType === 'OUT'" class="zd-col-6 select_wraper mgl10">
|
||||
<zxz-uni-data-select placeholder="选择仓管员" v-model="value2" filterable :localdata="range2"></zxz-uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-col-11 zd-row jcflexend">
|
||||
<view class="zd-col-12 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' && id !== 'EASCGRKD'" class="confirm-button" :class="{'confirm-button_disabled': !subCheckData.length}" @tap="showPop(2, '', '')">库位分配</button>
|
||||
<button v-if="id !== 'CGRKD' && id !== 'EASCGRKD'" 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>
|
||||
@@ -199,8 +200,8 @@
|
||||
import ScanInput from '@/components/ScanInput.vue'
|
||||
import Pagination from '@/components/Pagination.vue'
|
||||
import GridDetail from '@/components/GridDetail.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: {
|
||||
@@ -580,6 +581,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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user