diff --git a/components/LinkScan.vue b/components/LinkScan.vue
index 709b59b..a2eccef 100644
--- a/components/LinkScan.vue
+++ b/components/LinkScan.vue
@@ -20,7 +20,7 @@
{{e}}
-
+
diff --git a/components/SearchBox.vue b/components/SearchBox.vue
index 239028a..71fa162 100644
--- a/components/SearchBox.vue
+++ b/components/SearchBox.vue
@@ -3,15 +3,15 @@
+ @focus="handleFocus"
+ @blur="handleBlur"
+ @confirm="handleSend">
-
-
-
-
+
+
@@ -21,7 +21,6 @@
export default {
data() {
return {
- cur: '',
focusState: false
};
},
@@ -30,97 +29,28 @@
event: 'input'
},
props: {
- value: String,
- seaShow: {
- type: Boolean,
- default: false
- },
- focused: {
- type: Boolean,
- default: false
- }
+ value: String
},
- watch: {
- focused() {
- this.focusState = this.focused
- },
- },
- mounted () {
- if (this.focused) {
- this.focusState = true
- }
- },
methods: {
- handleChange ($event) {
- this.cur = $event.target.value
- this.$emit('input', this.cur)
- this.$emit('handleChange', this.cur)
- if (this.focusState) {
- this.focusState = false
- }
+ handleFocus () {
+ this.focusState = true
},
- handleBlur () {
- this.focusState = false
- },
- toSearch () {
- this.$emit('toSearch', this.cur)
+ handleBlur (e) {
+ this.$emit('input', e.target.value)
+ // if (e.target.value.length) {
+ // this.$emit('handleChange', e.target.value)
+ // }
+ this.focusState = false
},
toDel () {
- this.cur = ''
this.$emit('input', '')
},
- toScan () {
- setTimeout(() => {
- this.focusState = true
- },0)
- setTimeout(() => {
- uni.hideKeyboard()
- }, 300)
- this.cur = ''
- this.$emit('input', '')
- },
- async toPhone() {
- // #ifdef APP-PLUS
- let status = await this.checkPermission();
- if (status !== 1) {
- return;
+ handleSend (e) {
+ this.$emit('input', e.target.value)
+ if (e.target.value.length) {
+ this.$emit('handleChange', e.target.value)
}
- // #endif
- uni.scanCode({
- success: (res) => {
- this.$emit('input', res.result)
- this.$emit('handleChange', res.result)
- },
- fail: (err) => {
- // uni.showToast({
- // title: '出错',
- // icon: 'none'
- // })
- }
- });
}
- // #ifdef APP-PLUS
- ,
- async checkPermission(code) {
- let status = permision.isIOS ? await permision.requestIOS('camera') :
- await permision.requestAndroid('android.permission.CAMERA');
-
- if (status === null || status === 1) {
- status = 1;
- } else {
- uni.showModal({
- content: "需要相机权限",
- confirmText: "设置",
- success: function(res) {
- if (res.confirm) {
- permision.gotoAppSetting();
- }
- }
- })
- }
- return status;
- }
- // #endif
}
}
diff --git a/pages/manage/mater-in-storage.vue b/pages/manage/mater-in-storage.vue
index 913ad07..05c86cf 100644
--- a/pages/manage/mater-in-storage.vue
+++ b/pages/manage/mater-in-storage.vue
@@ -57,7 +57,7 @@
-
+
@@ -97,12 +97,18 @@
},
async _handheldBlanking () {
this.disabled = true
- if (!this.val1 || !this.val2 || !this.val3) {
+ if (!this.val1 || !this.val2) {
this.disabled = false
return
}
+ let arr = []
+ this.dataList.map(el => {
+ if (el.order_code !== '' && el.material_qty !== '') {
+ arr.push(el)
+ }
+ })
try {
- let res = await handheldBlanking(this.val1, this.val3, this.val2, this.dataList)
+ let res = await handheldBlanking(this.val1, this.val3, this.val2, arr)
this.clearUp()
} catch (e) {
this.disabled = false
diff --git a/pages/manage/modify-process.vue b/pages/manage/modify-process.vue
index 0def976..5df7a5a 100644
--- a/pages/manage/modify-process.vue
+++ b/pages/manage/modify-process.vue
@@ -2,6 +2,18 @@
+
+
+
+ 载具号
+
+
+
+
+
+
@@ -35,7 +47,8 @@
-
+
+
@@ -53,6 +66,7 @@
data() {
return {
title: '',
+ val1: '',
options: [],
index: '',
disabled: false,
@@ -71,10 +85,9 @@
this.options.map(el => {
this.$set(el, 'text', el.label)
})
- this._fabOrders()
},
async _fabOrders () {
- let res = await fabOrders()
+ let res = await fabOrders(this.val1)
this.dataList = [...res.content]
},
selectChange (val) {
diff --git a/utils/getData2.js b/utils/getData2.js
index 0200e69..b38758e 100644
--- a/utils/getData2.js
+++ b/utils/getData2.js
@@ -65,9 +65,9 @@ export const handheldBlanking = (code, rcode, vcode, material) => request({
data: {device_code: code, region_code: rcode, vehicle_code: vcode, material: material}
})
// 修改订单工序
-export const fabOrders = (data) => request({
+export const fabOrders = (code) => request({
url:'api/fab/orders',
- data: data
+ data: {vehicle_code: code}
})
export const updateOrder = (data) => request({
url:'api/handheld/updateOrder',