二次确认
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-8 button-default" @tap="clearUp">{{$t('button.clear')}}</button>
|
||||
<button class="zd-col-15 button-primary" :class="{'button-info': !index3 || !index4}" :disabled="disabled" @tap="_sendPointTask">{{$t('button.confirm')}}</button>
|
||||
<button class="zd-col-15 button-primary" :class="{'button-info': !index3 || !index4}" :disabled="disabled" @tap="handleConfirm">{{$t('button.confirm')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -52,6 +52,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import { confirmAction } from '@/utils/utils.js'
|
||||
import {getStartRegions, getEndRegions, getPointnByRegion, sendPointTask} from '@/utils/getData4.js'
|
||||
export default {
|
||||
components: {
|
||||
@@ -143,12 +144,17 @@
|
||||
this.index4 = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _sendPointTask () {
|
||||
this.disabled = true
|
||||
async handleConfirm() {
|
||||
if (!this.index3 || !this.index4) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
this._sendPointTask()
|
||||
}
|
||||
},
|
||||
async _sendPointTask () {
|
||||
this.disabled = true
|
||||
try {
|
||||
let res = await sendPointTask(this.index3, this.index4)
|
||||
if (res.code === '200') {
|
||||
@@ -164,6 +170,7 @@
|
||||
})
|
||||
this.disabled = false
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !index}" :disabled="disabled" @tap="_inArea">进入</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled2" @tap="_outArea">退出</button> -->
|
||||
<button class="zd-col-7 button-primary" @tap="searchList">{{$t('button.search')}}</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !index}" :disabled="disabled" @tap="_inArea">{{$t('button.enter')}}</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled2" @tap="_outArea">{{$t('button.quit')}}</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !index}" :disabled="disabled" @tap="handleConfirm">{{$t('button.enter')}}</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled2" @tap="handleConfirm2">{{$t('button.quit')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -56,6 +56,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import { confirmAction } from '@/utils/utils.js'
|
||||
import {getChargeRegions, selectRegionInfo, inArea, outArea} from '@/utils/getData4.js'
|
||||
export default {
|
||||
components: {
|
||||
@@ -152,12 +153,17 @@
|
||||
this.pkId = e.create_name === this.pkId ? '' : e.create_name
|
||||
this.pkObj = this.pkId === e.create_name ? e : {}
|
||||
},
|
||||
async _inArea () {
|
||||
this.disabled = true
|
||||
async handleConfirm() {
|
||||
if (!this.index) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
this._inArea()
|
||||
}
|
||||
},
|
||||
async _inArea () {
|
||||
this.disabled = true
|
||||
try {
|
||||
let res = await inArea(this.index)
|
||||
if (res.code === '200') {
|
||||
@@ -177,12 +183,17 @@
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _outArea () {
|
||||
this.disabled2 = true
|
||||
async handleConfirm2() {
|
||||
if (!this.pkId) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
this._outArea()
|
||||
}
|
||||
},
|
||||
async _outArea () {
|
||||
this.disabled2 = true
|
||||
try {
|
||||
let res = await outArea(this.pkObj)
|
||||
if (res.code === '200') {
|
||||
|
||||
@@ -78,8 +78,8 @@
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled" @tap="_lock">锁定</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled2" @tap="_unlock">解锁</button> -->
|
||||
<button class="zd-col-8 button-primary" @tap="searchList">{{$t('button.search')}}</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled" @tap="_lock">{{$t('button.lock')}}</button>
|
||||
<button class="zd-col-6 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled2" @tap="_unlock">{{$t('button.unlock')}}</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled" @tap="handleConfirm">{{$t('button.lock')}}</button>
|
||||
<button class="zd-col-6 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled2" @tap="handleConfirm2">{{$t('button.unlock')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -87,6 +87,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import { confirmAction } from '@/utils/utils.js'
|
||||
import {getRegions, getPointInfo, lock, unlock} from '@/utils/getData4.js'
|
||||
export default {
|
||||
components: {
|
||||
@@ -181,12 +182,17 @@
|
||||
this.disabled = false
|
||||
this.disabled2 = false
|
||||
},
|
||||
async _lock () {
|
||||
this.disabled = true
|
||||
async handleConfirm() {
|
||||
if (!this.checkedArr.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
this._lock()
|
||||
}
|
||||
},
|
||||
async _lock () {
|
||||
this.disabled = true
|
||||
try {
|
||||
let res = await lock(this.checkedArr)
|
||||
if (res.code === '200') {
|
||||
@@ -200,18 +206,23 @@
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _unlock () {
|
||||
this.disabled2 = true
|
||||
async handleConfirm2() {
|
||||
if (!this.checkedArr.length) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
this._unlock()
|
||||
}
|
||||
},
|
||||
async _unlock () {
|
||||
this.disabled2 = true
|
||||
try {
|
||||
let res = await unlock(this.checkedArr)
|
||||
if (res.code === '200') {
|
||||
@@ -225,8 +236,8 @@
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled2 = false
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
|
||||
@@ -25,16 +25,6 @@
|
||||
<input type="text" class="filter_input" v-model="currentData.material_name" @tap="toJump">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-10">
|
||||
<!-- <span class="filter_label">用料数量</span> -->
|
||||
<span class="filter_label">{{$t('filter.material-use-number')}}</span>
|
||||
</view>
|
||||
<view class="zd-col-14">
|
||||
<input type="number" v-model="val3" class="filter_input">
|
||||
</view>
|
||||
<view class="zd-col-2"><span class="filter_unit">{{unit}}</span></view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-10">
|
||||
<!-- <span class="filter_label">叫料托盘数</span> -->
|
||||
@@ -50,7 +40,7 @@
|
||||
<!-- <button class="zd-col-6 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_loading">确认</button> -->
|
||||
<button class="zd-col-8 button-default" @tap="clearUp">{{$t('button.clear')}}</button>
|
||||
<button class="zd-col-14 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_loading">{{$t('button.confirm')}}</button>
|
||||
<button class="zd-col-14 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="handleConfirm">{{$t('button.confirm')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -58,6 +48,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import { confirmAction } from '@/utils/utils.js'
|
||||
import {getRegionByPoint, selectMaterialByRegion, loading} from '@/utils/getData4.js'
|
||||
export default {
|
||||
components: {
|
||||
@@ -69,8 +60,6 @@
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '1',
|
||||
val3: '',
|
||||
unit: '',
|
||||
currentData: {},
|
||||
options: [],
|
||||
pointCode: '',
|
||||
@@ -106,12 +95,6 @@
|
||||
url: '/pages/ftdl/mater-list-cxjl?title=查询物料'
|
||||
})
|
||||
},
|
||||
// selectChange (e) {
|
||||
// this.index = e
|
||||
// let selobj = this.options.find(item => item.value === this.index)
|
||||
// this.val3 = selobj.qty
|
||||
// this.unit = selobj.measure_unit_id
|
||||
// },
|
||||
handleChange1 (e) {
|
||||
if (e) {
|
||||
this._getRegionByPoint(e)
|
||||
@@ -138,14 +121,20 @@
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.pointCode = ''
|
||||
this.currentData = {}
|
||||
this.disabled = false
|
||||
},
|
||||
async handleConfirm() {
|
||||
if (!this.val1 || !this.val2) {
|
||||
return
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
this._loading()
|
||||
}
|
||||
},
|
||||
async _loading () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await loading(this.pointCode, this.val1, this.currentData.material_code, this.val2)
|
||||
if (res.code === '200') {
|
||||
@@ -159,8 +148,8 @@
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import { confirmAction } from '@/utils/utils.js'
|
||||
import {getNextRegions, selectMaterials, blanking} from '@/utils/getData4.js'
|
||||
export default {
|
||||
components: {
|
||||
@@ -229,14 +230,22 @@
|
||||
this.val1 = ''
|
||||
this.index = ''
|
||||
this.dataList = []
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
this.currentData = {}
|
||||
this.disabled = false
|
||||
},
|
||||
async handleConfirm() {
|
||||
if (!this.val1 || !this.dataList.length || !this.index) {
|
||||
return
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
this._blanking()
|
||||
}
|
||||
},
|
||||
async _blanking () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.dataList.length || !this.index) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await blanking(this.val1, this.dataList, this.index)
|
||||
if (res.code === '200') {
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="_comfirmGetting">确认取货</button> -->
|
||||
<button class="zd-col-8 button-default" @tap="clearUp">{{$t('button.clear')}}</button>
|
||||
<button class="zd-col-7 button-primary" @tap="searchList">{{$t('button.search')}}</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="_comfirmGetting">{{$t('button.confirm-quhuo')}}</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="handleConfirm">{{$t('button.confirm-quhuo')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -65,6 +65,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import { confirmAction } from '@/utils/utils.js'
|
||||
import {getMaterialInfoByPoint, comfirmGetting} from '@/utils/getData4.js'
|
||||
export default {
|
||||
components: {
|
||||
@@ -137,12 +138,17 @@
|
||||
this.status = 'noMore'
|
||||
}
|
||||
},
|
||||
async _comfirmGetting () {
|
||||
this.disabled = true
|
||||
async handleConfirm() {
|
||||
if (!this.val1 || !this.dataList.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
this._comfirmGetting()
|
||||
}
|
||||
},
|
||||
async _comfirmGetting () {
|
||||
this.disabled = true
|
||||
try {
|
||||
let res = await comfirmGetting(this.val1, this.dataList)
|
||||
if (res.code === '200') {
|
||||
|
||||
@@ -61,8 +61,8 @@
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="_materialBinding">物料绑定</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1}" :disabled="disabled2" @tap="_vehicleBinding">空载具绑定</button> -->
|
||||
<button class="zd-col-8 button-primary" @tap="searchList">{{$t('button.search')}}</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="_materialBinding">{{$t('button.material-bind')}}</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1}" :disabled="disabled2" @tap="_vehicleBinding">{{$t('button.empty-vehicle-bind')}}</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="handleConfirm">{{$t('button.material-bind')}}</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1}" :disabled="disabled2" @tap="handleConfirm2">{{$t('button.empty-vehicle-bind')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -70,6 +70,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import { confirmAction } from '@/utils/utils.js'
|
||||
import {selectMaterialByPointCode, materialBinding, vehicleBinding} from '@/utils/getData4.js'
|
||||
export default {
|
||||
components: {
|
||||
@@ -215,6 +216,8 @@
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.dataList = []
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
this.disabled = false
|
||||
this.disabled2 = false
|
||||
},
|
||||
@@ -255,12 +258,17 @@
|
||||
this.status = 'noMore'
|
||||
}
|
||||
},
|
||||
async _materialBinding () {
|
||||
this.disabled = true
|
||||
async handleConfirm() {
|
||||
if (!this.val1 || !this.dataList.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
this._materialBinding()
|
||||
}
|
||||
},
|
||||
async _materialBinding () {
|
||||
this.disabled = true
|
||||
try {
|
||||
let res = await materialBinding(this.val1, this.dataList)
|
||||
if (res.code === '200') {
|
||||
@@ -282,12 +290,17 @@
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _vehicleBinding() {
|
||||
this.disabled2 = true
|
||||
async handleConfirm2() {
|
||||
if (!this.val1) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
this._vehicleBinding()
|
||||
}
|
||||
},
|
||||
async _vehicleBinding() {
|
||||
this.disabled2 = true
|
||||
try {
|
||||
let res = await vehicleBinding(this.val1)
|
||||
if (res.code === '200') {
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_againTask">重新下发</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled2" @tap="_forceConfirm">强制完成</button> -->
|
||||
<button class="zd-col-8 button-primary" @tap="searchList">{{$t('button.search')}}</button>
|
||||
<!-- <button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_againTask">{{$t('button.reissue')}}</button> -->
|
||||
<!-- <button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled2" @tap="_forceConfirm">{{$t('button.force-complete')}}</button> -->
|
||||
<!-- <button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="handleConfirm">{{$t('button.reissue')}}</button> -->
|
||||
<!-- <button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled2" @tap="handleConfirm2">{{$t('button.force-complete')}}</button> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -62,6 +62,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import { confirmAction } from '@/utils/utils.js'
|
||||
import {queryTask, againTask, forceConfirm} from '@/utils/getData4.js'
|
||||
export default {
|
||||
components: {
|
||||
@@ -139,13 +140,19 @@
|
||||
this.pkId = ''
|
||||
this.dataList = []
|
||||
this.disabled = false
|
||||
this.disabled2 = false
|
||||
},
|
||||
async handleConfirm() {
|
||||
if (!this.pkId) {
|
||||
return
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
this._againTask()
|
||||
}
|
||||
},
|
||||
async _againTask () {
|
||||
this.disabled = true
|
||||
if (!this.pkId) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await againTask(this.pkId)
|
||||
if (res.code === '200') {
|
||||
@@ -165,12 +172,17 @@
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _forceConfirm () {
|
||||
this.disabled2 = true
|
||||
async handleConfirm2() {
|
||||
if (!this.pkId) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
this._forceConfirm()
|
||||
}
|
||||
},
|
||||
async _forceConfirm () {
|
||||
this.disabled2 = true
|
||||
try {
|
||||
let res = await forceConfirm(this.pkId)
|
||||
if (res.code === '200') {
|
||||
|
||||
Reference in New Issue
Block a user