接口修改
This commit is contained in:
@@ -61,8 +61,8 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<!-- <button class="zd-col-22 button-primary" :class="{'button-info': !val1 || !dataList.length || !index}" :disabled="disabled" @tap="_productBlanking">{{$t('button.confirm-down-material')}}</button> -->
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !index || !dataList.length}" :disabled="disabled" @tap="handleConfirm('1')">{{$t('button.scxl')}}</button>
|
||||
<button class="zd-col-8 button-default" :class="{'button-info': !val1 || !index || !dataList.length}" :disabled="disabled" @tap="handleConfirm('2')">{{$t('button.zjps')}}</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="handleConfirm('1')">{{$t('button.scxl')}}</button>
|
||||
<button class="zd-col-8 button-default" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="handleConfirm('2')">{{$t('button.zjps')}}</button>
|
||||
<button class="zd-col-8 button-default" :class="{'button-info': !val1 || !index || !dataList.length}" :disabled="disabled" @tap="handleConfirm('3')">{{$t('button.zjxl')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -72,7 +72,7 @@
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import { confirmAction } from '@/utils/utils.js'
|
||||
import {getNextRegionsByPoint, selectMaterials, productBlanking} from '@/utils/getData4.js'
|
||||
import {getNextRegionsByPoint, getMaterialInfoByPoint, productBlanking} from '@/utils/getData4.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -113,6 +113,7 @@
|
||||
methods: {
|
||||
handleChange1 (e) {
|
||||
if (e) {
|
||||
this._getMaterialInfoByPoint()
|
||||
this._getNextRegionsByPoint()
|
||||
}
|
||||
},
|
||||
@@ -128,8 +129,8 @@
|
||||
this.options = []
|
||||
}
|
||||
},
|
||||
async _selectMaterials () {
|
||||
let res = await selectMaterials(this.val1)
|
||||
async _getMaterialInfoByPoint () {
|
||||
let res = await getMaterialInfoByPoint(this.val1)
|
||||
this.dataList = res.data
|
||||
// this.totalCount = res.totalElements
|
||||
// if (res.totalElements > 0) {
|
||||
@@ -184,8 +185,14 @@
|
||||
this.disabled = false
|
||||
},
|
||||
async handleConfirm(type) {
|
||||
if (!this.val1 || !this.dataList.length || !this.index) {
|
||||
return
|
||||
if (type === '3') {
|
||||
if (!this.val1 || !this.dataList.length || !this.index) {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if (!this.val1 || !this.dataList.length) {
|
||||
return
|
||||
}
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
|
||||
Reference in New Issue
Block a user