Commit cf8a0a74 authored by Damon's avatar Damon

feat: 完工配件信息回显

parent 4ad4f85b
...@@ -32,13 +32,13 @@ ...@@ -32,13 +32,13 @@
<script> <script>
import adjustParts from "@/components/select-parts/adjust" import adjustParts from "@/components/select-parts/adjust"
import arrMixin from './arrMixin' import stringMixin from './stringMixin'
export default { export default {
name: 'XhParts', name: 'XhParts',
components: { components: {
adjustParts adjustParts
}, },
mixins: [arrMixin], mixins: [stringMixin],
props: { props: {
orderId: { orderId: {
type: String, type: String,
...@@ -66,16 +66,16 @@ ...@@ -66,16 +66,16 @@
return process.uniEnv.qn_base_url + 'no_parts.png' return process.uniEnv.qn_base_url + 'no_parts.png'
}, },
}, },
created() { mounted() {
this.getWorkOrderParts() this.getWorkOrderParts()
}, },
methods: { methods: {
getWorkOrderParts() { getWorkOrderParts() {
this.lists = this.dataValue || [] this.lists = JSON.parse(this.dataValue) || []
}, },
partsChange(val, index) { partsChange(val, index) {
this.$set(this.lists[index], 'quantity', val) this.$set(this.lists[index], 'quantity', val)
this.valueChange(this.lists) this.valueChange(JSON.stringify(this.lists))
}, },
valChange(val) { valChange(val) {
val.forEach(v => { val.forEach(v => {
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
this.$set(this.lists, index, v) this.$set(this.lists, index, v)
} }
}) })
this.valueChange(this.lists) this.valueChange(JSON.stringify(this.lists))
}, },
toParts() { toParts() {
uni.navigateTo({ uni.navigateTo({
......
...@@ -23,33 +23,19 @@ ...@@ -23,33 +23,19 @@
return {} return {}
}, },
computed: { computed: {
valueTxt() {
let str = ''
const dataValue = this.dataValue
if(dataValue && dataValue.length>1){
str = '经度:'+dataValue[0]+','+'维度:'+dataValue[1]
}
return str
}
}, },
watch: {}, watch: {},
mounted() {}, mounted() {},
methods: { methods: {
scanCode(type){ scanCode(type){
const self = this const self = this
// qrCode 二维码;barCode 条形码
let scanType = type && [type] || ['qrCode']
uni.scanCode({ uni.scanCode({
// scanType: scanType,
success: function (res) { success: function (res) {
self.dataValue = res.result self.dataValue = res.result
self.valueChange(res.result) self.valueChange(res.result)
} }
}); });
}, }
// setValue(txt) {
// this.valueChange(this.dataValue)
// }
} }
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment