Compare commits
2 Commits
4509b9744d
...
c7513e6c30
| Author | SHA1 | Date |
|---|---|---|
|
|
c7513e6c30 | |
|
|
8bdbb19592 |
|
|
@ -19,12 +19,13 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="plsbuy-bottom">
|
||||
<view class="plsbuy-bottom-blue" @click="closeIt">
|
||||
确认
|
||||
</view>
|
||||
<view class="quxiao" @click="colse">
|
||||
取消
|
||||
</view>
|
||||
<view class="plsbuy-bottom-blue" @click="closeIt">
|
||||
确认
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view style="height: 23vw;width: 100%;padding:10vw 40vw ;">
|
||||
<u-loadmore :status="status" />
|
||||
<u-loadmore :status="status" dashed line nomore-text="已加载全部" />
|
||||
</view>
|
||||
</scroll-view>
|
||||
<shadowview :opacity="opacity"></shadowview>
|
||||
|
|
@ -293,14 +293,19 @@
|
|||
<view class="mengban" v-if="tost" @click="qingkong"></view>
|
||||
<view class="toast guodu" v-if="tost" >
|
||||
<view class="tit">提示</view>
|
||||
<view class="cont">
|
||||
<view v-html="delstr" v-if="anmidex==3"></view>
|
||||
<view v-html="delstr" v-if="anmidex==4"></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>
|
||||
<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>
|
||||
|
|
@ -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)
|
||||
}
|
||||
})
|
||||
generatedPurchaseViewOrder(arr).then(res=>{
|
||||
generatedOrder.value = res.result
|
||||
if(arr.length==0){
|
||||
uni.showToast({
|
||||
title:'请选择物料~',
|
||||
icon:'none'
|
||||
})
|
||||
cgd.value = true
|
||||
break;
|
||||
case 2:
|
||||
queryWlInfo();
|
||||
tmr.value = true;
|
||||
anmidex.value = -1;
|
||||
return
|
||||
}
|
||||
tmr.value = true;
|
||||
generatedPurchaseViewOrder(arr).then(res=>{
|
||||
generatedOrder.value = res.result;
|
||||
})
|
||||
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+='<br />'+' · '+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 = '<view style="font-weight: 600 ">是否删除</view>'+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()
|
||||
})
|
||||
}
|
||||
})
|
||||
}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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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" class="donghua" />
|
||||
<donghua width="2vw" height="2vw" :links="v.url" :playing="i === anmidex || v.flag==true" 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">
|
||||
<view class="num" @click="gysnum=true">
|
||||
{{caigouobj.Limitnum}}
|
||||
</view>
|
||||
<view class="jj" @click="jjnum(1)">
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -57,13 +57,13 @@
|
|||
<view>规格型号: {{v.wlMaterialNo}}</view>
|
||||
<view>采购金额:
|
||||
<text style="font-weight: bold;">
|
||||
{{(v.kcsl * Number(v.procurementPrice)).toFixed(2) }}
|
||||
{{(v.purchaseQuantity * Number(v.procurementPrice)).toFixed(2) }}
|
||||
</text>
|
||||
|
||||
</view>
|
||||
<view>采购数量:
|
||||
<text style="font-weight: bold;">
|
||||
{{v.kcsl }}
|
||||
{{v.purchaseQuantity }}
|
||||
</text>
|
||||
<text>
|
||||
{{ `(${v.wlUnits})` }}
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="num">
|
||||
<view>{{v.purchaseQuantity}}</view>
|
||||
<view>{{v.kcsl}}</view>
|
||||
<view>库存数量</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.5 KiB |