2024-06-28 09:01:05 +08:00
|
|
|
<template>
|
|
|
|
|
<view class="zd_container">
|
2024-07-16 15:50:04 +08:00
|
|
|
<!-- <nav-bar title="分切暂存清除"></nav-bar> -->
|
|
|
|
|
<nav-bar :title="title"></nav-bar>
|
2024-06-28 09:01:05 +08:00
|
|
|
<view class="zd_content">
|
|
|
|
|
<view class="zd_wrapper">
|
|
|
|
|
<view class="filter_item">
|
|
|
|
|
<view class="filter_label">分切暂存位</view>
|
|
|
|
|
<view class="filter_input_wraper">
|
2024-07-02 09:54:00 +08:00
|
|
|
<search-box v-model="val1" />
|
2024-06-28 09:01:05 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-07-08 09:54:30 +08:00
|
|
|
<view class="filter_item">
|
|
|
|
|
<view class="filter_label_wraper">
|
|
|
|
|
<span class="filter_label">子卷号</span>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="filter_input_wraper">
|
|
|
|
|
<search-box
|
|
|
|
|
v-model="val2"
|
|
|
|
|
/>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-06-28 09:01:05 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="zd-row submitbar">
|
2024-07-13 10:49:15 +08:00
|
|
|
<button class="zd-col-4 btn-submit btn-default" @tap="clearUp">清空</button>
|
|
|
|
|
<button class="zd-col-4 btn-submit btn-success" :class="{'btn-info': !val1}" :disabled="disabled" @tap="_toCleanCutCacheInventory">清除</button>
|
|
|
|
|
<button class="zd-col-7 btn-submit btn-success" :class="{'btn-info': !val1 || !val2}" :disabled="disabled1" @tap="_toSubvolumeBinding">子卷绑定</button>
|
|
|
|
|
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !val1 || !val2}" :disabled="disabled2" @tap="_toShaftBinding">气胀轴绑定</button>
|
2024-06-28 09:01:05 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import NavBar from '@/components/NavBar.vue'
|
2024-07-02 09:54:00 +08:00
|
|
|
import SearchBox from '@/components/SearchBox.vue'
|
2024-07-13 10:49:15 +08:00
|
|
|
import {toCleanCutCacheInventory, toSubvolumeBinding, toShaftBinding} from '@/utils/getData3.js'
|
2024-06-28 09:01:05 +08:00
|
|
|
export default {
|
|
|
|
|
components: {
|
2024-07-02 09:54:00 +08:00
|
|
|
NavBar,
|
|
|
|
|
SearchBox
|
2024-06-28 09:01:05 +08:00
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2024-07-16 15:50:04 +08:00
|
|
|
title: '',
|
2024-07-02 09:54:00 +08:00
|
|
|
val1: '',
|
2024-07-08 09:54:30 +08:00
|
|
|
val2: '',
|
|
|
|
|
disabled: false,
|
2024-07-13 10:49:15 +08:00
|
|
|
disabled1: false,
|
|
|
|
|
disabled2: false
|
2024-06-28 09:01:05 +08:00
|
|
|
};
|
|
|
|
|
},
|
2024-07-16 15:50:04 +08:00
|
|
|
onLoad (options) {
|
|
|
|
|
this.title = options.title
|
|
|
|
|
},
|
2024-06-28 09:01:05 +08:00
|
|
|
methods: {
|
|
|
|
|
async _toCleanCutCacheInventory () {
|
|
|
|
|
this.disabled = true
|
2024-07-02 09:54:00 +08:00
|
|
|
if (!this.val1) {
|
2024-06-28 09:01:05 +08:00
|
|
|
this.disabled = false
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
try {
|
2024-07-02 09:54:00 +08:00
|
|
|
let res = await toCleanCutCacheInventory(this.val1)
|
2024-06-28 09:01:05 +08:00
|
|
|
uni.showToast({
|
|
|
|
|
title: res.message,
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
this.disabled = false
|
|
|
|
|
} catch (e) {
|
|
|
|
|
this.disabled = false
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-07-08 09:54:30 +08:00
|
|
|
async _toSubvolumeBinding () {
|
|
|
|
|
this.disabled1 = true
|
|
|
|
|
if (!this.val1 || !this.val2) {
|
|
|
|
|
this.disabled1 = false
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
let res = await toSubvolumeBinding(this.val1, this.val2)
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res.message,
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
this.disabled1= false
|
|
|
|
|
} catch (e) {
|
|
|
|
|
this.disabled1 = false
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-07-13 10:49:15 +08:00
|
|
|
async _toShaftBinding () {
|
|
|
|
|
this.disabled2 = true
|
|
|
|
|
if (!this.val1 || !this.val2) {
|
|
|
|
|
this.disabled2 = false
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
let res = await toShaftBinding(this.val1, this.val2)
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res.message,
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
this.disabled2= false
|
|
|
|
|
} catch (e) {
|
|
|
|
|
this.disabled2 = false
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-06-28 09:01:05 +08:00
|
|
|
clearUp () {
|
2024-07-02 09:54:00 +08:00
|
|
|
this.val1 = ''
|
2024-07-08 09:54:30 +08:00
|
|
|
this.val2 = ''
|
|
|
|
|
this.disabled = false
|
|
|
|
|
this.disabled1 = false
|
2024-07-13 10:49:15 +08:00
|
|
|
this.disabled2 = false
|
2024-06-28 09:01:05 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|