Browse Source

feat: update 按钮显示隐藏问题

master
TengXF 4 months ago
parent
commit
9e26cb5c92
  1. 8
      src/pages/mes/workScheduling/addBasicItem/index.vue
  2. 5
      src/pages/mes/workScheduling/callMaterial.vue

8
src/pages/mes/workScheduling/addBasicItem/index.vue

@ -51,9 +51,9 @@
<view class="btns" v-if="listSize!=0">
<u-button type="success" @click="handleSubmit" :loading='loading' :disabled='loading'>提交</u-button>
</view>
<view class="btns" v-if="listSize == 0">
<!-- <view class="btns" v-if="listSize == 0">
<u-button type="success" @click="navigateBack" :loading='loading' :disabled='loading'>返回</u-button>
</view>
</view> -->
</view>
</view>
@ -79,7 +79,7 @@
const paramData = ref()
const typeList = ref([])
const list = ref([])
const listSize = ref(1)
const listSize = ref(0)
const productList = ref([{label:'产品1',value: '111',name:'产品'},{label:'产品2',value: '222',name:'产品'}])
const queryForm = ref({
@ -110,7 +110,6 @@
if (index !== -1) {
list.value.splice(index, 1);
listSize.value -= 1
console.log(listSize.value)
}
}
@ -189,6 +188,7 @@
list.value = list.value.concat(res.data);
listSize.value = res.data.length
} else {
listSize.value = 0
}
}).catch(() => {
proxy.$modal.closeLoading()

5
src/pages/mes/workScheduling/callMaterial.vue

@ -29,7 +29,7 @@
</u-form-item>
</view> -->
</view>
<view >
<view v-if="listSize!=0">
<u-button type="primary" @click="submitCMForm()">提交</u-button>
</view>
<view style="height: 94rpx;padding-top: 30rpx;">
@ -52,7 +52,7 @@ import {
getCurrentInstance
} from 'vue'
import * as workSchedulingListApi from '@/api/mes/workScheduling/index.ts'
const listSize = ref(0)
const {proxy} = getCurrentInstance()
const loading = ref(false)
const status = ref('loadmore') //
@ -95,6 +95,7 @@ function getBomInspectList() {
} else {
status.value = 'nomore'
}
listSize.value = list.value.length
}).catch(() => {
proxy.$modal.closeLoading()
})

Loading…
Cancel
Save