Compare commits

..

No commits in common. "c7513e6c306447af6e7a6058070a745721ef6da4" and "4509b9744d973ebed71d62c58395bdb2d05e5c8a" have entirely different histories.

13 changed files with 89 additions and 187 deletions

View File

@ -19,13 +19,12 @@
</view>
</view>
<view class="plsbuy-bottom">
<view class="quxiao" @click="colse">
取消
</view>
<view class="plsbuy-bottom-blue" @click="closeIt">
确认
</view>
<view class="quxiao" @click="colse">
取消
</view>
</view>
</view>
</template>

View File

@ -82,7 +82,7 @@
</view>
</view>
<view style="height: 23vw;width: 100%;padding:10vw 40vw ;">
<u-loadmore :status="status" dashed line nomore-text="已加载全部" />
<u-loadmore :status="status" />
</view>
</scroll-view>
<shadowview :opacity="opacity"></shadowview>
@ -293,19 +293,14 @@
<view class="mengban" v-if="tost" @click="qingkong"></view>
<view class="toast guodu" v-if="tost" >
<view class="tit">提示</view>
<view class="xunw" v-if="anmidex==4">
是否删除
</view>
<view class="xunw" v-if="anmidex==5">
是否清空所有物料
</view>
<view class="cont" v-if="anmidex==4">
<view v-for="(v,i) in delstr" :key='i' >{{i+1}}{{v}} <br></view>
<view class="cont">
<view v-html="delstr" v-if="anmidex==3"></view>
<view v-html="delstr" v-if="anmidex==4"></view>
</view>
<view class="cfg">
<view @click="qingkong">取消</view>
<view @click="del(3)" v-if="anmidex==3">确认</view>
<view @click="del(4)" v-if="anmidex==4">确认</view>
<view @click="del(5)" v-if="anmidex==5">确认</view>
</view>
</view>
</view>
@ -342,7 +337,7 @@
const form = reactive({
nuId: '',
pageNo: 1,
pageSize: 10,
pageSize: 9,
categoryId: '',
typeId: '',
medicationId: '',
@ -505,7 +500,7 @@
queryShoppingCartList(form).then(res => {
res.result.records.forEach((item,i)=>{
item.flag = false
if(i==0&&form.pageNo == 1){
if(i==0){
item.flag = true
}
})
@ -594,132 +589,78 @@
}
const anmidex = ref(-1)
const generatedOrder = ref([])
const delstr = ref([])
const tmr = ref(true)
const delstr = ref('')
const admiclick = (i : number) => {
if(tmr.value == false){return}
tmr.value = false;
if (anmidex.value == 2) {
anmidex.value = -1
} else {
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;
tmr.value = true;
anmidex.value = -1
},1000)
break;
case 2:
case 1:
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;
cgd.value = true
break;
case 3:
if(InvoicingList.value.length==0){
uni.showToast({
title:'请选择物料~',
icon:'none'
})
tmr.value = true;
anmidex.value = -1;
return
}
tmr.value = true;
case 2:
queryWlInfo();
break;
case 4:
case 3:
let str = ''
let a = []
InvoicingList.value.forEach((item,i)=>{
if(item.flag){
a.push(item.wlName)
str+='<br />'+' · '+item.wlName;
a.push(item)
}
})
if(a.length==0){
uni.showToast({
title:'请选择物料~',
title:'购物车暂无物料~',
icon:'none'
})
tmr.value = true;
anmidex.value = -1;
return
}
tmr.value = true;
delstr.value = a ;
delstr.value = '<view style="font-weight: 600 ">是否删除</view>'+str
tost.value = true;
break;
case 5:
case 4:
if(InvoicingList.value.length==0){
uni.showToast({
title:'购物车已清空~',
icon:'none'
})
tmr.value = true;
anmidex.value = -1;
return
}
tmr.value = true;
}
delstr.value = ' 是否清空购物车? '
tost.value = true;
break;
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)
case 5:
uni.navigateTo({
url:'/pages/Warehouse/procurecart'
})
break;
default:
break;
}
}
}
const del = (e:number)=>{
if(e==4){
if(e==3){
let arr = [];
let delstr = '';
InvoicingList.value.forEach((item,i)=>{
@ -729,25 +670,17 @@
}
})
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){
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()
arr.forEach(item=>{
InvoicingList.value.splice(item,1)
})
qingkong()
}
})
}else{
@ -789,18 +722,6 @@
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',
@ -886,18 +807,12 @@
}
}
.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%;
@ -1190,7 +1105,7 @@
}
.life {
width: 66%;
width: 60%;
height: 2vw;
margin: 0 auto 3vw;
display: flex;
@ -1208,7 +1123,6 @@
font-size: .9vw;
color: #555555;
margin-left: .6vw;
white-space: nowrap;
}
}
@ -1335,6 +1249,10 @@
background: #FFFFFF;
margin: 0.25vw 0;
border-radius: 1.6vw;
&:nth-child(1),&:nth-child(2){
width: 12.5vw;
}
view {
margin-right: .4vw;

View File

@ -163,7 +163,7 @@
<view class="anmikc">
<view v-for="(v,i) in animArray" :key="i" @click="admiclick(i)">
<view>
<donghua width="2vw" height="2vw" :links="v.url" :playing="i === anmidex || v.flag==true" class="donghua" />
<donghua width="2vw" height="2vw" :links="v.url" :playing="i === anmidex" class="donghua" />
</view>
<text>
@ -217,7 +217,7 @@
</view>
</view>
<view class="shuru guodu" :class="gysnum?'':'unrigbot'">
<calculator :translateNumber="caigouobj?.Limitnum" :doOnce="caigouobj?.Limitnum" @colse="colse" @right="right"></calculator>
<calculator :translateNumber="caigouobj.Limitnum" :doOnce="caigouobj.Limitnum" @colse="colse" @right="right"></calculator>
</view>
<view class="cgou guodu" :class="gys?'':'uncg'">
<view class="topcont">
@ -278,7 +278,7 @@
<view class="jj" @click="jjnum(-1)">
-
</view>
<view class="num" @click="gysnum=true">
<view class="num">
{{caigouobj.Limitnum}}
</view>
<view class="jj" @click="jjnum(1)">
@ -422,8 +422,7 @@
categoryId: '',
typeId: '',
medicationId: '',
wlParamInfo: '',
isWaring:0
wlParamInfo: ''
})
const switchshyp = () => {
let obj = {
@ -515,7 +514,6 @@
crk.value = false;
wlxq.value = false;
gysnum.value = false;
gysflag.value = false;
}
const colse = () => {
@ -622,14 +620,14 @@
break;
case 1:
//
shopitem.value = shopitem.value >= InvoicingList.value.length -1? shopitem.value = 0 : shopitem.value + 1
shopitem.value = shopitem.value > InvoicingList.value.length ? shopitem.value = 0 : shopitem.value + 1
break;
case 2:
//
shopitem.value = shopitem.value >= InvoicingList.value.length-3 ? shopitem.value = 0 : shopitem.value + 3
shopitem.value = shopitem.value > InvoicingList.value.length ? shopitem.value = 0 : shopitem.value + 3
break;
case 3:
shopitem.value = shopitem.value == 0 ? shopitem.value = InvoicingList.value.length-1 : shopitem.value - 1
shopitem.value = shopitem.value == 0 ? shopitem.value = InvoicingList.value.length : shopitem.value - 1
//
break;
case 4:
@ -677,38 +675,15 @@
return
}
if (anmidex.value == i) {
if(i==0){
animArray.value[0].flag = false;
form.isWaring = 0;
form.pageNo = 1;
InvoicingList.value = [];
queryInvo();
}
anmidex.value = -1;
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(/[, ]+/);
@ -722,7 +697,7 @@
uni.navigateTo({
url:'/pages/Warehouse/purchaseorder'
})
anmidex.value = -1;
break;
case 3:
let obj = {
@ -763,10 +738,8 @@
purchaseQuantity:caigouobj.value.Limitnum,
suppliersId:gysarr.value[gysidnum.value].id,
suppliersName:gysarr.value[gysidnum.value].name,
wlId:caigouobj.value.wlId,
kcsl:caigouobj.value.kcsl
wlId:caigouobj.value.wlId
}
console.log(dt)
addShoppingCartList([dt]).then(res=>{
uni.showToast({
icon:res.success?'success':'none',
@ -783,12 +756,7 @@
}
const carnum = ref(0)
const shoppcar=()=>{
let c = {
nuId: form.nuId,
pageNo: 1,
pageSize: 10
}
queryShoppingCartList(c).then(resr=>{
queryShoppingCartList(form).then(resr=>{
carnum.value = resr.result.total
})
}
@ -803,8 +771,7 @@
false //
),
name: '库存预警',
imgurl: '/static/index/warehouse/procurement/store/store01.png',
flag:false,
imgurl: '/static/index/warehouse/procurement/store/store01.png'
},
{
url: genPaths(
@ -937,12 +904,12 @@
}
.life {
width: 66%;
width: 60%;
height: 2vw;
margin: 0 auto 3vw;
display: flex;
justify-content: space-around;
flex: 1;
view {
width: 5.3vw;
height: 1.8vw;
@ -955,7 +922,6 @@
font-size: .9vw;
color: #555555;
margin-left: .6vw;
white-space: nowrap;
}
}
@ -1452,7 +1418,6 @@
height: 100%;
display: flex;
justify-content: space-between;
white-space: nowrap;
&:nth-child(2) {
display: flex;
@ -1469,7 +1434,6 @@
margin-left: 2.1vw;
margin-top: -0.2vw;
padding-right: 2.1vw;
white-space: nowrap;
.l {
color: rgba(3, 133, 250, 1);

View File

@ -57,13 +57,13 @@
<view>规格型号: {{v.wlMaterialNo}}</view>
<view>采购金额:
<text style="font-weight: bold;">
{{(v.purchaseQuantity * Number(v.procurementPrice)).toFixed(2) }}
{{(v.kcsl * Number(v.procurementPrice)).toFixed(2) }}
</text>
</view>
<view>采购数量:
<text style="font-weight: bold;">
{{v.purchaseQuantity }}
{{v.kcsl }}
</text>
<text>
{{ `(${v.wlUnits})` }}
@ -87,7 +87,7 @@
mode="aspectFill"></image>
</view>
<view class="num">
<view>{{v.kcsl}}</view>
<view>{{v.purchaseQuantity}}</view>
<view>库存数量</view>
</view>
</view>
@ -470,7 +470,6 @@
InvoicingList.value = [];
leftitem.value = saveleftgo.value;
shopitem.value = -1;
form.cgdId = plsbuy.value[leftitem.value].id
queryInvo();
}
onLoad(() => {
@ -588,8 +587,6 @@
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
@ -721,7 +718,31 @@
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);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB