diff --git a/manifest.json b/manifest.json index 135649f..00c8ba7 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "护理单元", "appid" : "__UNI__FB2D473", "description" : "护理单元", - "versionName" : "1.7.1", - "versionCode" : 171, + "versionName" : "1.7.2", + "versionCode" : 172, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/pages/Warehouse/api/lunpan.js b/pages/Warehouse/api/lunpan.js index bf7f172..77d9c36 100644 --- a/pages/Warehouse/api/lunpan.js +++ b/pages/Warehouse/api/lunpan.js @@ -108,3 +108,12 @@ export const voidedCgdMain = (params) => { data: params, }) } + +//修改库房物料是否启用 +export const updateWarehouserEnabled = (params) => { + return request({ + url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/updateWarehouserEnabled`, + method: 'post', + data: params, + }) +} \ No newline at end of file diff --git a/pages/Warehouse/procurement.vue b/pages/Warehouse/procurement.vue index 733759a..521fdb5 100644 --- a/pages/Warehouse/procurement.vue +++ b/pages/Warehouse/procurement.vue @@ -48,11 +48,13 @@ - {{v.materialName}} - 规格型号: {{v.specificationModel}} + + {{v.materialName}} + 采购单位: {{v.materialUnits}} + 规格型号: {{v.specificationModel}} {{caigouobj.materialName}} - + + {{caigouobj.izEnabled_dictText}} + 物料编码: {{caigouobj.materialNo}} @@ -340,7 +344,17 @@ - {{wuliaoobj.materialName}} + + {{wuliaoobj.materialName}} + + + + + {{caigouobj.izEnabled_dictText}} + + + import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineProps } from 'vue'; - import { queryInvoicingList, getMaterialTreeData, queryNuInfoByNuId, updateKfstatus,queryWlInfoByWlId,addShoppingCartList,queryShoppingCartList } from './api/lunpan.js' + import { queryInvoicingList,updateWarehouserEnabled, getMaterialTreeData, queryNuInfoByNuId, updateKfstatus,queryWlInfoByWlId,addShoppingCartList,queryShoppingCartList } from './api/lunpan.js' import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app" import shadowview from './components/ShadowView.vue'; import calculator from './components/calculator.vue'; @@ -443,6 +457,23 @@ } }) } + const caiswitchshyp = (code:string,id:string,s:string) =>{ + let obj = { + id:id, + izEnabled: code=='0' ? '1' : '0' + } + updateWarehouserEnabled(obj).then(res => { + if (res.success) { + caigouobj.value.izEnabled = (code=='0' ? '1' : '0'); + caigouobj.value.izEnabled_dictText = (code =='0' ? '停用' : '启用'); + } else { + uni.showToast({ + icon: 'error', + title: res.message + }) + } + }) + } const shopclick = (i : number, k : number) => { if (k == 2) { let num = Math.ceil((i + 1) / 2) @@ -709,6 +740,16 @@ gysarr.value = []; caigouobj.value = InvoicingList.value[shopitem.value]; caigouobj.value.Limitnum = Number(caigouobj.value?.upperLimit)-Number(caigouobj.value.kcsl); + if(shyp.value==false){ + uni.showToast({ + icon:'none', + title:'该仓库已关闭,无法采购~' + }) + setTimeout(()=>{ + anmidex.value = -1; + },1000) + return + } let n = []; let id = []; n = caigouobj.value.suppliers_dictText.split(/[, ]+/); @@ -725,8 +766,9 @@ anmidex.value = -1; break; case 3: + caigouobj.value = InvoicingList.value[shopitem.value]; let obj = { - wlId:InvoicingList.value[shopitem.value].wlId, + wlId:caigouobj.value.wlId, nuId:form.nuId } queryWlInfoByWlId(obj).then(res=>{ @@ -757,6 +799,13 @@ const timers = ref(true) const connfig = () =>{ if(timers.value==false){return} + if(caigouobj.value.izEnabled=='1'){ + uni.showToast({ + icon:'none', + title:'该物料已关闭,无法采购~' + }) + return + } timers.value=false; let dt = { nuId:form.nuId, @@ -967,11 +1016,29 @@ .name { width: 100%; - font-weight: bold; - font-size: 1.4vw; - color: #212327; height: 3vw; - line-height: 1.5vw; + display: flex; + justify-content: space-between; + align-items: center; + view{ + >&:nth-child(1){ + width: 80%; + height: 3vw; + font-weight: bold; + font-size: 1.4vw; + color: #212327; + line-height: 1.5vw; + } + >&:nth-child(2){ + width: 20%; + display: flex; + flex-direction: column; + align-items: center; + text{ + color: #333; + } + } + } } } @@ -1953,7 +2020,7 @@ background: rgba(255, 255, 255, .7); border-radius: 1.6vw; margin: 0 1.3vw 1.2vw 0; - border: 2px dashed #fff; + border: 2px solid #fff; display: inline-block; padding: 2.3vw; position: relative; @@ -1976,13 +2043,16 @@ &:nth-child(1) { - font-weight: bold; - font-size: 1.5vw; color: #333; + width: 100%; + display: flex; + justify-content: space-between; white-space: nowrap; overflow: hidden; - width: 100%; text-overflow: ellipsis; + font-weight: bold; + font-size: 1.5vw; + } &:nth-child(2) { @@ -2084,10 +2154,18 @@ } } + + .ty{ + background: #e8e9ed !important; + border: 2px solid #f5f5f5; + view{ + color: #666666 !important; + } + } + .active { border: 2px dashed #017DE9 !important; } - .swsh { width: 2.7vw; height: 1.5vw;