绑定解绑
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
"name" : "欧伦",
|
||||
"appid" : "__UNI__DE2F207",
|
||||
"description" : "欧伦WMS手持系统",
|
||||
"versionName" : "1.0.8",
|
||||
"versionCode" : 108,
|
||||
"versionName" : "1.1.0",
|
||||
"versionCode" : 110,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
||||
@@ -12,6 +12,14 @@
|
||||
<search-box v-model="val2"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">地面站点</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<search-box v-model="val3"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">物料信息</span>
|
||||
@@ -60,14 +68,6 @@
|
||||
<NumberInput v-model="currentData.qty" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">地面站点</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<search-box v-model="val3"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">源单编码</span>
|
||||
|
||||
@@ -12,6 +12,14 @@
|
||||
<search-box v-model="val2"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">地面站点</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<search-box v-model="val3"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">物料信息</span>
|
||||
@@ -60,14 +68,6 @@
|
||||
<NumberInput v-model="currentData.qty" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">地面站点</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<search-box v-model="val3"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">源单编码</span>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !this.currentData.group_id || (this.isChecked && !this.index)}" :disabled="disabled" @tap="_confirm('1')">确认</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !(this.val1 && this.currentData.group_id && (this.isChecked || (!this.isChecked && this.index)))}" :disabled="disabled" @tap="_confirm('1')">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -105,7 +105,6 @@
|
||||
index: '',
|
||||
currentData: {},
|
||||
disabled: false,
|
||||
isDiff: false,
|
||||
isChecked: false
|
||||
};
|
||||
},
|
||||
@@ -120,7 +119,10 @@
|
||||
this.isChecked = !this.isChecked
|
||||
},
|
||||
clearUp () {
|
||||
this.code = ''
|
||||
this.val1 = ''
|
||||
this.currentData = {}
|
||||
this.isChecked = false
|
||||
this.index = ''
|
||||
this.disabled = false
|
||||
},
|
||||
selectChange (e) {
|
||||
@@ -157,11 +159,21 @@
|
||||
},
|
||||
async _confirm (type) {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.currentData.group_id) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (this.isChecked && !this.index) {
|
||||
// if (!this.val1 || !this.currentData.group_id) {
|
||||
// this.disabled = false
|
||||
// return
|
||||
// }
|
||||
// if (!this.isChecked) {
|
||||
// this.disabled = false
|
||||
// return
|
||||
// }
|
||||
// if(!(!this.isChecked && this.index)) {
|
||||
// this.disabled = false
|
||||
// return
|
||||
// }
|
||||
if (this.val1 && this.currentData.group_id && (this.isChecked || (!this.isChecked && this.index))) {
|
||||
// console.log(1)
|
||||
} else {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_bindOrUnbind('1')">绑定</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_bindOrUnbind('0')">解绑</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="toBind()">绑定</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val2}" :disabled="disabled" @tap="toUnbind()">解绑</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -63,12 +63,23 @@
|
||||
this.val2 = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _bindOrUnbind (type) {
|
||||
toBind () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
this._bindOrUnbind('1')
|
||||
},
|
||||
toUnbind () {
|
||||
this.disabled = true
|
||||
if (!this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
this._bindOrUnbind('0')
|
||||
},
|
||||
async _bindOrUnbind (type) {
|
||||
try {
|
||||
let res = await bindOrUnbind(this.val1, this.val2, type)
|
||||
if (res.code === '200') {
|
||||
|
||||
Reference in New Issue
Block a user