diff --git a/components/VNavigationBar.vue b/components/VNavigationBar.vue index 00718e1..b3a4c83 100644 --- a/components/VNavigationBar.vue +++ b/components/VNavigationBar.vue @@ -22,6 +22,9 @@ + + 新增 + @@ -53,6 +56,11 @@ export default { showClear: { type: Boolean, default: false + }, + //新增配件 + addWares:{ + type: Boolean, + default: false } }, mounted() { @@ -88,6 +96,9 @@ export default { }, clearNoReadFun(){ this.$emit('clearNoRead') + }, + addNewWares(){ + this.$emit('addNewWares') } } } diff --git a/pages-order/choosePeople/choosePeople.vue b/pages-order/choosePeople/choosePeople.vue index 0e3f6ea..68d1f38 100644 --- a/pages-order/choosePeople/choosePeople.vue +++ b/pages-order/choosePeople/choosePeople.vue @@ -176,16 +176,7 @@ export default { method: 'get', params: {ticketId: this.ticketId} }).then((res) => { - let thisList = res.data - thisList.map((item) => { - getDictTextByCodeAndValue("repair_work_type", item.workType).then(value => { - item.workTypeText = value - }).catch(error => { - item.workTypeText = "未知" - console.error(error); - }); - }) - this.list = thisList + this.list = res.data if (this.list.length > 0) { console.log(this.list[0].userId) this.checkedUserId = this.list[0].userId diff --git a/pages-repair/apply/applyForm.vue b/pages-repair/apply/applyForm.vue index 50cbd48..abdfe66 100644 --- a/pages-repair/apply/applyForm.vue +++ b/pages-repair/apply/applyForm.vue @@ -1,6 +1,6 @@ - + @@ -82,6 +82,8 @@ export default { onLoad(data) { this.userInfo = getUserInfo() this.ticketId = data.ticketId + }, + onShow(){ this.init() }, methods: { @@ -110,6 +112,7 @@ export default { this.pageList() }, init() { + this.tabs = [] //加载所有tab request({ url: '/admin-api/repair/wares/getAllTypeList', @@ -118,10 +121,12 @@ export default { console.log(res) if (res.code == 200 && res.data.length>0) { res.data.map((item)=>{ - this.tabs.push({ - name:item.name, - value:item.id - }) + if(item.id){ + this.tabs.push({ + name:item.name, + value:item.id + }) + } }) } }) @@ -276,6 +281,14 @@ export default { this.activeId = value this.onRefresherrefresh() }, + /** + * 添加新的配件 + */ + addNewWaresFun(){ + uni.navigateTo({ + url: '/pages-repair/apply/newWare' + }) + }, } } diff --git a/pages-repair/apply/newWare.vue b/pages-repair/apply/newWare.vue new file mode 100644 index 0000000..fa5a212 --- /dev/null +++ b/pages-repair/apply/newWare.vue @@ -0,0 +1,411 @@ + + + + + + + 配件名称 + + + + 所属分类 + + {{allTypeNameList[typeIndex]}} + + + + 计量单位 + + {{allUnitNameList[unitIndex]}} + + + + 规格型号 + + + + 来源 + + {{allFromNameList[fromIndex]}} + + + + 配件属性 + + {{allAttributeNameList[attributeIndex]}} + + + + 状态 + + + + {{ item.label }} + + + + + + 条形码 + + + + 商品编码 + + + + 适用子公司 + + + + + {{ item.corpName }} + + + + 适用车型 + + + + + + + 备注 + + + + + + + + + + + 保存 + + + + + + + diff --git a/pages-warehouse/home/home.vue b/pages-warehouse/home/home.vue index 141c256..01833b5 100644 --- a/pages-warehouse/home/home.vue +++ b/pages-warehouse/home/home.vue @@ -155,11 +155,12 @@ export default { url: '/pages/login/login' }) } else { + //直接取缓存中的用户信息 + this.userInfo = getUserInfo() if (!this.$msgSocket) { this.$startMsgSocket(getTenantId(), getStrData("userId")) } } - this.onRefresherrefresh() }, onShow() { if (!getToken()) { @@ -167,8 +168,6 @@ export default { url: '/pages/login/login' }) } else { - //直接取缓存中的用户信息 - this.userInfo = getUserInfo() this.onRefresherrefresh() this.getNoReadNum() this.getNoticeList() @@ -442,11 +441,10 @@ export default { } .body-top { - width: 686rpx; + //width: 686rpx; background: #FFFFFF; border-radius: 8rpx 8rpx 8rpx 8rpx; - margin: 0 auto; - padding: 30rpx 30rpx 0; + margin: 30rpx 30rpx 0; .body-top-search { height: 84rpx; diff --git a/pages.json b/pages.json index 7773820..c213dc5 100644 --- a/pages.json +++ b/pages.json @@ -163,6 +163,12 @@ "style": { "navigationBarTitleText": "" } + }, + { + "path": "apply/newWare", + "style": { + "navigationBarTitleText": "" + } }, { "path": "reviewList/reviewList",