采购 购物车
This commit is contained in:
parent
6c6e665f44
commit
713180b742
|
|
@ -184,6 +184,13 @@
|
|||
},
|
||||
{
|
||||
"path" : "pages/procurement/material"
|
||||
},
|
||||
{
|
||||
"path" : "pages/procurement/materialcar",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
}
|
||||
}
|
||||
|
||||
// {
|
||||
|
|
|
|||
|
|
@ -108,7 +108,9 @@
|
|||
n.forEach((item,i)=>{
|
||||
gysarr.value.push({'name':item,'id':id[i]})
|
||||
})
|
||||
}
|
||||
}else{
|
||||
gysflag.value = false;
|
||||
}
|
||||
})
|
||||
const gysid = (e:number)=>{
|
||||
gysidnum.value = e;
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@
|
|||
emit('addcar', caigouobj.value,obj)
|
||||
|
||||
}
|
||||
const addcar = (v : any) => {
|
||||
const addcar = (v : any,i:number) => {
|
||||
caigouobj.value = v;
|
||||
caigouobj.value.index = i;
|
||||
caigouobj.value.yj = false;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,427 @@
|
|||
<template>
|
||||
<view>
|
||||
<scroll-view scroll-y="true" class="crdcroll" scroll-with-animation @scrolltolower="scrolltolower()" enable-back-to-top>
|
||||
<view class="box">
|
||||
<view class="fler" v-for="(v,index) in InvoicingList" :key="index">
|
||||
<scroll-view class="carditem guodu" @touchend="handleTouchEnd($event,v,index)"
|
||||
@touchstart="touchstart($event,v,index)" scroll-with-animation scroll-x="true"
|
||||
:scroll-left="v.scrollleft" @scroll="scroll" >
|
||||
<view class="speitem guodu" >
|
||||
<image :src="v.materialImg?serverUrl+v.materialImg:'/static/index/procurement/k.png'"
|
||||
mode="aspectFill">
|
||||
</image>
|
||||
<view class="cardp">
|
||||
<view v-if="v.categoryId_dictText">{{v.categoryId_dictText}}</view>
|
||||
<view v-if="v.typeId_dictText">{{v.typeId_dictText}}</view>
|
||||
<view v-if="v.medicationId_dictText">{{v.medicationId_dictText}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="msitem guodu" >
|
||||
<view>
|
||||
<view>{{v.wlName}}</view><text>{{v.wlMaterialNo}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text> 规格型号: {{v.wlSpecificationModel}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>采购单价: ¥{{v.referenceUnitPrice}}</text>
|
||||
<text>采购单位: {{v.wlUnits}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>供应商: {{v.suppliersName}}{{v.suppliersName}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
<text>{{v.kcsl}}</text>
|
||||
<text>库存数量</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>{{v.wlUpperLimit}}</text>
|
||||
<text>物料上限 ↑</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>{{v.wlLowerLimit}}</text>
|
||||
<text>↓ 物料下限</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="add" @click.stop="clkzk(v,index)">
|
||||
<image class="guodu" :style="v.zk?'transform: rotate(180deg);':''" :src="'/static/index/procurement/l.png'" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="zkadd guodu" :class="v.isAdd==1?'zkf':''">
|
||||
<view @click.stop @touchend.stop>编辑</view>
|
||||
<view @click.stop="addcar(v,index)" v-if="v.isAdd!=1" @touchend.stop>
|
||||
<view>
|
||||
<text>删除</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height:3vw;width: 100%;display: flex;align-items: center;justify-content: center;">
|
||||
<u-loadmore :status="status" :loadText="{nomore:'暂无更多数据'}" v-if="InvoicingList.length>6" />
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineProps, defineComponent } from 'vue';
|
||||
const props = defineProps({
|
||||
InvoicingList: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
status: {
|
||||
type: String
|
||||
},
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: true,
|
||||
},
|
||||
})
|
||||
const emit = defineEmits(['addcartory', 'scrolltolower','addcar'])
|
||||
const serverUrl = ref('')
|
||||
onMounted(() => {
|
||||
serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/';
|
||||
})
|
||||
const caigouobj = ref({})
|
||||
const clkzk = (v : any, i : number) => {
|
||||
// caigouobj.value = v;
|
||||
// caigouobj.value.Limitnum = Number(caigouobj.value?.upperLimit) - Number(caigouobj.value.kcsl);
|
||||
// caigouobj.value.index = i;
|
||||
// caigouobj.value.yj = false;
|
||||
// let n = caigouobj.value.suppliers_dictText.split(/[, ]+/);
|
||||
// let id = caigouobj.value.suppliers.split(/[, ]+/);
|
||||
// let obj = {id:id[0],name:n[0]}
|
||||
if(v.zk==true){
|
||||
v.zk = false;
|
||||
v.scrollleft = 0
|
||||
}else{
|
||||
v.zk = true;
|
||||
v.scrollleft = 150;
|
||||
}
|
||||
solleft(v,i)
|
||||
// emit('addcar', caigouobj.value,obj)
|
||||
|
||||
}
|
||||
const pageX = ref(0);
|
||||
const pageY = ref(0);
|
||||
const touchstart = (event : any, v : any,i:number) => {
|
||||
pageX.value = event.changedTouches[0].pageX;
|
||||
pageY.value = event.changedTouches[0].pageY;
|
||||
solleft(v, i)
|
||||
}
|
||||
const handleTouchEnd = (event : any, v : any, i : number) => {
|
||||
let y = event.changedTouches[0].pageY;
|
||||
let x = event.changedTouches[0].pageX;
|
||||
let absx = Math.abs(x - pageX.value)
|
||||
let absy = Math.abs(y - pageY.value)
|
||||
if (absy > 30 && absx+10<absy&& absx<70) {
|
||||
if(v.zk==false){
|
||||
setTimeout(()=>{
|
||||
v.scrollleft = 0
|
||||
},20)
|
||||
}
|
||||
return
|
||||
}
|
||||
if (absx < 10 && absy < 10) {
|
||||
if(v.zk==false && absx > 2 && absy > 2){
|
||||
v.scrollleft = 0;
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
caigouobj.value = v;
|
||||
caigouobj.value.Limitnum = Number(caigouobj.value?.upperLimit) - Number(caigouobj.value.kcsl);
|
||||
caigouobj.value.index = i;
|
||||
caigouobj.value.yj = false;
|
||||
v.zk = x > pageX.value ? false : true;
|
||||
v.scrollleft = v.zk ? 150 : 0;
|
||||
}
|
||||
|
||||
const solleft = (v : any, i : number) => {
|
||||
props.InvoicingList.forEach((item, k) => {
|
||||
if (k != i&&item.zk==true) {
|
||||
item.zk = false;
|
||||
item.scrollleft = 0;
|
||||
}
|
||||
})
|
||||
}
|
||||
const scrolltolower = () => {
|
||||
emit('scrolltolower')
|
||||
}
|
||||
const scrollLeft = ref(0)
|
||||
const scroll = (e)=>{
|
||||
// scrollLeft.value = e.detail.scrollLeft
|
||||
// console.log(e.detail.scrollLeft)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.crdcroll {
|
||||
width: 96vw;
|
||||
height: 88.3vh;
|
||||
margin-top: 1vh;
|
||||
.box {
|
||||
width: 96vw;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
.fler {
|
||||
width: 47vw;
|
||||
height: 18.2vw;
|
||||
}
|
||||
}
|
||||
|
||||
.carditem {
|
||||
width: 47vw;
|
||||
height: 17vw;
|
||||
background: rgba(245, 246, 248, 1);
|
||||
border-radius: 1.6vw;
|
||||
position: relative;
|
||||
margin-bottom: 1.2vw;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
justify-content: flex-start;
|
||||
white-space: nowrap;
|
||||
|
||||
.zkadd {
|
||||
width: 14vw;
|
||||
height: 100%;
|
||||
display: inline-flex;
|
||||
justify-content: flex-end;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -14vw;
|
||||
|
||||
>view {
|
||||
width: 7vw;
|
||||
height: 100%;
|
||||
font-weight: 400;
|
||||
font-size: 1.3vw;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
&:nth-child(2) {
|
||||
background: #1083F8;
|
||||
color: #fff;
|
||||
|
||||
view {
|
||||
width: 3.8vw;
|
||||
height: 3.8vw;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
&:nth-child(1) {
|
||||
background: #C2C4C9;
|
||||
color: #555555;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.zkf {
|
||||
width: 7vw;
|
||||
right: -7vw;
|
||||
}
|
||||
|
||||
.add {
|
||||
width: 6vw;
|
||||
height: 17vw;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
position: relative;
|
||||
top: -3.5vw;
|
||||
>view {
|
||||
width: 4.5vw;
|
||||
height: 1.8vw;
|
||||
background: #E3EEF7;
|
||||
border-radius: 0.9vw;
|
||||
border: 1px solid rgba(3, 133, 250, 0.34);
|
||||
font-weight: 400;
|
||||
font-size: 1.1vw;
|
||||
color: #1083F8;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 0.8vw;
|
||||
right: 0.8vw;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 3vw;
|
||||
height: 3vw;
|
||||
}
|
||||
}
|
||||
|
||||
.msitem {
|
||||
width: 25vw;
|
||||
height: 100%;
|
||||
padding: 1vw;
|
||||
display: inline-block;
|
||||
|
||||
>view {
|
||||
margin-top: 0.8vw;
|
||||
|
||||
&:nth-child(5) {
|
||||
width: 100%;
|
||||
height: 3.4vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
>view {
|
||||
width: 33.3%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
|
||||
&:nth-child(1) {
|
||||
width: 30%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
width: 40%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&:nth-child(3) {
|
||||
width: 30%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
&:nth-child(2)::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 2.2vw;
|
||||
border-left: 1px solid #C9C9C9;
|
||||
border-right: 1px solid #C9C9C9;
|
||||
top: 0.6vw;
|
||||
}
|
||||
|
||||
text {
|
||||
&:nth-child(1) {
|
||||
font-weight: bold;
|
||||
font-size: 1.7vw;
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
font-weight: 400;
|
||||
font-size: 1.1vw;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-child(2),
|
||||
&:nth-child(3),
|
||||
&:nth-child(4){
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
text {
|
||||
font-weight: 400;
|
||||
font-size: 1.4vw;
|
||||
color: #777777;
|
||||
}
|
||||
}
|
||||
&:nth-child(4){
|
||||
width: 25vw;
|
||||
height: 1.5vw;
|
||||
display: block !important;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&:nth-child(1) {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 2vw;
|
||||
|
||||
>view {
|
||||
width: 19vw;
|
||||
height: 2vw;
|
||||
font-weight: bold;
|
||||
font-size: 1.6vw;
|
||||
color: #222222;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
text {
|
||||
width: 6vw;
|
||||
font-weight: 300;
|
||||
font-size: 1.4vw;
|
||||
color: #222222;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// .spleft{
|
||||
// margin-left: -15vw !important;
|
||||
// }
|
||||
.speitem {
|
||||
width: 15vw;
|
||||
height: 100%;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
||||
.cardp {
|
||||
width: 12.5vw;
|
||||
height: 4vw;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 0 auto;
|
||||
align-items: center;
|
||||
|
||||
view {
|
||||
width: 5.5vw;
|
||||
height: 1.8vw;
|
||||
border-radius: 0.9vw;
|
||||
border: 1px solid #D2D2D2;
|
||||
margin: 0.5vw 0 0 0.5vw;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-weight: 400;
|
||||
font-size: 1vw;
|
||||
color: #555555;
|
||||
}
|
||||
}
|
||||
|
||||
>image {
|
||||
width: 9vw;
|
||||
height: 8vw;
|
||||
margin: 1vw auto 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.guodu {
|
||||
transition: .4s;
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,415 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="qbkyj" v-if="show">
|
||||
<view class="titletop">详情</view>
|
||||
<scroll-view scroll-y="true" class="crdcroll" scroll-with-animation
|
||||
@scrolltolower="scrolltolower">
|
||||
<view class="fler">
|
||||
<scroll-view class="carditem guodu" v-for="(v,index) in InvoicingList" :key="index"
|
||||
@touchend="handleTouchEnd($event,v,index)" @touchstart="touchstart($event,v,index)"
|
||||
scroll-with-animation scroll-x="true" :scroll-left="v.scrollleft" @scroll="scroll($event,v)">
|
||||
<view class="speitem guodu" :class="v.zk?'spleft':''">
|
||||
<image :src="v.materialImg?serverUrl+v.materialImg:'/static/index/procurement/k.png'" mode="aspectFill"></image>
|
||||
<view class="cardp">
|
||||
<view v-if="v.categoryId_dictText">{{v.categoryId_dictText}}</view>
|
||||
<view v-if="v.typeId_dictText">{{v.typeId_dictText}}</view>
|
||||
<view v-if="v.medicationId_dictText">{{v.medicationId_dictText}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="msitem guodu">
|
||||
<view>
|
||||
<view>{{v.materialName}}</view><text>{{v.materialNo}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text> 规格型号: {{v.specificationModel}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text v-if="v.multiUnitType=='1'">采购单价: ¥{{v.oneUnitPrice}} </text>
|
||||
<text v-if="v.multiUnitType=='1'">采购单位: {{ v.oneUnit}}</text>
|
||||
<text v-if="v.multiUnitType=='2'">采购单价: ¥{{v.twoUnitPrice}} </text>
|
||||
<text v-if="v.multiUnitType=='2'">采购单位: {{ v.twoUnit}}</text>
|
||||
<text v-if="v.multiUnitType=='3'">采购单价: ¥{{v.referenceUnitPrice}} </text>
|
||||
<text v-if="v.multiUnitType=='3'">采购单位: {{ v.materialUnits}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
<text>{{v.kcsl}}</text>
|
||||
<text>库存数量</text>
|
||||
</view>
|
||||
<view>
|
||||
<text >{{v.upperLimit}}</text>
|
||||
<text>物料上限 ↑</text>
|
||||
</view>
|
||||
<view>
|
||||
<text >{{v.lowerLimit}}</text>
|
||||
<text>↓ 物料下限</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="add" @click.stop="clkzk(v,index)">
|
||||
<view v-if="v.isAdd==1">已添加</view>
|
||||
<image class="guodu" :style="v.zk?'transform: rotate(180deg);':''" :src="'/static/index/procurement/l.png'" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="zkadd guodu" :class="v.isAdd==1?'zkf':''">
|
||||
<view @click.stop @touchend.stop>出入库</view>
|
||||
<view @click.stop="addcar(v)" v-if="v.isAdd!=1" @touchend.stop>
|
||||
<view>
|
||||
<text>加购</text>
|
||||
<text>物车</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view style="height:3vw;width: 100%;display: flex;align-items: center;justify-content: center;">
|
||||
<u-loadmore :status="status" :loadText="{nomore:'暂无更多数据'}" v-if="InvoicingList.length>6"/>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineProps ,defineComponent} from 'vue';
|
||||
import { queryInvoicingList,queryWlInfoByWlId,addShoppingCartList,queryShoppingCartList } from '../api/lunpan.js'
|
||||
const props = defineProps({
|
||||
InvoicingList: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
status:{
|
||||
type:String
|
||||
},
|
||||
show: {
|
||||
type: Boolean,
|
||||
default:false,
|
||||
required: true,
|
||||
},
|
||||
})
|
||||
const emit = defineEmits(['addcartory','tolower','solleft'])
|
||||
const serverUrl = ref('')
|
||||
onMounted(()=>{
|
||||
serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/';
|
||||
})
|
||||
const setout1 = ref(true)
|
||||
const scrolltolower = () => {
|
||||
emit('tolower')
|
||||
}
|
||||
const caigouobj = ref({})
|
||||
const clkzk =(v:any,i:number)=>{
|
||||
caigouobj.value = v;
|
||||
caigouobj.value.Limitnum = Number(caigouobj.value?.upperLimit)-Number(caigouobj.value.kcsl);
|
||||
caigouobj.value.index = i;
|
||||
caigouobj.value.yj = true;
|
||||
if(v.zk==true){
|
||||
v.zk = false;
|
||||
v.scrollleft = 0
|
||||
}else{
|
||||
v.zk = true;
|
||||
v.scrollleft = 150;
|
||||
}
|
||||
solleft(v,i)
|
||||
}
|
||||
const addcar = (v:any)=>{
|
||||
emit('addcartory',caigouobj.value)
|
||||
}
|
||||
const pageX = ref(0);
|
||||
const pageY = ref(0);
|
||||
const touchstart = (event:any,v:any,i:number)=>{
|
||||
pageX.value = event.changedTouches[0].pageX;
|
||||
pageY.value = event.changedTouches[0].pageY;
|
||||
solleft(v,i)
|
||||
}
|
||||
const handleTouchEnd = (event:any,v:any,i:number)=>{
|
||||
let y = event.changedTouches[0].pageY;
|
||||
let x = event.changedTouches[0].pageX;
|
||||
let absx = Math.abs(x-pageX.value)
|
||||
let absy = Math.abs(y-pageY.value)
|
||||
if (absy > 30 && absx+10<absy&& absx<70) {
|
||||
if(v.zk==false){
|
||||
setTimeout(()=>{
|
||||
v.scrollleft = 0
|
||||
},20)
|
||||
}
|
||||
return
|
||||
}
|
||||
if (absx < 10 && absy < 10) {
|
||||
if(v.zk==false && absx > 2 && absy > 2){
|
||||
v.scrollleft = 0;
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
caigouobj.value = v;
|
||||
caigouobj.value.Limitnum = Number(caigouobj.value?.upperLimit)-Number(caigouobj.value.kcsl);
|
||||
caigouobj.value.index = i;
|
||||
v.zk = x>pageX.value?false:true;
|
||||
v.scrollleft = v.zk?150 : 0;
|
||||
|
||||
}
|
||||
const solleft =(v:any,i:number)=>{
|
||||
|
||||
props.InvoicingList.forEach((item,k)=>{
|
||||
if(k!=i && item.zk==true){
|
||||
item.zk = false;
|
||||
item.scrollleft = 0;
|
||||
}
|
||||
})
|
||||
}
|
||||
// const scrollLeft = ref(0)
|
||||
// const scroll = (e)=>{
|
||||
// scrollLeft.value = e.detail.scrollLeft
|
||||
// // console.log(e.detail.scrollLeft)
|
||||
// }
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
.carditem {
|
||||
width: 47vw;
|
||||
height: 14.5vw;
|
||||
background: rgba(245, 246, 248, 1);
|
||||
border-radius: 1.6vw;
|
||||
position: relative;
|
||||
margin-bottom: 1.1vw;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
justify-content: flex-start;
|
||||
white-space: nowrap;
|
||||
|
||||
.zkadd{
|
||||
width: 14vw;
|
||||
height: 100%;
|
||||
display: inline-flex;
|
||||
justify-content: flex-end;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right:-14vw;
|
||||
>view{
|
||||
width: 7vw;
|
||||
height: 100%;
|
||||
font-weight: 400;
|
||||
font-size: 1.3vw;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
&:nth-child(2){
|
||||
background: #1083F8;
|
||||
color: #fff;
|
||||
view{
|
||||
width: 3.8vw;
|
||||
height: 3.8vw;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
}
|
||||
&:nth-child(1){
|
||||
background: #C2C4C9;
|
||||
color: #555555;
|
||||
}
|
||||
}
|
||||
}
|
||||
.zkf{
|
||||
width: 7vw;
|
||||
right:-7vw ;
|
||||
}
|
||||
.add{
|
||||
width: 6vw;
|
||||
height: 14.5vw;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
top: -2vw;
|
||||
>view{
|
||||
width: 4.5vw;
|
||||
height: 1.8vw;
|
||||
background: #E3EEF7;
|
||||
border-radius: 0.9vw;
|
||||
border: 1px solid rgba(3, 133, 250, 0.34);
|
||||
font-weight: 400;
|
||||
font-size: 1.1vw;
|
||||
color: #1083F8;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 0.8vw;
|
||||
right: 0.8vw;
|
||||
}
|
||||
image{
|
||||
width: 3vw;
|
||||
height: 3vw;
|
||||
}
|
||||
}
|
||||
.msitem{
|
||||
width: 25vw;
|
||||
height: 100%;
|
||||
padding: 1vw;
|
||||
display: inline-block;
|
||||
>view{
|
||||
margin-top: 0.5vw;
|
||||
&:nth-child(4){
|
||||
width: 100%;
|
||||
height: 3.4vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
>view{
|
||||
width: 33.3%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
&:nth-child(1){
|
||||
width: 30%;
|
||||
text-align: left;
|
||||
}
|
||||
&:nth-child(2){
|
||||
width: 40%;
|
||||
text-align: center;
|
||||
}
|
||||
&:nth-child(3){
|
||||
width: 30%;
|
||||
text-align: right;
|
||||
}
|
||||
&:nth-child(2)::after{
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 2.2vw;
|
||||
border-left: 1px solid #C9C9C9;
|
||||
border-right: 1px solid #C9C9C9;
|
||||
top: 0.6vw;
|
||||
}
|
||||
text{
|
||||
&:nth-child(1){
|
||||
font-weight: bold;
|
||||
font-size: 1.7vw;
|
||||
color: #555555;
|
||||
}
|
||||
&:nth-child(2){
|
||||
font-weight: 400;
|
||||
font-size: 1.1vw;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&:nth-child(2),&:nth-child(3){
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
text{
|
||||
font-weight: 400;
|
||||
font-size: 1.4vw;
|
||||
color: #777777;
|
||||
margin-top: 0.35vw;
|
||||
}
|
||||
}
|
||||
&:nth-child(1){
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 2vw;
|
||||
>view{
|
||||
width: 19vw;
|
||||
height: 2vw;
|
||||
font-weight: bold;
|
||||
font-size: 1.6vw;
|
||||
color: #222222;
|
||||
text-overflow:ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
text{
|
||||
width: 6vw;
|
||||
font-weight: 300;
|
||||
font-size: 1.4vw;
|
||||
color: #222222;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// .spleft{
|
||||
// margin-left: -15vw !important;
|
||||
// }
|
||||
.speitem{
|
||||
width: 15vw;
|
||||
height: 100%;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
top: -2vw;
|
||||
.cardp{
|
||||
width: 12.5vw;
|
||||
height: 4vw;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 0 auto;
|
||||
align-items: center;
|
||||
view{
|
||||
width: 5.5vw;
|
||||
height: 1.8vw;
|
||||
border-radius: 0.9vw;
|
||||
border: 1px solid #D2D2D2;
|
||||
margin: 0.5vw 0 0 0.5vw;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-weight: 400;
|
||||
font-size: 1vw;
|
||||
color: #555555;
|
||||
}
|
||||
}
|
||||
>image{
|
||||
width: 9vw;
|
||||
height: 8vw;
|
||||
margin: 1vw auto 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.crdcroll {
|
||||
width: 100%;
|
||||
height: calc(23vh);
|
||||
|
||||
.fler {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.qbkyj{
|
||||
width: 51vw;
|
||||
height: 36vh;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 0rpx 0.7vw 0rpx rgba(182,186,196,0.29);
|
||||
border-radius: 1.6vw;
|
||||
position: fixed;
|
||||
top: 28vh;
|
||||
left: 24.5vw;
|
||||
z-index: 103;
|
||||
padding: 2vw;
|
||||
}
|
||||
.titletop{
|
||||
width: 100%;
|
||||
height: 3.5vw;
|
||||
font-weight: bold;
|
||||
font-size: 1.8vw;
|
||||
color: #333333;
|
||||
line-height: 2.5vw;
|
||||
}
|
||||
.guodu {
|
||||
transition: .4s;
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,268 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="crkcard guodu" :class="crk?'':'uncrkcard'">
|
||||
<!-- <view class="shopcont">
|
||||
<view class="img tp">
|
||||
<image :src=" '/static/index/warehouse/procurement/k.png'" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="cont">
|
||||
<view>纸尿裤-拉拉裤纸尿裤-拉拉裤</view>
|
||||
<view>规格型号: 800mm*680mm</view>
|
||||
<view>物料编码: ZHYP044</view>
|
||||
<view>
|
||||
<text>56</text>
|
||||
当前库存
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="titletop">
|
||||
出入库
|
||||
</view>
|
||||
<view class="select">
|
||||
<view>
|
||||
<view>全部</view>
|
||||
<view>日期从近到远
|
||||
<image src="/static/index/hulilist/xia.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<text>总计:100笔</text>
|
||||
<text>出库:50</text>
|
||||
<text>入库:50</text>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" class="crkscroll">
|
||||
<view class="cgrk" v-for="(v,i) in 15" :key='i'>
|
||||
<view>
|
||||
<text>采购入库</text>
|
||||
<text>服务指令:生活用品请领</text>
|
||||
<text>2025-02-13 17:29:18</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>摘要:服务指令</text>
|
||||
<text :class="i>5?'c':'l'">+50</text>
|
||||
<text>库存:96</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props:{
|
||||
crk:false
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
// 出入库
|
||||
.guodu {
|
||||
transition: .4s;
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.uncrkcard {
|
||||
top: -86vw !important;
|
||||
}
|
||||
|
||||
.crkcard {
|
||||
width: 36vw;
|
||||
height: 85vh;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
box-shadow: 0rpx 0rpx 1vw 0rpx rgba(171, 171, 172, 0.29);
|
||||
border-radius: 1.6vw;
|
||||
position: fixed;
|
||||
right: 32vw;
|
||||
top: 7vw;
|
||||
padding: 1.5vw;
|
||||
z-index: 112;
|
||||
.titletop{
|
||||
width: 100%;
|
||||
height: 3.5vw;
|
||||
font-weight: bold;
|
||||
font-size: 1.8vw;
|
||||
color: #333333;
|
||||
line-height: 2.5vw;
|
||||
}
|
||||
|
||||
.crkscroll {
|
||||
width: 100%;
|
||||
height: calc(85vh - 13vw);
|
||||
|
||||
.cgrk {
|
||||
width: 100%;
|
||||
height: 8.5vw;
|
||||
background: rgba(236, 237, 239, 0.4);
|
||||
border-radius: 1.6vw;
|
||||
margin: 0.8vw auto 0;
|
||||
padding: 1.8vw 1.6vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
>view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
&:nth-child(1) {
|
||||
text {
|
||||
|
||||
&:nth-child(2),
|
||||
&:nth-child(3) {
|
||||
font-weight: 400;
|
||||
font-size: 1.1vw;
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
&:nth-child(1) {
|
||||
font-weight: bold;
|
||||
font-size: 1.2vw;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
.c {
|
||||
color: #FF6600 !important;
|
||||
}
|
||||
|
||||
.l {
|
||||
color: #0076D6 !important;
|
||||
}
|
||||
|
||||
text {
|
||||
font-weight: 400;
|
||||
font-size: 1.1vw;
|
||||
color: #888888;
|
||||
text-align: right;
|
||||
|
||||
&:nth-child(2) {
|
||||
font-weight: bold;
|
||||
font-size: 1.4vw;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select {
|
||||
width: 100%;
|
||||
height: 7vw;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
padding: 1vw 1.5vw;
|
||||
|
||||
>view {
|
||||
display: flex;
|
||||
|
||||
&:nth-child(2) {
|
||||
justify-content: space-between;
|
||||
|
||||
text {
|
||||
font-weight: 400;
|
||||
font-size: 1.1vw;
|
||||
color: #555555;
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-child(1) {
|
||||
justify-content: flex-end;
|
||||
|
||||
view {
|
||||
min-width: 5vw;
|
||||
height: 2.6vw;
|
||||
border-radius: 1.3vw;
|
||||
border: 1px solid #DCDCDC;
|
||||
padding: 0 1.4vw;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0 0.5vw;
|
||||
|
||||
image {
|
||||
width: 0.7vw;
|
||||
height: 0.5vw;
|
||||
margin-left: 0.4vw;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.shopcont {
|
||||
width: 100%;
|
||||
height: 10vw;
|
||||
background: rgba(236, 237, 239, 0.3);
|
||||
border-bottom: 1px solid #DCDCDC;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.cont {
|
||||
width: 26vw;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
position: relative;
|
||||
padding: 2vw 0;
|
||||
|
||||
view {
|
||||
&:nth-child(4) {
|
||||
width: 5vw;
|
||||
height: 5vw;
|
||||
background: rgba(236, 237, 239, 1);
|
||||
border-radius: 1.4vw;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
font-weight: 400;
|
||||
font-size: 1vw;
|
||||
position: absolute;
|
||||
color: #888888;
|
||||
top: 2.5vw;
|
||||
right: 1.8vw;
|
||||
padding: 0.5vw 0;
|
||||
|
||||
text {
|
||||
font-weight: bold;
|
||||
font-size: 1.8vw;
|
||||
color: #555555;
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-child(2),
|
||||
&:nth-child(3) {
|
||||
font-weight: 400;
|
||||
font-size: 1.1vw;
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
&:nth-child(1) {
|
||||
font-weight: bold;
|
||||
font-size: 1.4vw;
|
||||
color: #212327;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.img {
|
||||
width: 10vw;
|
||||
height: 9vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -13,6 +13,10 @@
|
|||
<image src="/static/index/procurement/sx.png" mode="aspectFill"></image>
|
||||
筛选
|
||||
</view>
|
||||
<view class="back" @click="uni.navigateBack()">
|
||||
<image src="/static/index/procurement/bk.png" mode="aspectFill"></image>
|
||||
返回
|
||||
</view>
|
||||
</view>
|
||||
<view class="kcyj">
|
||||
<view class="kjlt">
|
||||
|
|
@ -20,7 +24,7 @@
|
|||
</view>
|
||||
<scroll-view scroll-x="true" class="kcscrol guodu" :style="qb?'width:46.4vw':''"
|
||||
scroll-with-animation :scroll-top="scrolltop" @scrolltolower="scrolltolower(1)">
|
||||
<view class="yjbox" v-for="(v,i) in Material" :key="i">
|
||||
<view class="yjbox" v-for="(v,i) in Material" :key="i" @click="clickaddcar(v,i)">
|
||||
<image :src="v.materialImg?serverUrl+v.materialImg:'/static/index/procurement/k.png'" mode="aspectFill"></image>
|
||||
<view>{{v.materialName}}</view>
|
||||
<text class="ytj" v-if="v.isAdd==1">已添加</text>
|
||||
|
|
@ -73,7 +77,7 @@
|
|||
<carditem :InvoicingList="InvoicingList" @addcar="addcard" @addcartory="addcartory" @scrolltolower="scrolltolower" :status="status"></carditem>
|
||||
</view>
|
||||
<view class="fiedright">
|
||||
<view>
|
||||
<view @click="uni.navigateTo({ url:'/pages/procurement/materialcar' })">
|
||||
<image src="/static/index/procurement/gc.png" mode="aspectFill"></image>
|
||||
<text v-if="carnum>0">{{carnum>99?'99':carnum}}</text>
|
||||
</view>
|
||||
|
|
@ -93,6 +97,12 @@
|
|||
<view class="mengban" v-if="Invenshow" @click="Invenshow = false"></view>
|
||||
<Inventory @addcartory="addcartory" :show="Invenshow" :InvoicingList="Material"
|
||||
:status="statustory" @tolower="scrolltolower(1)"></Inventory>
|
||||
|
||||
<view class="mengban" v-if="detailsshow" @click="detailsshow = false"></view>
|
||||
<detail :InvoicingList="[caigouobj]" @addcartory="addcartory" :show="detailsshow"></detail>
|
||||
|
||||
<view class="mengban" v-if="crkflag" @click="crkflag = false"></view>
|
||||
<inboundoutbound :crk="crkflag"></inboundoutbound>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -104,11 +114,14 @@
|
|||
import classification from './components/classification.vue'
|
||||
import Inventory from './components/Inventory.vue'
|
||||
import carditem from './components/carditem.vue'
|
||||
import detail from './components/details.vue'
|
||||
import inboundoutbound from './components/inboundoutbound.vue'
|
||||
const qb = ref(false)
|
||||
const addflag = ref(false)
|
||||
const ification = ref(false)
|
||||
const Invenshow = ref(false)
|
||||
|
||||
const detailsshow = ref(false)
|
||||
const crkflag = ref(true)
|
||||
|
||||
const InvoicingList = ref([]);
|
||||
const caigouobj = ref({})
|
||||
|
|
@ -291,6 +304,41 @@
|
|||
},700)
|
||||
})
|
||||
}
|
||||
// 双击事件
|
||||
const forthmenuIndex = ref<number>(0);
|
||||
const lastTap = ref(0)
|
||||
// 双击的最大间隔(ms),可根据体验调整
|
||||
const DOUBLE_TAP_DELAY = 300;
|
||||
const setout = ref(null)
|
||||
const clickaddcar = (v : any,i:number) => {
|
||||
const now = Date.now()
|
||||
forthmenuIndex.value = i
|
||||
if (now - lastTap.value < DOUBLE_TAP_DELAY) {
|
||||
// 双击成立
|
||||
clearTimeout(setout.value)
|
||||
if(v.isAdd==1){
|
||||
return
|
||||
}else{
|
||||
caigouobj.value = v;
|
||||
caigouobj.value.index = i;
|
||||
caigouobj.value.yj = true;
|
||||
addcartory(caigouobj.value)
|
||||
}
|
||||
// 重置,避免多次触发
|
||||
lastTap.value = 0
|
||||
} else {
|
||||
setout.value = setTimeout(()=>{
|
||||
caigouobj.value = v;
|
||||
caigouobj.value.index = i;
|
||||
caigouobj.value.yj = true;
|
||||
detailsshow.value = true;
|
||||
console.log('11111111')
|
||||
},DOUBLE_TAP_DELAY)
|
||||
// 记录本次时间,等待下次点击
|
||||
lastTap.value = now
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
|
@ -637,33 +685,55 @@
|
|||
}
|
||||
|
||||
.serchs {
|
||||
width: 46.5vw;
|
||||
width:64vw;
|
||||
height: 3.3vw;
|
||||
border-radius: 1.6vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 0.7vw;
|
||||
.ipt {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
width: 30vw;
|
||||
background: #E2E4E9;
|
||||
border-radius: 1.65vw;
|
||||
height: 3.3vw;
|
||||
|
||||
image {
|
||||
width: 2.2vw;
|
||||
height: 2.2vw;
|
||||
margin-left: 0.5vw;
|
||||
margin:0 0.5vw;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 27vw;
|
||||
width: 25vw;
|
||||
height: 3.3vw;
|
||||
font-size: 1.1vw;
|
||||
padding-left: 1.6vw;
|
||||
background: #E2E4E9;
|
||||
border-radius: 1.65vw;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.back{
|
||||
width: 8vw;
|
||||
height: 3.3vw;
|
||||
border-radius: 1.6vw;
|
||||
border: 1px solid rgba(85, 85, 85, 0.5);
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
border-radius: 1.65vw;
|
||||
font-weight: 400;
|
||||
font-size: 1.4vw;
|
||||
color: rgba(85, 85, 85, 1);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-left:5.5vw;
|
||||
image {
|
||||
width: 1.5vw;
|
||||
height: 1.3vw;
|
||||
margin: 0 0.5vw;
|
||||
}
|
||||
|
||||
}
|
||||
.scr {
|
||||
border-radius: 1.65vw;
|
||||
font-weight: 400;
|
||||
|
|
@ -676,6 +746,7 @@
|
|||
height: 3.3vw;
|
||||
background: linear-gradient(-45deg, rgba(223, 244, 252, 1), rgba(204, 228, 249, 0.43));
|
||||
border: 1px solid #1083F8;
|
||||
margin: 0 1.2vw;
|
||||
}
|
||||
|
||||
.shx {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,215 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="serchs">
|
||||
<view class="leftbtn">
|
||||
<view class="ipt">
|
||||
<input type="text" placeholder="物料名称/物料编码/物料简拼" v-model="form.wlParamInfo" />
|
||||
<image src="/static/index/procurement/x.png" mode="aspectFill" v-if="form.wlParamInfo"
|
||||
@click="search(0)"></image>
|
||||
</view>
|
||||
<view @click="search" class="scr">
|
||||
检索
|
||||
</view>
|
||||
<view class="shx" @click="ification=true">
|
||||
<image src="/static/index/procurement/sx.png" mode="aspectFill"></image>
|
||||
筛选
|
||||
</view>
|
||||
</view>
|
||||
<view class="rightbtn">
|
||||
<view>
|
||||
<image src="/static/index/procurement/del1.png" mode="aspectFill"></image>
|
||||
清空
|
||||
</view>
|
||||
<view>
|
||||
<image src="/static/index/procurement/procure01.png" mode="aspectFill"></image>
|
||||
采购
|
||||
</view>
|
||||
<view class="back" @click="uni.navigateBack()">
|
||||
<image src="/static/index/procurement/bk.png" mode="aspectFill"></image>
|
||||
返回
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<carlist :InvoicingList="InvoicingList" :status="status"></carlist>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineProps ,defineComponent} from 'vue';
|
||||
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
|
||||
import { queryShoppingCartList, getGwcMaterialTreeData, queryNuInfoByNuId, updateKfstatus,deleteQgInfoById,emptiedQgInfo ,queryWlInfoByWlId,generatedPurchaseOrder,generatedPurchaseViewOrder } from './api/lunpan.js'
|
||||
import carlist from './components/carlist.vue';
|
||||
const form = reactive({
|
||||
nuId: uni.getStorageSync('nuId'),
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
categoryId: '',
|
||||
typeId: '',
|
||||
medicationId: '',
|
||||
wlParamInfo: '',
|
||||
isWaring: 0
|
||||
})
|
||||
const InvoicingList = ref([])
|
||||
const status = ref('loading')
|
||||
onLoad(()=>{
|
||||
queryInvo()
|
||||
})
|
||||
const queryInvo = () => {
|
||||
queryShoppingCartList(form).then(res => {
|
||||
res.result.records.forEach((item,i)=>{
|
||||
item.flag = true;
|
||||
item.zk = false;
|
||||
item.scrollleft = 0;
|
||||
})
|
||||
console.log(res.result.records)
|
||||
InvoicingList.value.push(...res.result.records);
|
||||
status.value = res.result.total == InvoicingList.value.length ? 'nomore' : 'loadmore';
|
||||
setout.value = (res.result.total == InvoicingList.value.length ? false : true)
|
||||
})
|
||||
}
|
||||
let times = null;
|
||||
const setout = ref(true)
|
||||
const scrolltolower = (t:number) => {
|
||||
if (setout.value==false) { return }
|
||||
status.value = 'loading'
|
||||
setout.value = false;
|
||||
form.pageNo++;
|
||||
queryInvo()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.serchs {
|
||||
width:96vw;
|
||||
height: 3.3vw;
|
||||
border-radius: 1.6vw;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0.7vw 0 0;
|
||||
justify-content: space-between;
|
||||
.leftbtn{
|
||||
width: 64vw;
|
||||
height: 3.3vw;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.rightbtn{
|
||||
width: 30vw;
|
||||
height: 3.3vw;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
|
||||
view{
|
||||
width: 8vw;
|
||||
height: 3.3vw;
|
||||
border-radius: 1.6vw;
|
||||
border: 1px solid #D9DADC;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
border-radius: 1.65vw;
|
||||
font-weight: 400;
|
||||
font-size: 1.4vw;
|
||||
color: rgba(85, 85, 85, 1);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-left:0.6vw;
|
||||
image {
|
||||
width: 1.5vw;
|
||||
height: 1.3vw;
|
||||
margin: 0 0.5vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ipt {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 30vw;
|
||||
background: #E2E4E9;
|
||||
border-radius: 1.65vw;
|
||||
height: 3.3vw;
|
||||
|
||||
image {
|
||||
width: 2.2vw;
|
||||
height: 2.2vw;
|
||||
margin:0 0.5vw;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 25vw;
|
||||
height: 3.3vw;
|
||||
font-size: 1.1vw;
|
||||
padding-left: 1.6vw;
|
||||
|
||||
}
|
||||
}
|
||||
.back{
|
||||
width: 8vw;
|
||||
height: 3.3vw;
|
||||
border-radius: 1.6vw;
|
||||
border: 1px solid rgba(85, 85, 85, 0.5);
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
border-radius: 1.65vw;
|
||||
font-weight: 400;
|
||||
font-size: 1.4vw;
|
||||
color: rgba(85, 85, 85, 1);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-left:0.6vw;
|
||||
image {
|
||||
width: 1.5vw;
|
||||
height: 1.3vw;
|
||||
margin: 0 0.5vw;
|
||||
}
|
||||
|
||||
}
|
||||
.scr {
|
||||
border-radius: 1.65vw;
|
||||
font-weight: 400;
|
||||
font-size: 1.5vw;
|
||||
color: #1083F8;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 8vw;
|
||||
height: 3.3vw;
|
||||
background: linear-gradient(-45deg, rgba(223, 244, 252, 1), rgba(204, 228, 249, 0.43));
|
||||
border: 1px solid #1083F8;
|
||||
margin: 0 1.2vw;
|
||||
}
|
||||
|
||||
.shx {
|
||||
width: 8.2vw;
|
||||
height: 3.3vw;
|
||||
background: #FFFFFF;
|
||||
border-radius: 1.65vw;
|
||||
border: 1px solid #D9DADC;
|
||||
font-weight: 400;
|
||||
font-size: 1.4vw;
|
||||
color: #222;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-shadow: 0.5rpx 5rpx 5rpx #dadee1;
|
||||
|
||||
image {
|
||||
width: 1.5vw;
|
||||
height: 1.3vw;
|
||||
margin: 0 0.5vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
.guodu {
|
||||
transition: .4s;
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
page {
|
||||
background: RGBA(239, 240, 244, 1);
|
||||
padding: 2vw;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,180 +0,0 @@
|
|||
<template>
|
||||
<view class="next-slide" :class="{'next-slide-disabled': disabled}">
|
||||
<view class="next-slide-left" :style="'position: relative;left:'+left+'rpx'" @touchstart="ontouchstart"
|
||||
@touchmove="ontouchmove" @touchend="ontouchend">
|
||||
<slot></slot>
|
||||
</view>
|
||||
<view class="next-slide-right">
|
||||
<view
|
||||
class="next-btn-item"
|
||||
v-for="(item,index) in btnGroup"
|
||||
:key="index"
|
||||
:style="getStyle(item)"
|
||||
@click.stop="btnClick(item)">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const defBtnStyle = {
|
||||
width: '100rpx',
|
||||
bgColor: '#f9ae3d',
|
||||
color: '#FFFFFF',
|
||||
fontSize: '28rpx',
|
||||
fontWeight: 300
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'NextSwipeAction',
|
||||
props: {
|
||||
btnGroup: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [{
|
||||
name: '修改',
|
||||
style: {
|
||||
bgColor: '#f9ae3d'
|
||||
}
|
||||
}, {
|
||||
name: '删除',
|
||||
style: {
|
||||
bgColor: '#ff4d4f'
|
||||
}
|
||||
}]
|
||||
}
|
||||
},
|
||||
//当前列索引
|
||||
index: {
|
||||
type: Number,
|
||||
require: true,
|
||||
default: 0
|
||||
},
|
||||
//是否禁用
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 是否按钮点击后自定重置
|
||||
btnClickAutoReset: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
x: 0,
|
||||
left: 0,
|
||||
operation: 0,
|
||||
height: 0,
|
||||
screenWidth: 0
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(res => {
|
||||
const systemInfo = uni.getSystemInfoSync()
|
||||
this.screenWidth = systemInfo.screenWidth
|
||||
this.getBtnWidth()
|
||||
this.getListHeight()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getStyle(item) {
|
||||
const style = item.style || {};
|
||||
const styleStr = 'width:'+ (style.width || defBtnStyle.width) +
|
||||
';height:100%;background-color:' + (style.bgColor || defBtnStyle.bgColor) +
|
||||
';color:' + (style.color || defBtnStyle.color) +
|
||||
';font-size:' + (style.fontSize || defBtnStyle.fontSize) +
|
||||
'font-weight:' + (style.fontWeight || defBtnStyle.fontWeight);
|
||||
return styleStr
|
||||
},
|
||||
btnClick(item) {
|
||||
const it = Object.assign({}, item);
|
||||
delete it.style;
|
||||
this.$emit('btnClick', {
|
||||
index: this.index,
|
||||
item: it
|
||||
})
|
||||
if(this.btnClickAutoReset) {
|
||||
this.reset()
|
||||
}
|
||||
},
|
||||
//重置方法
|
||||
reset() {
|
||||
this.left = 0
|
||||
},
|
||||
getBtnWidth() {
|
||||
const element = uni.createSelectorQuery().in(this).select(".next-slide-right");
|
||||
element.boundingClientRect(rect => {
|
||||
this.operation = this.px2rpx(rect.width, this.screenWidth)
|
||||
}).exec()
|
||||
},
|
||||
getListHeight() {
|
||||
const element = uni.createSelectorQuery().in(this).select(".next-slide-left");
|
||||
element.boundingClientRect(rect => {
|
||||
console.log(rect)
|
||||
this.height = this.px2rpx(rect.height, this.screenWidth)
|
||||
}).exec()
|
||||
},
|
||||
px2rpx(px, screenWidth) {
|
||||
return px / (screenWidth / 750)
|
||||
},
|
||||
ontouchstart(e) {
|
||||
if(this.disabled) return
|
||||
this.x = this.px2rpx(e.touches[0].clientX, this.screenWidth)
|
||||
},
|
||||
ontouchmove(e) {
|
||||
if(this.disabled) return
|
||||
let clientX = this.x - this.px2rpx(e.touches[0].clientX, this.screenWidth)
|
||||
if (clientX <= 0) this.left = 0
|
||||
else if (this.operation <= clientX) this.left = this.operation * -1
|
||||
else this.left = clientX * -1
|
||||
},
|
||||
ontouchend(e) {
|
||||
if(this.disabled) return
|
||||
let clientX = this.x - this.px2rpx(e.changedTouches[0].clientX, this.screenWidth)
|
||||
this.left = clientX > this.operation / 2 ? this.operation * -1 : 0
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.next-slide {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.next-slide-disabled {
|
||||
background-color: #333333;
|
||||
opacity: 0.6;
|
||||
}
|
||||
.next-slide-left {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
background-color: #FFFFFF;
|
||||
transition: left 0.2s ease-in-out;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.next-slide-right {
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
height: 14.5vw;
|
||||
}
|
||||
|
||||
.next-btn-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 5vw;
|
||||
padding: 1vw;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 681 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Loading…
Reference in New Issue