Commit cf8a0a74 authored by Damon's avatar Damon

feat: 完工配件信息回显

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