diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 5c90f56..29998cf 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -2,7 +2,7 @@ "version" : "1.0", "configurations" : [ { - "customPlaygroundType" : "device", + "customPlaygroundType" : "local", "playground" : "custom", "type" : "uni-app:app-android" } diff --git a/pages/Warehouse/components/calculator.vue b/pages/Warehouse/components/calculator.vue index e5a0600..79c738f 100644 --- a/pages/Warehouse/components/calculator.vue +++ b/pages/Warehouse/components/calculator.vue @@ -19,12 +19,13 @@ - - 确认 - 取消 + + 确认 + + diff --git a/pages/Warehouse/procurecart.vue b/pages/Warehouse/procurecart.vue index ea458ff..3461b84 100644 --- a/pages/Warehouse/procurecart.vue +++ b/pages/Warehouse/procurecart.vue @@ -82,7 +82,7 @@ - + @@ -293,14 +293,19 @@ 提示 - - - + + 是否删除? + + + 是否清空所有物料? + + + {{i+1}}、{{v}}
取消 - 确认 确认 + 确认
@@ -337,7 +342,7 @@ const form = reactive({ nuId: '', pageNo: 1, - pageSize: 9, + pageSize: 10, categoryId: '', typeId: '', medicationId: '', @@ -500,7 +505,7 @@ queryShoppingCartList(form).then(res => { res.result.records.forEach((item,i)=>{ item.flag = false - if(i==0){ + if(i==0&&form.pageNo == 1){ item.flag = true } }) @@ -589,78 +594,132 @@ } const anmidex = ref(-1) const generatedOrder = ref([]) - const delstr = ref('') + const delstr = ref([]) + const tmr = ref(true) const admiclick = (i : number) => { - if (anmidex.value == 2) { - anmidex.value = -1 - } else { + if(tmr.value == false){return} + tmr.value = false; anmidex.value = i; switch (i) { case 0: + if(InvoicingList.value.length==0){ + uni.showToast({ + title:'请选择物料~', + icon:'none' + }) + anmidex.value = -1; + tmr.value = true; + return + } InvoicingList.value[shopitem.value].flag = !InvoicingList.value[shopitem.value].flag; setTimeout(()=>{ - anmidex.value = -1 + anmidex.value = -1; + tmr.value = true; },1000) break; - case 1: + case 2: let arr = []; InvoicingList.value.forEach(item=>{ if(item.flag){ arr.push(item) } }) + if(arr.length==0){ + uni.showToast({ + title:'请选择物料~', + icon:'none' + }) + tmr.value = true; + anmidex.value = -1; + return + } + tmr.value = true; generatedPurchaseViewOrder(arr).then(res=>{ - generatedOrder.value = res.result + generatedOrder.value = res.result; }) - cgd.value = true - break; - case 2: - queryWlInfo(); + cgd.value = true; break; case 3: - let str = '' + if(InvoicingList.value.length==0){ + uni.showToast({ + title:'请选择物料~', + icon:'none' + }) + tmr.value = true; + anmidex.value = -1; + return + } + tmr.value = true; + queryWlInfo(); + break; + case 4: let a = [] InvoicingList.value.forEach((item,i)=>{ if(item.flag){ - str+='
'+' · '+item.wlName; - a.push(item) + a.push(item.wlName) } }) if(a.length==0){ uni.showToast({ - title:'购物车暂无物料~', + title:'请选择物料~', icon:'none' }) + tmr.value = true; + anmidex.value = -1; return } - delstr.value = '是否删除'+str + tmr.value = true; + delstr.value = a ; tost.value = true; - break; - case 4: + case 5: if(InvoicingList.value.length==0){ uni.showToast({ title:'购物车已清空~', icon:'none' }) + tmr.value = true; + anmidex.value = -1; return - } - delstr.value = ' 是否清空购物车? ' + } + tmr.value = true; tost.value = true; break; - case 5: - uni.navigateTo({ - url:'/pages/Warehouse/procurecart' - }) + case 1: + let arrs = []; + if(InvoicingList.value.length==0){ + uni.showToast({ + title:'购物车为空~', + icon:'none' + }) + tmr.value = true; + anmidex.value = -1; + return + } + InvoicingList.value.forEach((item,i)=>{ + if(item.flag){ + arrs.push(i) + }else{ + item.flag = true; + } + }) + if(arrs.length==InvoicingList.value.length){ + InvoicingList.value.forEach((item,i)=>{ + item.flag = false; + }) + } + setTimeout(()=>{ + anmidex.value = -1; + tmr.value = true; + },1000) break; default: break; } - } } const del = (e:number)=>{ - if(e==3){ + if(e==4){ let arr = []; let delstr = ''; InvoicingList.value.forEach((item,i)=>{ @@ -670,17 +729,25 @@ } }) if(delstr.indexOf(",")>-1) delstr = delstr.substring(0,delstr.length-1) - arr.sort((a, b) => b - a) deleteQgInfoById(delstr).then(res=>{ uni.showToast({ icon:res.success?'success':'none', title:res.message }) if(res.success){ - arr.forEach(item=>{ - InvoicingList.value.splice(item,1) + form.pageNo = 1; + queryShoppingCartList(form).then(res => { + res.result.records.forEach((item,i)=>{ + item.flag = false + if(i==0){ + item.flag = true + } + }) + InvoicingList.value = []; + InvoicingList.value.push(...res.result.records); + status.value = res.result.total == InvoicingList.value.length ? 'nomore' : 'loadmore' + qingkong() }) - qingkong() } }) }else{ @@ -722,6 +789,18 @@ name: '选择/取消', imgurl: '/static/index/warehouse/procurement/select/select1.png' }, + { + url: genPaths( + '/static/index/warehouse/procurement/ctrl', + 'Ctrl', + 9, // 张数 + 'png', + 0, // 起始索引为 1 + false // 不补零 + ), + name: '全选', + imgurl: '/static/index/warehouse/procurement/select/Ctrl0.png' + }, { url: genPaths( '/static/index/warehouse/procurement/procure', @@ -807,12 +886,18 @@ } } .cont{ + width: 70%; + font-size: 1.3vw; + margin: 0.5vw auto 0; + max-height: 21.5vh; + overflow-y: scroll; + } + .xunw{ width: 100%; font-size: 1.3vw; margin: 0.5vw auto 0; - overflow-y: scroll; - max-height: 23.5vh; text-align: center; + font-weight: 600; } .tit{ width: 100%; @@ -1105,7 +1190,7 @@ } .life { - width: 60%; + width: 66%; height: 2vw; margin: 0 auto 3vw; display: flex; @@ -1123,6 +1208,7 @@ font-size: .9vw; color: #555555; margin-left: .6vw; + white-space: nowrap; } } @@ -1249,10 +1335,6 @@ background: #FFFFFF; margin: 0.25vw 0; border-radius: 1.6vw; - &:nth-child(1),&:nth-child(2){ - width: 12.5vw; - } - view { margin-right: .4vw; diff --git a/pages/Warehouse/procurement.vue b/pages/Warehouse/procurement.vue index 6cc6c27..733759a 100644 --- a/pages/Warehouse/procurement.vue +++ b/pages/Warehouse/procurement.vue @@ -163,7 +163,7 @@ - + @@ -217,7 +217,7 @@ - + @@ -278,7 +278,7 @@ - - + {{caigouobj.Limitnum}} @@ -422,7 +422,8 @@ categoryId: '', typeId: '', medicationId: '', - wlParamInfo: '' + wlParamInfo: '', + isWaring:0 }) const switchshyp = () => { let obj = { @@ -514,6 +515,7 @@ crk.value = false; wlxq.value = false; gysnum.value = false; + gysflag.value = false; } const colse = () => { @@ -620,14 +622,14 @@ break; case 1: // → - shopitem.value = shopitem.value > InvoicingList.value.length ? shopitem.value = 0 : shopitem.value + 1 + shopitem.value = shopitem.value >= InvoicingList.value.length -1? shopitem.value = 0 : shopitem.value + 1 break; case 2: // 下 - shopitem.value = shopitem.value > InvoicingList.value.length ? shopitem.value = 0 : shopitem.value + 3 + shopitem.value = shopitem.value >= InvoicingList.value.length-3 ? shopitem.value = 0 : shopitem.value + 3 break; case 3: - shopitem.value = shopitem.value == 0 ? shopitem.value = InvoicingList.value.length : shopitem.value - 1 + shopitem.value = shopitem.value == 0 ? shopitem.value = InvoicingList.value.length-1 : shopitem.value - 1 // ← break; case 4: @@ -675,15 +677,38 @@ return } if (anmidex.value == i) { - anmidex.value = -1 + if(i==0){ + animArray.value[0].flag = false; + form.isWaring = 0; + form.pageNo = 1; + InvoicingList.value = []; + queryInvo(); + } + anmidex.value = -1; } else { anmidex.value = i; switch (i) { case 0: + animArray.value[0].flag = !animArray.value[0].flag; + if(animArray.value[0].flag == true){ + form.isWaring = 1; + form.pageNo = 1; + InvoicingList.value = []; + shopitem.value = 0; + }else{ + anmidex.value = -1; + form.isWaring = 0; + form.pageNo = 1; + InvoicingList.value = []; + shopitem.value = 0; + } + queryInvo(); + break; case 1: + gysarr.value = []; caigouobj.value = InvoicingList.value[shopitem.value]; - caigouobj.value.Limitnum = Number(caigouobj.value.upperLimit)-Number(caigouobj.value.kcsl); + caigouobj.value.Limitnum = Number(caigouobj.value?.upperLimit)-Number(caigouobj.value.kcsl); let n = []; let id = []; n = caigouobj.value.suppliers_dictText.split(/[, ]+/); @@ -697,7 +722,7 @@ uni.navigateTo({ url:'/pages/Warehouse/purchaseorder' }) - + anmidex.value = -1; break; case 3: let obj = { @@ -738,8 +763,10 @@ purchaseQuantity:caigouobj.value.Limitnum, suppliersId:gysarr.value[gysidnum.value].id, suppliersName:gysarr.value[gysidnum.value].name, - wlId:caigouobj.value.wlId + wlId:caigouobj.value.wlId, + kcsl:caigouobj.value.kcsl } + console.log(dt) addShoppingCartList([dt]).then(res=>{ uni.showToast({ icon:res.success?'success':'none', @@ -756,7 +783,12 @@ } const carnum = ref(0) const shoppcar=()=>{ - queryShoppingCartList(form).then(resr=>{ + let c = { + nuId: form.nuId, + pageNo: 1, + pageSize: 10 + } + queryShoppingCartList(c).then(resr=>{ carnum.value = resr.result.total }) } @@ -771,7 +803,8 @@ false // 不补零 ), name: '库存预警', - imgurl: '/static/index/warehouse/procurement/store/store01.png' + imgurl: '/static/index/warehouse/procurement/store/store01.png', + flag:false, }, { url: genPaths( @@ -904,12 +937,12 @@ } .life { - width: 60%; + width: 66%; height: 2vw; margin: 0 auto 3vw; display: flex; justify-content: space-around; - + flex: 1; view { width: 5.3vw; height: 1.8vw; @@ -922,6 +955,7 @@ font-size: .9vw; color: #555555; margin-left: .6vw; + white-space: nowrap; } } @@ -1418,6 +1452,7 @@ height: 100%; display: flex; justify-content: space-between; + white-space: nowrap; &:nth-child(2) { display: flex; @@ -1434,6 +1469,7 @@ margin-left: 2.1vw; margin-top: -0.2vw; padding-right: 2.1vw; + white-space: nowrap; .l { color: rgba(3, 133, 250, 1); diff --git a/pages/Warehouse/purchaseorder.vue b/pages/Warehouse/purchaseorder.vue index a6ec249..4973abf 100644 --- a/pages/Warehouse/purchaseorder.vue +++ b/pages/Warehouse/purchaseorder.vue @@ -57,13 +57,13 @@ 规格型号: {{v.wlMaterialNo}} 采购金额: - {{(v.kcsl * Number(v.procurementPrice)).toFixed(2) }} + {{(v.purchaseQuantity * Number(v.procurementPrice)).toFixed(2) }} 采购数量: - {{v.kcsl }} + {{v.purchaseQuantity }} {{ `(${v.wlUnits})` }} @@ -87,7 +87,7 @@ mode="aspectFill"> - {{v.purchaseQuantity}} + {{v.kcsl}} 库存数量 @@ -470,6 +470,7 @@ InvoicingList.value = []; leftitem.value = saveleftgo.value; shopitem.value = -1; + form.cgdId = plsbuy.value[leftitem.value].id queryInvo(); } onLoad(() => { @@ -587,6 +588,8 @@ const queryInvo = () => { // console.log("form", form) queryCgdInfoList(form).then(res => { + console.log(form) + console.log(res.result) InvoicingList.value.push(...res.result.records); // console.log("chu", InvoicingList.value) detailform.wlId = InvoicingList.value[0].wlId @@ -718,31 +721,7 @@ default: break; } - // if (anmidex.value == i) { - // anmidex.value = -1 - // } else { - // anmidex.value = i; - // switch (i) { - // case 0: - // break; - // case 1: - // // gys.value = true - // shareToWeixin() - // break; - // case 2: - // break; - // case 3: - // break; - // case 4: - // // crk.value = true - // break; - // case 5: - // break; - - // default: - // break; - // } - // } + } const badshow = ref(false); const donghuacs = ref(false); diff --git a/static/index/warehouse/procurement/ctrl/Ctrl0.png b/static/index/warehouse/procurement/ctrl/Ctrl0.png new file mode 100644 index 0000000..e319c54 Binary files /dev/null and b/static/index/warehouse/procurement/ctrl/Ctrl0.png differ diff --git a/static/index/warehouse/procurement/ctrl/Ctrl1.png b/static/index/warehouse/procurement/ctrl/Ctrl1.png new file mode 100644 index 0000000..fd73882 Binary files /dev/null and b/static/index/warehouse/procurement/ctrl/Ctrl1.png differ diff --git a/static/index/warehouse/procurement/ctrl/Ctrl2.png b/static/index/warehouse/procurement/ctrl/Ctrl2.png new file mode 100644 index 0000000..1195562 Binary files /dev/null and b/static/index/warehouse/procurement/ctrl/Ctrl2.png differ diff --git a/static/index/warehouse/procurement/ctrl/Ctrl3.png b/static/index/warehouse/procurement/ctrl/Ctrl3.png new file mode 100644 index 0000000..fa9c90c Binary files /dev/null and b/static/index/warehouse/procurement/ctrl/Ctrl3.png differ diff --git a/static/index/warehouse/procurement/ctrl/Ctrl4.png b/static/index/warehouse/procurement/ctrl/Ctrl4.png new file mode 100644 index 0000000..44206bc Binary files /dev/null and b/static/index/warehouse/procurement/ctrl/Ctrl4.png differ diff --git a/static/index/warehouse/procurement/ctrl/Ctrl5.png b/static/index/warehouse/procurement/ctrl/Ctrl5.png new file mode 100644 index 0000000..a6c91af Binary files /dev/null and b/static/index/warehouse/procurement/ctrl/Ctrl5.png differ diff --git a/static/index/warehouse/procurement/ctrl/Ctrl6.png b/static/index/warehouse/procurement/ctrl/Ctrl6.png new file mode 100644 index 0000000..cd9910b Binary files /dev/null and b/static/index/warehouse/procurement/ctrl/Ctrl6.png differ diff --git a/static/index/warehouse/procurement/ctrl/Ctrl7.png b/static/index/warehouse/procurement/ctrl/Ctrl7.png new file mode 100644 index 0000000..56fd91c Binary files /dev/null and b/static/index/warehouse/procurement/ctrl/Ctrl7.png differ diff --git a/static/index/warehouse/procurement/ctrl/Ctrl8.png b/static/index/warehouse/procurement/ctrl/Ctrl8.png new file mode 100644 index 0000000..0cd6289 Binary files /dev/null and b/static/index/warehouse/procurement/ctrl/Ctrl8.png differ