|
@@ -37,6 +37,7 @@
|
|
|
<u-button size="medium" hover-class="none" shape="circle" :custom-style="customBtnStyle" @click="handleSearch">查询</u-button>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <scanCode></scanCode>
|
|
|
<!-- 产品品牌 -->
|
|
|
<productBrand ref="productBrand" :openModal="brandModal" :itemSn="form.productBrandSn" @choose="brandChoose" @clean="brandClean" @close="brandModal=false" />
|
|
|
<!-- 产品分类 -->
|
|
@@ -45,11 +46,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import scanCode from '@/libs/scan-code.vue';
|
|
|
import productBrand from '@/pages/common/productBrand.vue'
|
|
|
import productType from '@/pages/common/productType.vue'
|
|
|
import { dealerProductTypeList , stockCount } from '@/config/api'
|
|
|
export default{
|
|
|
- components: { productBrand, productType },
|
|
|
+ components: { productBrand, productType, scanCode },
|
|
|
data(){
|
|
|
return {
|
|
|
form: {
|
|
@@ -95,6 +97,16 @@
|
|
|
uni.setStorageSync('productEnabledFlag-' + this.$store.state.vuex_userData.orgId, newValue)
|
|
|
},
|
|
|
},
|
|
|
+ onLoad() {
|
|
|
+ var _this = this
|
|
|
+ uni.$on('scancodedate', function(content) {
|
|
|
+ console.log("扫描到的内容为:", content)
|
|
|
+ _this.form.qrCode = content||''
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onUnload() {
|
|
|
+ uni.$off('scancodedate')
|
|
|
+ },
|
|
|
onShow() {
|
|
|
// 是否默认包括禁用产品
|
|
|
const a = uni.getStorageSync('productEnabledFlag-' + this.$store.state.vuex_userData.orgId)
|