diff --git a/components/applyCard.vue b/components/applyCard.vue index c6f2404..d46dbbc 100644 --- a/components/applyCard.vue +++ b/components/applyCard.vue @@ -1,19 +1,21 @@ @@ -32,7 +34,13 @@ export default { default: () => { return {} } - } + }, + titleText: { + type: String, + default: () => { + return "" + } + }, }, data() { return { diff --git a/components/projectPicker.vue b/components/projectPicker.vue index a691363..c3aef62 100644 --- a/components/projectPicker.vue +++ b/components/projectPicker.vue @@ -34,15 +34,15 @@ + + + + {{ item.name }} - - - - @@ -245,6 +245,7 @@ export default { .type { width: 200rpx; + overflow-y: scroll; background: #FFFFFF; .typeItem { @@ -261,7 +262,7 @@ export default { .container { flex: 1; width: 0; - + overflow-y: scroll; padding: 30rpx; .groupList { @@ -283,11 +284,14 @@ export default { } .projList { - padding: 40rpx 0; + padding-bottom: 40rpx; display: flex; flex-direction: column; row-gap: 40rpx; + .addProj{ + text-align: right; + } .projItem { display: flex; align-items: center; diff --git a/pages-order/addOrder/addOrder.vue b/pages-order/addOrder/addOrder.vue index 3e21e31..ea6c77f 100644 --- a/pages-order/addOrder/addOrder.vue +++ b/pages-order/addOrder/addOrder.vue @@ -7,14 +7,6 @@ 查找手机号 根据手机号查找/建立客户信息 - - - - - @@ -26,7 +18,15 @@ - + + 单据类型 + + + + @@ -162,8 +162,8 @@ diff --git a/pages-repair/applyList/applyList.vue b/pages-repair/applyList/applyList.vue index 4fb155b..47cbae1 100644 --- a/pages-repair/applyList/applyList.vue +++ b/pages-repair/applyList/applyList.vue @@ -12,7 +12,7 @@ - + @@ -86,6 +86,8 @@ onLoad(){ this.userInfo = getUserInfo() console.log(this.userInfo) + }, + onShow(){ this.getOrderList() }, methods:{ @@ -126,10 +128,15 @@ uni.navigateTo({ url: '/pages-repair/applyList/todoDetail?viewType=apply&id='+item.id }) - }else{ - //领料单\退料单详情 + }else if(2==this.activeKey){ + //领料单详情 uni.navigateTo({ - url: '/pages-repair/applyList/todoDetail?viewType=receive&id='+item.id + url: '/pages-repair/applyList/todoDetail?viewType=receive&canOperate=true&id='+item.id + }) + }else { + //退料单详情 + uni.navigateTo({ + url: '/pages-repair/applyList/todoDetail?viewType=back&canOperate=true&id='+item.id }) } }, diff --git a/pages-repair/applyList/todoDetail.vue b/pages-repair/applyList/todoDetail.vue index 93c395c..d792309 100644 --- a/pages-repair/applyList/todoDetail.vue +++ b/pages-repair/applyList/todoDetail.vue @@ -1,10 +1,10 @@ @@ -44,6 +52,10 @@ export default { return { viewType:"", id:"", + title:"", + canOperate:false, + backText:"", + yesText:"", repairList: [ // { // name: '7字小钩', @@ -66,6 +78,7 @@ export default { }, onLoad(data){ this.viewType = data.viewType + this.canOperate = data.canOperate this.id = data.id this.getDetail() }, @@ -74,31 +87,116 @@ export default { let url; let params={}; if("apply"==this.viewType){ + this.title = "配件申请单详情" //配件申请单 url = "/admin-api/repair/twi/list" params.twId = this.id }else{ + if("receive"==this.viewType){ + //领料 + this.title = "领料单详情" + this.yesText="我已领料" + this.backText="未领料(拒绝)" + }else{ + this.title = "退料单详情" + this.yesText="我已退料" + this.backText="未退料(拒绝)" + } //领料单、退料单 - + url = "/admin-api/repair/so/get" + params.id = this.id } request({ url: url, method: 'get', params:params }).then((res) => { - if (res.code == 200 && res.data.length>0) { - this.repairList = res.data - this.repairList.map((item)=>{ - getDictTextByCodeAndValue("repair_unit",item.wares.unit).then(value => { - item.wares.unit = value - }).catch(error => { - item.wares.unit = "未知" - console.error(error); - }); - }) + if (res.code == 200) { + if("apply"==this.viewType){ + //配件申请单 + res.data.map((item)=>{ + getDictTextByCodeAndValue("repair_unit",item.wares.unit).then(value => { + item.wares.unit = value + }).catch(error => { + item.wares.unit = "未知" + console.error(error); + }); + }) + this.repairList = res.data + }else{ + //领料单、退料单 + let goodsList = res.data.goodsList + let thisRepairList = [] + goodsList.map((item)=>{ + getDictTextByCodeAndValue("repair_unit",item.wares.unit).then(value => { + item.wares.unit = value + }).catch(error => { + item.wares.unit = "未知" + console.error(error); + }); + thisRepairList.push({ + waresName:item.wares.name, + waresCount:item.goodsCount, + typeName:item.typeName, + wares:item.wares + }) + }) + this.repairList = thisRepairList + console.log(this.repairList,"this.repairList") + } } }) }, + confirmOpe(type){ + if("yes"==type){ + let url; + let params={id:this.id}; + if("receive"==this.viewType) { + //领料 + url = "/admin-api/repair/so/confirmGet" + }else{ + //退料 + url = "/admin-api/repair/so/confirmBack" + } + request({ + url: url, + method: 'get', + params:params + }).then((res) => { + if (res.code == 200) { + uni.showToast({ + title: '操作成功!', + icon: 'none' + }) + setTimeout(() => { + uni.navigateBack() + }, 700) + } + }) + }else{ + //作废单据 + let url = "/admin-api/repair/so/void" + let dataObj={ + id:this.id, + soStatus:'06' + } + request({ + url: url, + method: 'POST', + data:dataObj + }).then((res) => { + if (res.code == 200) { + uni.showToast({ + title: '操作成功!', + icon: 'none' + }) + setTimeout(() => { + uni.navigateBack() + }, 700) + } + }) + } + }, } } diff --git a/pages-warehouse/todoDetail/todoDetail.vue b/pages-warehouse/todoDetail/todoDetail.vue index 9df76a7..71f7ea0 100644 --- a/pages-warehouse/todoDetail/todoDetail.vue +++ b/pages-warehouse/todoDetail/todoDetail.vue @@ -23,7 +23,7 @@ - 部件信息 + 配件信息 {{ item.name }} ×{{item.num}}