Compare commits
2 Commits
df0c8ff63c
...
6fc7b5c8b4
| Author | SHA1 | Date |
|---|---|---|
|
|
6fc7b5c8b4 | |
|
|
942ad6b2d5 |
|
|
@ -98,7 +98,7 @@
|
|||
}
|
||||
|
||||
},
|
||||
|
||||
{"path": "pages/procurement/retstock"},
|
||||
// 护理表格预览
|
||||
{
|
||||
"path": "pages/timeMatrix/indexnew",
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@
|
|||
()=>{
|
||||
if(props.Material.length==0){
|
||||
qb.value = false;
|
||||
moredex.value=0;
|
||||
}
|
||||
})
|
||||
const delall = ()=>{
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
<view class="buttons-father">
|
||||
<view class="boxtwo">
|
||||
<view class="ipt">
|
||||
<input type="text" placeholder="物料名称/物料简拼" />
|
||||
<input type="text" placeholder="物料名称/物料简拼" v-model="form.wlParamInfo" @confirm="search"/>
|
||||
<image src="/static/index/procurement/x.png" mode="aspectFill" v-if="form.wlParamInfo"
|
||||
@click="search(0)"></image>
|
||||
</view>
|
||||
<view class="scr">
|
||||
<view class="scr" @click="search">
|
||||
检索
|
||||
</view>
|
||||
<view class="shx" @click="ification = true">
|
||||
|
|
@ -93,7 +95,7 @@
|
|||
elderId:form.elderId
|
||||
}
|
||||
queryGwcInfo(obj).then(res=>{
|
||||
console.log(res)
|
||||
console.log(res,obj)
|
||||
addMaterial.value = res.result
|
||||
})
|
||||
}
|
||||
|
|
@ -109,6 +111,12 @@
|
|||
status.value = (res.result.total == listarr.value.length ? 'nomore' : 'loadmore')
|
||||
})
|
||||
}
|
||||
const search = (x : number) => {
|
||||
if (x === 0) { form.wlParamInfo = '' }
|
||||
form.pageNo = 1;
|
||||
listarr.value = [];
|
||||
config();
|
||||
}
|
||||
const scrolltolower = ( ) => {
|
||||
if (status.value=='loading'||status.value=='nomore') { return }
|
||||
status.value = 'loading';
|
||||
|
|
@ -260,8 +268,14 @@
|
|||
}
|
||||
submitQld(obj).then(res=>{
|
||||
if(res.success&&res.result.status=='success'){
|
||||
subshow.value = false;
|
||||
wuliao();
|
||||
uni.showToast({
|
||||
icon:'success',
|
||||
title:'提交成功'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
subshow.value = false;
|
||||
wuliao();
|
||||
},800)
|
||||
}else{
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
|
|
|
|||
|
|
@ -213,5 +213,46 @@ export const getTreeDataWlnum = (params) => {
|
|||
data: params,
|
||||
})
|
||||
}
|
||||
export const queryCgdWaringList = (params) => {
|
||||
return request({
|
||||
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/queryCgdWaringList`,
|
||||
method: 'get',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export const thdList = (params) => {
|
||||
return request({
|
||||
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/thdList`,
|
||||
method: 'get',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
export const transRead = (params) => {
|
||||
return request({
|
||||
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/transRead`,
|
||||
method: 'POST',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
export const thdNuMaterialList = (params) => {
|
||||
return request({
|
||||
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/thdNuMaterialList`,
|
||||
method: 'get',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
export const addThc = (params) => {
|
||||
return request({
|
||||
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/addThc`,
|
||||
method: 'POST',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
export const thcList = (params) => {
|
||||
return request({
|
||||
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/thcList`,
|
||||
method: 'get',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,409 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="mengban" @click="emit('fill')" v-if="show"> </view>
|
||||
<view class="takitem guodu" :class="show?'':'unclass'" :style="showbox?'z-index:220':'z-index:-2'">
|
||||
<view class="tit">
|
||||
退货物料
|
||||
</view>
|
||||
<view class="cont">
|
||||
<view class="zuo">
|
||||
<view class="carp">
|
||||
<view class="zuoimg tp">
|
||||
<image :src="objtake.materialInfo.materialImg?serverUrl+objtake.materialInfo.materialImg:'/static/index/procurement/k.png'" mode="aspectFill"/>
|
||||
</view>
|
||||
<view class="youcont">
|
||||
<view>{{objtake.materialInfo.materialName}}</view>
|
||||
<view>
|
||||
<view>
|
||||
物料编码
|
||||
<text>{{objtake.materialInfo.materialNo}}</text>
|
||||
</view>
|
||||
<view>
|
||||
请购单位
|
||||
<text>{{objtake.materialInfo.materialUnits}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
规格型号
|
||||
<text style="white-space: nowrap;">{{objtake.materialInfo.specificationModel}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="qinggou-font">
|
||||
数量 <text style="color: red;" v-if="sx==true">超过退货上限!</text>
|
||||
</view>
|
||||
<view class="stringShow-father">
|
||||
<view class="jj" @click="jjnum(-1)" @longpress="handleTouchStart(-1)" @touchend="handleTouchEnd">
|
||||
-
|
||||
</view>
|
||||
<view class="stringShow-kuai">
|
||||
<view v-for="(item,index) in stringShow" :key="index" :style="sx==true?'color: red':''">
|
||||
{{item}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="jj" @click="jjnum(1)" @longpress="handleTouchStart(1)" @touchend="handleTouchEnd">
|
||||
+
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="you">
|
||||
<view class="calculator-father">
|
||||
<view v-for="(item,index) in calculatorArray" :key="index">
|
||||
<view class="calculator-kuai"
|
||||
@click="clickKuai(item,index)">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="plsbuy-bottom">
|
||||
<view class="quxiao" @click="emit('fill')">
|
||||
取消
|
||||
</view>
|
||||
<view class="plsbuy-bottom-blue" @click="closeIt">
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch, reactive } from 'vue';
|
||||
const props = defineProps({
|
||||
objtake: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
show: {
|
||||
type: Boolean
|
||||
}
|
||||
})
|
||||
const serverUrl = ref(uni.getStorageSync('serverUrl') + '/sys/common/static/')
|
||||
const emit = defineEmits([ 'fill' ,'right'])
|
||||
const showbox = ref(false)
|
||||
watch(()=>props.show,
|
||||
()=>{
|
||||
if(props.show==true){
|
||||
relNumber.value = 1;
|
||||
stringShow.value = toFixed4ByPadStart(relNumber.value)
|
||||
setTimeout(()=>{
|
||||
showbox.value = true
|
||||
},50)
|
||||
}else{
|
||||
showbox.value = false;
|
||||
isZero.value = false;
|
||||
}
|
||||
})
|
||||
const sx = ref(false)
|
||||
|
||||
const calculatorArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, "AC", 0, "AE"];
|
||||
const stringShow = ref("0000");
|
||||
const relNumber = ref(1);
|
||||
const isZero = ref(false);
|
||||
const clickKuai = (item : any, index : number) => {
|
||||
if (item == "AC") {
|
||||
relNumber.value = 0;
|
||||
stringShow.value = "0000";
|
||||
cy();
|
||||
return
|
||||
}
|
||||
if (item == "AE") {
|
||||
relNumber.value = Math.trunc(relNumber.value / 10)
|
||||
stringShow.value = toFixed4ByPadStart(relNumber.value);
|
||||
cy();
|
||||
return
|
||||
}
|
||||
if(isZero.value == false){
|
||||
isZero.value = true;
|
||||
relNumber.value = item;
|
||||
stringShow.value = toFixed4ByPadStart(relNumber.value);
|
||||
cy()
|
||||
return
|
||||
}
|
||||
if (digitCountByString(relNumber.value) > 3) {
|
||||
cy();
|
||||
} else {
|
||||
if (!relNumber.value) {
|
||||
relNumber.value = item;
|
||||
} else {
|
||||
relNumber.value = relNumber.value * 10 + item;
|
||||
}
|
||||
cy()
|
||||
stringShow.value = toFixed4ByPadStart(relNumber.value)
|
||||
}
|
||||
}
|
||||
const cy=()=>{
|
||||
let num = props.objtake.wlNum;
|
||||
let bl = relNumber.value;
|
||||
if(bl>num){
|
||||
sx.value = true
|
||||
}else{
|
||||
sx.value = false
|
||||
}
|
||||
}
|
||||
const InteroutId = ref(null)
|
||||
const handleTouchStart = (e:number)=> {
|
||||
Interval(e)
|
||||
}
|
||||
const handleTouchEnd=()=> {
|
||||
clearInterval(InteroutId.value);
|
||||
// 清除定时器
|
||||
}
|
||||
const Interval = (e:number)=>{
|
||||
InteroutId.value = setInterval(() => {
|
||||
jjnum(e);
|
||||
}, 120);
|
||||
}
|
||||
const jjnum = (e:number)=>{
|
||||
let num = props.objtake.wlNum;
|
||||
if(relNumber.value>=num&&e==1){relNumber.value = num; return}
|
||||
if(relNumber.value<=1&&e==-1){relNumber.value = 1; return}
|
||||
relNumber.value+=e;
|
||||
cy();
|
||||
stringShow.value = toFixed4ByPadStart(relNumber.value)
|
||||
// emit('jjnum',e)
|
||||
}
|
||||
const closeIt = () => {
|
||||
emit('right', relNumber.value,props.objtake )
|
||||
}
|
||||
function digitCountByString(n) {
|
||||
const s = Math.abs(n).toString();
|
||||
return s.length;
|
||||
}
|
||||
function toFixed4ByPadStart(n) {
|
||||
const intPart = Math.floor(Math.abs(n));
|
||||
return String(intPart).padStart(4, '0');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.takitem{
|
||||
width: 53.3vw;
|
||||
height: 36vw;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
box-shadow: 0rpx 0rpx 1.3vw 0rpx rgba(163,167,182,0.16);
|
||||
border-radius: 1.6vw;
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
top: 13vw;
|
||||
right: 23.4vw;
|
||||
padding: 2vw;
|
||||
.you{
|
||||
.plsbuy-bottom {
|
||||
width: 100%;
|
||||
margin-top: 3vw;
|
||||
height: 7vw;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
font-size: 35rpx;
|
||||
view{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 9.1vw;
|
||||
height: 3.8vw;
|
||||
color: rgba(92, 121, 146, 1);
|
||||
border-radius:1.9vw;
|
||||
font-size: 1.8vw;
|
||||
border: 1px solid #EDEDEF;
|
||||
margin-left: 1vw;
|
||||
}
|
||||
.quxiao{
|
||||
background: #EDEDEF;
|
||||
}
|
||||
.plsbuy-bottom-blue {
|
||||
background: linear-gradient(0deg, #CAE0F9, #E9F4FF);
|
||||
border: 1px solid rgba(3,133,250,0.34);
|
||||
color: #0385FA;
|
||||
}
|
||||
}
|
||||
.calculator-father {
|
||||
width: 19vw;
|
||||
height: 20vw;
|
||||
margin :0 auto 0;
|
||||
flex-wrap: wrap;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
.calculator-kuai {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: url('/static/index/procurement/bt.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
font-size: 42rpx;
|
||||
font-weight: 500;
|
||||
margin: 12rpx 20rpx 0 20rpx;
|
||||
width: 4.4vw;
|
||||
height: 4.4vw;
|
||||
}
|
||||
.calculator-kuai:active{
|
||||
background: linear-gradient(to bottom, #00C9FF, #0076FF);
|
||||
color: #fff;
|
||||
font-size: 45rpx;
|
||||
font-weight: 500;
|
||||
border-radius: 1.6vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
.stringShow-father {
|
||||
width: 100%;
|
||||
height:7vw;
|
||||
margin-top:0.5vw;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
.jj{
|
||||
width: 5vw;
|
||||
height: 5vw;
|
||||
margin: 0 1vw;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: url('/static/index/procurement/bt.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
border-radius: 45rpx;
|
||||
font-size: 42rpx;
|
||||
}
|
||||
.jj:active{
|
||||
background: linear-gradient(to bottom, #00C9FF, #0076FF);
|
||||
color: #fff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #DCDCEE;
|
||||
border-radius: 45rpx;
|
||||
font-size: 45rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.stringShow-kuai {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 11.5vw;
|
||||
height: 5vw;
|
||||
background: #F3F5F9;
|
||||
border-radius: 1vw;
|
||||
border: 1px solid #CBCFD0;
|
||||
justify-content: space-around;
|
||||
box-shadow: 0rpx 0.1vw 0.3vw 0rpx rgba(140,143,153,0.17) inset;
|
||||
view{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 42rpx;
|
||||
font-weight: 500;
|
||||
width:2.5vw;
|
||||
height: 5vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
.qinggou-font {
|
||||
font-size: 1.4vw;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cont{
|
||||
width: 100%;
|
||||
height: 26.5vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-top: 1.7vw;
|
||||
.zuo{
|
||||
width: 27vw;
|
||||
height: 100%;
|
||||
.carp{
|
||||
width: 100%;
|
||||
height: 16vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-top: 1.8vw;
|
||||
.youcont{
|
||||
width: 17vw;
|
||||
height: 100%;
|
||||
>view{
|
||||
&:nth-child(2),&:nth-child(3){
|
||||
width: 100%;
|
||||
height: 3.6vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 1.8vw;
|
||||
>view{
|
||||
font-weight: 400;
|
||||
font-size: 1.1vw;
|
||||
color: #888888;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
text{
|
||||
font-weight: 300;
|
||||
font-size: 1.4vw;
|
||||
color: #222222;
|
||||
}
|
||||
}
|
||||
}
|
||||
&:nth-child(1){
|
||||
width: 17vw;
|
||||
height: 1.8vw;
|
||||
font-weight: bold;
|
||||
font-size: 1.6vw;
|
||||
color: #222222;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
line-height: 1.8vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
.zuoimg{
|
||||
width: 8vw;
|
||||
height: 8vw;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tit{
|
||||
width: 100%;
|
||||
height: 2.6vw;
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
font-weight: 400;
|
||||
font-size: 1.6vw;
|
||||
color: #333333;
|
||||
line-height: 2.1vw;
|
||||
}
|
||||
}
|
||||
.mengban{
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
z-index: 20;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: RGBA(239, 240, 244, 0.55);
|
||||
}
|
||||
.hei0 {
|
||||
height: 0 !important;
|
||||
view{
|
||||
height: 0 !important;
|
||||
}
|
||||
}
|
||||
.unclass {
|
||||
opacity: 0 !important;
|
||||
}
|
||||
.guodu {
|
||||
transition: .4s;
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,391 @@
|
|||
<template>
|
||||
<view>
|
||||
<scroll-view scroll-y="true" class="itembox" 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="zding" v-if="v.zhiDingId">
|
||||
<image src="/static/index/procurement/zd.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="speitem guodu" >
|
||||
<image :src="v.materialInfo.materialImg?serverUrl+v.materialInfo.materialImg:'/static/index/procurement/k.png'"
|
||||
mode="aspectFill">
|
||||
</image>
|
||||
<view class="cardp">
|
||||
<view v-if="v.materialInfo.categoryName">{{v.materialInfo.categoryName}}</view>
|
||||
<view v-if="v.materialInfo.typeName">{{v.materialInfo.typeName}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="msitem guodu" >
|
||||
<view>
|
||||
<view>{{v.materialInfo.materialName}}</view>
|
||||
</view>
|
||||
<view>
|
||||
<text style="white-space: nowrap;"> 规格型号: </text>
|
||||
<view>{{v.materialInfo.specificationModel}}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
<text>{{v.qlNum?v.qlNum:'--'}}</text>
|
||||
<text>退货数量</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>{{v.materialInfo.materialUnits}}</text>
|
||||
<text>退货单位</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="add" >
|
||||
<view v-if="v.isAdd==1">已添加</view>
|
||||
<!-- <image v-if="v.isAdd!=1" :src="'/static/index/procurement/+.png'" mode="aspectFill"></image>
|
||||
<image v-if="v.isAdd==1" :src="'/static/index/procurement/-.png'" mode="aspectFill"></image> -->
|
||||
</view>
|
||||
<view class="zkadd guodu" >
|
||||
<view @click.stop="comfig(v,index,1)" @touchend.stop>
|
||||
添加物料
|
||||
</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>
|
||||
<taking :show="tuihuoshow" :objtake="tuihuoobj" @fill="tuihuoshow = false" @right="right"></taking>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch, reactive } from 'vue';
|
||||
import taking from './takeing.vue'
|
||||
const props = defineProps({
|
||||
InvoicingList: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
status: {
|
||||
type: String
|
||||
}
|
||||
})
|
||||
const caigouobj = ref({})
|
||||
const serverUrl = ref(uni.getStorageSync('serverUrl') + '/sys/common/static/')
|
||||
const emit = defineEmits([ 'scrolltolower' ,'comfig'])
|
||||
|
||||
const pageX = ref(0);
|
||||
const pageY = ref(0);
|
||||
const ones = ref(true)
|
||||
const touchstart = (event : any, v : any,i:number) => {
|
||||
caigouobj.value = v;
|
||||
pageX.value = event.changedTouches[0].pageX;
|
||||
pageY.value = event.changedTouches[0].pageY;
|
||||
if(ones.value){
|
||||
ones.value = false;
|
||||
solleft(v, i)
|
||||
}
|
||||
}
|
||||
const tuihuoshow = ref(false)
|
||||
const tuihuoobj = ref({})
|
||||
const comfig=(v,i,t)=>{
|
||||
tuihuoobj.value = v;
|
||||
tuihuoshow.value = true;
|
||||
|
||||
// emit('comfig',v,i,t)
|
||||
}
|
||||
const right = (e,v) =>{
|
||||
emit('comfig',e,v);
|
||||
tuihuoshow.value = false;
|
||||
}
|
||||
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);
|
||||
ones.value = true;
|
||||
if (absy > 30 && absx+10<absy) {
|
||||
caigouobj.value.scrollleft = 0.01
|
||||
setTimeout(()=>{
|
||||
caigouobj.value.scrollleft = 0
|
||||
},20)
|
||||
return
|
||||
}
|
||||
if (absx < 10 && absy < 10) {
|
||||
if(caigouobj.value.zk==false){
|
||||
setTimeout(()=>{
|
||||
caigouobj.value.scrollleft = 0
|
||||
},20)
|
||||
}
|
||||
return
|
||||
}
|
||||
if(scrollLeft.value <=40){
|
||||
caigouobj.value.scrollleft = scrollLeft.value;
|
||||
caigouobj.value.zk = false;
|
||||
nextTick(()=>{
|
||||
caigouobj.value.scrollleft = 0;
|
||||
scrollLeft.value = 0;
|
||||
})
|
||||
}else{
|
||||
scrollLeft.value = 150
|
||||
caigouobj.value.scrollleft = scrollLeft.value;
|
||||
caigouobj.value.zk = true;
|
||||
}
|
||||
caigouobj.value.zk = x > pageX.value ? false : true;
|
||||
caigouobj.value.scrollleft = caigouobj.value.zk ? 150 : 0;
|
||||
}
|
||||
const solleft = (v : any, i : number) => {
|
||||
console.log(v)
|
||||
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">
|
||||
.zkadd {
|
||||
width: 9vw;
|
||||
height: 100%;
|
||||
display: inline-flex;
|
||||
justify-content: flex-end;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -9vw;
|
||||
view:active{
|
||||
background:rgba(85, 166, 249, 1) !important;
|
||||
color: #FFFFFF !important;
|
||||
}
|
||||
>view {
|
||||
width: 3.6vw;
|
||||
height: 100%;
|
||||
font-weight: 400;
|
||||
font-size: 1.3vw;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
writing-mode: vertical-rl;
|
||||
text-orientation: upright;
|
||||
letter-spacing:2px;
|
||||
background:rgba(85, 166, 249, 1) !important;
|
||||
color: #FFFFFF !important;
|
||||
}
|
||||
}
|
||||
|
||||
.add {
|
||||
width:5vw;
|
||||
height: 13vw;
|
||||
display: inline-flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top:0;
|
||||
right:0.8vw;
|
||||
>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: 0vw;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 3vw;
|
||||
height: 3vw;
|
||||
position: absolute;
|
||||
bottom: 0.8vw;
|
||||
right: 0vw;
|
||||
}
|
||||
}
|
||||
.msitem {
|
||||
width: 11.5vw;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top:0;
|
||||
left: 10vw;
|
||||
>view {
|
||||
margin-top: 0.25vw;
|
||||
|
||||
&:nth-child(3) {
|
||||
width: 100%;
|
||||
height: 3.4vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
>view {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
margin-top:1vw;
|
||||
white-space: nowrap;
|
||||
&:nth-child(1){
|
||||
padding-right: 1.7vw;
|
||||
align-items: flex-start;
|
||||
}
|
||||
&:nth-child(2){
|
||||
padding-left: 1.7vw;
|
||||
align-items: flex-start;
|
||||
}
|
||||
&:nth-child(1)::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 2.2vw;
|
||||
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;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
margin-top: 0.1vw;
|
||||
view{
|
||||
font-size: 1.4vw;
|
||||
color: #888888;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
text {
|
||||
font-weight: 400;
|
||||
font-size: 1.1vw;
|
||||
color: #777777;
|
||||
margin-top: 0.25vw;
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-child(1) {
|
||||
view{
|
||||
display: inline-block;
|
||||
width: 10vw;
|
||||
font-weight: bold;
|
||||
font-size: 1.6vw;
|
||||
color: #222222;
|
||||
height: 3vw;
|
||||
padding-top: 1.3vw;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.zding{
|
||||
width: 4.6vw;
|
||||
height: 4.6vw;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 11;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.speitem {
|
||||
width: 10vw;
|
||||
height: 100%;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
position: absolute;
|
||||
top:0;
|
||||
left: 0;
|
||||
.cardp {
|
||||
width:8vw;
|
||||
height: 4vw;
|
||||
display: flex;
|
||||
margin: 0 auto;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
view {
|
||||
min-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;
|
||||
padding: 0 0.25vw;
|
||||
}
|
||||
}
|
||||
|
||||
>image {
|
||||
width: 8.5vw;
|
||||
height: 7.5vw;
|
||||
margin: 1.7vw auto 0.25vw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.itembox{
|
||||
width: 100%;
|
||||
height: calc(100vh - 22vw);
|
||||
padding:1vw 2vw 0 0;
|
||||
background: #fff;
|
||||
.box{
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
.fler{
|
||||
width: 30.4vw;
|
||||
height: 13vw;
|
||||
margin-bottom: 0.9vw;
|
||||
margin-left: 1.7vw;
|
||||
.carditem{
|
||||
width: 30.4vw;
|
||||
height: 13vw;
|
||||
background: rgba(245, 246, 248, 1);
|
||||
border-radius: 1.1vw;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,330 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="kcyj">
|
||||
<view class="kjlt">
|
||||
退货物料
|
||||
<view class="mhao" v-if="Material.length>0">{{Material.length}}</view>
|
||||
</view>
|
||||
<scroll-view scroll-x="true" class="kcscrol guodu" @scroll="onScroll" :class="Material.length==0?'fff':''"
|
||||
scroll-with-animation :scroll-left="scrollleft" :style="qb?'width:calc(100% - 21.8vw)':'width:calc(100% - 10vw)' ">
|
||||
<view class="yjbox" v-for="(v,i) in Material" :key="i" >
|
||||
<image :src="v.materialInfo.materialImg?serverUrl+v.materialInfo.materialImg:'/static/index/procurement/k.png'"
|
||||
mode="aspectFill"></image>
|
||||
<view>{{v.materialInfo.materialName}}</view>
|
||||
<text class="ytj" v-if="v.thNum>=0">{{v.thNum}}</text>
|
||||
<view class="zhanwei" v-if="moredex==1" @click.stop="del(v)">
|
||||
<view>-</view>
|
||||
</view>
|
||||
</view>
|
||||
<defaultr cont="暂无数据" v-if="Material.length==0&&timeout" style="position: absolute;width: 10vw;height: 10vw;"></defaultr>
|
||||
</scroll-view>
|
||||
<view class="kjlt more guodu" :style="qb?'width:15vw':'' " @touchstart="ts" @touchmove="canmove">
|
||||
<view @click="zksq" class="righ0">
|
||||
{{!qb?'更多':'收起'}}
|
||||
<image class="guodu" :style="qb?'transform: rotate(180deg);':''"
|
||||
src="/static/index/procurement/zjt.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="guodu" :class="qb?(moredex==1?'avt':''):'righ0'" @click="moredex=1; ">
|
||||
批量移除
|
||||
</view>
|
||||
<view class="guodu" :class="qb?(moredex==2?'avt':''):'righ0'" @click="moredex=2; ">
|
||||
清空列表
|
||||
</view>
|
||||
<view class="guodu" :class="qb?(moredex==3?'avt':''):'righ0'" @click="moredex=3;emit('submit')">
|
||||
提交退货单
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<tanchuang @back="moredex = 0" :show="moredex==2" font="确定将本次退货清单中的所有物料都移除吗?" @right="delall"></tanchuang>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch, reactive } from 'vue';
|
||||
import defaultr from '../components/default.vue'
|
||||
import tanchuang from '../components/tanchuang.vue';
|
||||
const props = defineProps({
|
||||
Material:{
|
||||
type:Array,
|
||||
required: true,
|
||||
}
|
||||
});
|
||||
const emit = defineEmits([ 'delall' ,'del','submit'])
|
||||
const serverUrl = ref(uni.getStorageSync('serverUrl') + '/sys/common/static/')
|
||||
const qb = ref(false)
|
||||
const moredex = ref(0)
|
||||
watch(()=>props.Material,
|
||||
()=>{
|
||||
if(props.Material.length==0){
|
||||
qb.value = false;
|
||||
moredex.value=0;
|
||||
}
|
||||
})
|
||||
const delall = ()=>{
|
||||
emit('delall');
|
||||
setTimeout(()=>{
|
||||
moredex.value = 0;
|
||||
qb.value = false;
|
||||
},100)
|
||||
}
|
||||
const del =(v)=>{
|
||||
emit('del',v)
|
||||
}
|
||||
const zksq = () =>{
|
||||
if(props.Material.length==0){
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title:'请添加退货物料!'
|
||||
})
|
||||
return
|
||||
}
|
||||
qb.value=!qb.value;
|
||||
moredex.value=0;
|
||||
moveleft();
|
||||
}
|
||||
const startX = ref(0)
|
||||
const ts = (e) => {
|
||||
startX.value = e.touches[0].clientX
|
||||
}
|
||||
const savescrollleft = ref(0)
|
||||
// 监听用户滚动
|
||||
function onScroll(e : any) {
|
||||
savescrollleft.value = e?.detail?.scrollLeft ?? 0
|
||||
}
|
||||
const scrollleft = ref(0)
|
||||
const canmove = (e : any) => {
|
||||
if(props.Material.length==0){ return }
|
||||
const moveX = e.touches[0].clientX
|
||||
const diff = moveX - startX.value
|
||||
// diff 为负值就是向左滑
|
||||
if (diff < -60 && !qb.value) { // 👉 60px 阈值,随便改
|
||||
qb.value = !qb.value;
|
||||
moredex.value = 0;
|
||||
// 这么写是解决这个组件的响应丢失的bug
|
||||
scrollleft.value = savescrollleft.value + 125.99
|
||||
setTimeout(() => {
|
||||
scrollleft.value = savescrollleft.value + 126
|
||||
}, 50)
|
||||
}
|
||||
if (diff > 60 && qb.value) { // 👉 60px 阈值,随便改
|
||||
qb.value = !qb.value;
|
||||
moredex.value = 0;
|
||||
scrollleft.value = savescrollleft.value - 125.99
|
||||
setTimeout(() => {
|
||||
scrollleft.value = savescrollleft.value - 126
|
||||
}, 50)
|
||||
}
|
||||
}
|
||||
const moveleft = () => {
|
||||
if (qb.value) {
|
||||
scrollleft.value = savescrollleft.value + 125.99
|
||||
setTimeout(() => {
|
||||
scrollleft.value = savescrollleft.value + 126
|
||||
}, 50)
|
||||
} else {
|
||||
scrollleft.value = savescrollleft.value - 125.99
|
||||
setTimeout(() => {
|
||||
scrollleft.value = savescrollleft.value - 126
|
||||
}, 50)
|
||||
}
|
||||
}
|
||||
const timeout = ref(false)
|
||||
onMounted(()=>{
|
||||
setTimeout(()=>{
|
||||
timeout.value = true
|
||||
},500)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.kcyj {
|
||||
width: 100%;
|
||||
height: 10vw;
|
||||
display: flex;
|
||||
margin-top: 1vw;
|
||||
position: relative;
|
||||
padding-left: 1vw;
|
||||
.fff{
|
||||
background: #fff;
|
||||
border-radius: 1.1vw;
|
||||
}
|
||||
.kjlt {
|
||||
width: 3.2vw;
|
||||
height: 10vw;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
border-radius: 1.1vw;
|
||||
writing-mode: vertical-rl;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
letter-spacing: 3px;
|
||||
font-size: 1.4vw;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
background: #FFFFFF;
|
||||
.mhao{
|
||||
width: 1.6vw;
|
||||
min-height: 0vw;
|
||||
border-radius: 0.8vw;
|
||||
border: 1px solid #FF4E4E;
|
||||
font-weight: 400;
|
||||
font-size: 1.1vw;
|
||||
color: #FF4E4E;
|
||||
padding: 0.4vw 0vw;
|
||||
position: absolute;
|
||||
top: -0.8vw;
|
||||
right: -0.4vw;
|
||||
transform: rotate(-90deg);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.more {
|
||||
margin-left: 0.6vw;
|
||||
position: relative;
|
||||
background: RGBA(239, 240, 244, 1);
|
||||
|
||||
.righ0 {
|
||||
right: 0 !important;
|
||||
}
|
||||
|
||||
view {
|
||||
writing-mode: vertical-rl;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
letter-spacing: 3px;
|
||||
width: 3.2vw;
|
||||
height: 10vw;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
border-radius: 1.1vw;
|
||||
font-size: 1.4vw;
|
||||
color: #888888;
|
||||
background: #fff;
|
||||
|
||||
&:nth-child(1) {
|
||||
letter-spacing: 6px;
|
||||
padding-top: 2vw;
|
||||
z-index: 5;
|
||||
|
||||
image {
|
||||
width: 1.6vw;
|
||||
height: 1.6vw;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
right: 3.9vw;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
&:nth-child(3) {
|
||||
right: 7.7vw;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
&:nth-child(4) {
|
||||
right: 11.6vw;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
|
||||
.avt {
|
||||
background: rgba(85, 166, 249, 1);
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
}
|
||||
.kcscrol {
|
||||
width:calc(100% - 10vw);
|
||||
height: 10vw;
|
||||
white-space: nowrap;
|
||||
margin-left: 0.6vw;
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
|
||||
|
||||
.yjbox {
|
||||
display: inline-block;
|
||||
width: 12vw;
|
||||
height: 10vw;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
border-radius: 1.1vw;
|
||||
margin-right: 0.8vw;
|
||||
position: relative;
|
||||
.zhanwei{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 200;
|
||||
view{
|
||||
position: absolute;
|
||||
width: 2.2vw;
|
||||
height: 2.2vw;
|
||||
display: flex;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
border-radius: 50%;
|
||||
border: 2px solid rgba(255, 78, 78, 1);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 3vw;
|
||||
color: rgba(255, 78, 78, 1);
|
||||
}
|
||||
}
|
||||
.ytj {
|
||||
min-width: 1.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;
|
||||
text-align: center;
|
||||
line-height: 1.75vw;
|
||||
position: absolute;
|
||||
padding: 0 0.8vw;
|
||||
top: 0.8vw;
|
||||
right: 0.8vw;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 7vw;
|
||||
height: 7vw;
|
||||
margin: 0.5vw auto 0.5vw;
|
||||
display: block;
|
||||
border-radius: 1vw;
|
||||
}
|
||||
|
||||
>view {
|
||||
width: 100%;
|
||||
height: 1.4vw;
|
||||
font-weight: 400;
|
||||
font-size: 1.3vw;
|
||||
color: #212327;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
padding: 0 1vw;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.guodu {
|
||||
transition: .4s;
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -225,7 +225,8 @@
|
|||
const jssl=()=>{
|
||||
let num = Number(props.caigouobj.upperLimit)-Number(props.caigouobj.kcsl);
|
||||
let m = Math.floor(num/type.value.num)
|
||||
huansuan(m)
|
||||
huansuan(m);
|
||||
cy()
|
||||
}
|
||||
const huansuan=(m:number)=>{
|
||||
relNumber.value = m;
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@
|
|||
</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 style="height:3vw;width: 100%;display: flex;align-items: center;justify-content: center;" v-if="InvoicingList.length>6">
|
||||
<u-loadmore :status="status" :loadText="{nomore:'暂无更多数据'}" />
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="que">
|
||||
<view class="que" :style="style">
|
||||
<image src="/static/index/procurement/que.png" mode="aspectFill"></image>
|
||||
<view>{{cont}}</view>
|
||||
</view>
|
||||
|
|
@ -10,7 +10,8 @@
|
|||
<script>
|
||||
export default {
|
||||
props:{
|
||||
cont:''
|
||||
cont:'',
|
||||
style:{}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@
|
|||
<input type="text" placeholder="物料名称/物料编码/物料简拼" v-model="form.wlParamInfo" @confirm="search" />
|
||||
<image src="/static/index/procurement/x.png" mode="aspectFill" v-if="form.wlParamInfo"
|
||||
@click="search(0)"></image>
|
||||
<!-- <image src="/static/index/procurement/1de8572f85d9785b3758489a70a2e913.png" mode="aspectFill" v-if="form.wlParamInfo"
|
||||
@click="search(0)"></image> -->
|
||||
</view>
|
||||
<view @click="search" class="scr guodu">
|
||||
<image src="/static/index/procurement/sh.png" mode="aspectFill" class="sh"></image>
|
||||
|
|
@ -39,10 +37,12 @@
|
|||
mode="aspectFill"></image>
|
||||
<view>{{v.materialName}}</view>
|
||||
<text class="ytj" v-if="v.isAdd==1">已添加</text>
|
||||
<text class="sl" >{{v.ljkcsl}}</text>
|
||||
</view>
|
||||
<defaultr cont="暂无数据" v-if="Material.length==0&&timeout" style="position: absolute;width: 10vw;height: 10vw;"></defaultr>
|
||||
</scroll-view>
|
||||
<view class="kjlt more guodu" :style="qb?'width:12.15vw':'' " @touchstart="ts" @touchmove="canmove">
|
||||
<view @click="qb=!qb;moredex=0;moveleft()" class="righ0">
|
||||
<view class="kjlt more guodu" :style="qb?'width:12.15vw':'' " @touchstart="ts" @touchmove="canmove" v-if="Material.length>0">
|
||||
<view @click="qb=!qb;moredex=0;moveleft()" class="righ0" >
|
||||
{{!qb?'更多':'收起'}}
|
||||
<image class="guodu" :style="qb?'transform: rotate(180deg);':''"
|
||||
src="/static/index/procurement/zjt.png" mode="aspectFill"></image>
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineComponent, inject } from 'vue';
|
||||
import { queryInvoicingList, queryWlInfoByWlId, addShoppingCartList, queryShoppingCartList } from './api/lunpan.js'
|
||||
import { queryInvoicingList, queryWlInfoByWlId, addShoppingCartList, queryShoppingCartList,queryCgdWaringList } from './api/lunpan.js'
|
||||
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
|
||||
import calculator from './components/calculator.vue'
|
||||
import classification from './components/classification.vue'
|
||||
|
|
@ -131,6 +131,7 @@
|
|||
import detail from './components/details.vue'
|
||||
import inboundoutbound from './components/inboundoutbound.vue'
|
||||
import addall from './components/addall.vue'
|
||||
import defaultr from './components/default.vue'
|
||||
const tx = ref(true)
|
||||
|
||||
const qb = ref(false)
|
||||
|
|
@ -171,8 +172,11 @@
|
|||
isWaring: 1
|
||||
})
|
||||
const classication = ref<InstanceType<typeof ChildComponent>>()
|
||||
|
||||
const timeout = ref(false)
|
||||
onLoad(() => {
|
||||
setTimeout(()=>{
|
||||
timeout.value = true
|
||||
},500)
|
||||
serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/';
|
||||
})
|
||||
onShow(() => {
|
||||
|
|
@ -190,7 +194,8 @@
|
|||
const Material = ref([])
|
||||
|
||||
const getWaringMaterial = () => {
|
||||
queryInvoicingList(warn).then(res => {
|
||||
console.log(warn)
|
||||
queryCgdWaringList(warn).then(res => {
|
||||
console.log(res.result)
|
||||
res.result.records.forEach(item => {
|
||||
item.zk = false;
|
||||
|
|
@ -326,7 +331,6 @@
|
|||
queryInvo();
|
||||
}
|
||||
const queryInvo = () => {
|
||||
console.log(form)
|
||||
queryInvoicingList(form).then(res => {
|
||||
res.result.records.forEach(item => {
|
||||
item.zk = false;
|
||||
|
|
@ -339,7 +343,6 @@
|
|||
}
|
||||
const addcartory = (e : any) => {
|
||||
// e把index覆盖了导致index永远是0
|
||||
console.log(">>>>", caigouobj.value.index)
|
||||
let index = caigouobj.value.index
|
||||
caigouobj.value = e;
|
||||
caigouobj.value.index = index
|
||||
|
|
@ -386,7 +389,6 @@
|
|||
referenceUnitPrice: type.price,
|
||||
dhbl: type.num
|
||||
}
|
||||
console.log(dt)
|
||||
addShoppingCartList([dt]).then(res => {
|
||||
uni.showToast({
|
||||
icon: res.success ? 'success' : 'none',
|
||||
|
|
@ -398,13 +400,14 @@
|
|||
if (res.success) {
|
||||
addflag.value = false;
|
||||
detailsshow.value = false;
|
||||
console.log("?????", caigouobj.value, InvoicingList.value)
|
||||
shoppcar();
|
||||
|
||||
warn.pageNo = 1;
|
||||
Material.value = [];
|
||||
getWaringMaterial();
|
||||
if (caigouobj.value.yj) {
|
||||
Material.value[forthmenuIndex.value].isAdd = 1
|
||||
} else {
|
||||
InvoicingList.value[caigouobj.value.index].isAdd = 1
|
||||
caigouobj.value.isAdd = 1
|
||||
}
|
||||
}
|
||||
}, 700)
|
||||
|
|
@ -765,7 +768,22 @@
|
|||
border-radius: 1.1vw;
|
||||
margin-right: 0.6vw;
|
||||
position: relative;
|
||||
|
||||
.sl {
|
||||
min-width: 1.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;
|
||||
text-align: center;
|
||||
line-height: 1.75vw;
|
||||
position: absolute;
|
||||
padding: 0 1.6vw;
|
||||
top: 0.8vw;
|
||||
left: 0.8vw;
|
||||
}
|
||||
.ytj {
|
||||
width: 4.5vw;
|
||||
height: 1.8vw;
|
||||
|
|
|
|||
|
|
@ -108,7 +108,6 @@
|
|||
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)
|
||||
})
|
||||
}
|
||||
const search = (x : number) => {
|
||||
|
|
@ -143,11 +142,9 @@
|
|||
},1000)
|
||||
}
|
||||
let times = null;
|
||||
const setout = ref(true)
|
||||
const scrolltolower = (t:number) => {
|
||||
if (setout.value==false) { return }
|
||||
if (status.value == 'loading' || status.value == 'nomore') { return }
|
||||
status.value = 'loading'
|
||||
setout.value = false;
|
||||
form.pageNo++;
|
||||
queryInvo()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,472 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="serchs">
|
||||
<view class="leftbtn">
|
||||
<view class="ipt">
|
||||
<input type="text" placeholder="物料名称/物料编码/物料简拼" v-model="form.searchContent" @confirm="search()"/>
|
||||
<image src="/static/index/procurement/x.png" mode="aspectFill" v-if="form.searchContent"
|
||||
@click="search(0)"></image>
|
||||
</view>
|
||||
<view @click="search" class="scr">
|
||||
<image src="/static/index/procurement/sh.png" mode="aspectFill" class="sh"></image>
|
||||
检索
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="rightbtn">
|
||||
<view class="back" @click="uni.navigateBack()">
|
||||
<image src="/static/index/procurement/bk.png" mode="aspectFill"></image>
|
||||
返回
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="t-box">
|
||||
<view class="leftscr">
|
||||
<scroll-view scroll-y="true" class="leftscrol" :scroll-top="cardtop" scroll-with-animation @scrolltolower="plsbuytolower">
|
||||
<view class="card" v-for="(v,i) in tharrlist" :key="i" :class="i==cardindex?'act':''" @click="cardcon(v,i)">
|
||||
<view class="rad" v-if="v.izRead=='N'"></view>
|
||||
<view class="hli">
|
||||
<view class="lig">
|
||||
<image src="/static/index/procurement/gys.png" mode="aspectFill"></image>
|
||||
{{v.nuName}}
|
||||
</view>
|
||||
<view class="rig">
|
||||
<image src="/static/index/procurement/jx.png" mode="aspectFill"></image>
|
||||
<text>{{v.statusText}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cont">
|
||||
<view class="conle">
|
||||
<image :src=" '/static/index/procurement/k.png'"
|
||||
mode="aspectFill"/>
|
||||
<text>退货</text>
|
||||
</view>
|
||||
<view class="ritcon">
|
||||
<view class="rq">
|
||||
退货日期:<text>{{v.fqTime.substring(0, 10)}}</text>
|
||||
</view>
|
||||
<view class="rq">
|
||||
申请人:{{v.fqrName}}
|
||||
</view>
|
||||
<view class="fwjd" v-if="v.status==0">
|
||||
<view class="jx">开始服务</view>
|
||||
<view>服务结束</view>
|
||||
</view>
|
||||
<view class="fwjd" v-if="v.status==1">
|
||||
<view>开始服务</view>
|
||||
<view class="jx">服务中</view>
|
||||
</view>
|
||||
<view class="fwjd" v-if="v.status==2">
|
||||
<view>开始服务</view>
|
||||
<view class="jx">服务结束</view>
|
||||
</view>
|
||||
<view class="fwjd" v-if="v.status==3">
|
||||
<view>开始服务</view>
|
||||
<view >服务结束</view>
|
||||
</view>
|
||||
</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="tharrlist.length>4" />
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="rightscr">
|
||||
<view class="thwl">
|
||||
<thwl :Material="addMaterial" @delall="delall" @del="adddel" @submit="submit"></thwl>
|
||||
<!-- -->
|
||||
</view>
|
||||
<view class="carditem">
|
||||
<thitem :InvoicingList="cardarr" :status="'nomore'" @comfig="comfig"></thitem>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineComponent} from 'vue';
|
||||
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
|
||||
import { thdList , transRead ,thdNuMaterialList,addThc,thcList} from './api/lunpan.js'
|
||||
const serverUrl = ref( uni.getStorageSync('serverUrl') + '/sys/common/static/')
|
||||
import thwl from './common/thwl.vue'
|
||||
import thitem from './common/thitem.vue'
|
||||
|
||||
const form = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchContent: '',
|
||||
})
|
||||
onMounted(()=>{
|
||||
thlist()
|
||||
})
|
||||
const search = (e)=>{
|
||||
if(e==0){form.searchContent = ''}
|
||||
form.pageNo = 1;
|
||||
tharrlist.value = [];
|
||||
thlist()
|
||||
}
|
||||
const status = ref('loadmore')
|
||||
const plsbuytolower = () =>{
|
||||
if(status.value == 'loading' || status.value == 'nomore'){return}
|
||||
status.value = 'loading';
|
||||
form.pageNo++;
|
||||
thlist();
|
||||
}
|
||||
const tharrlist = ref([])
|
||||
const thlist = () =>{
|
||||
thdList(form).then(res=>{
|
||||
console.log(res)
|
||||
tharrlist.value.push(...res.result.records);
|
||||
status.value = res.result.total == tharrlist.value.length ? 'nomore' : 'loadmore';
|
||||
if(form.pageNo == 1){
|
||||
cardcon(tharrlist.value[cardindex.value],cardindex.value);
|
||||
wuliao();
|
||||
}
|
||||
})
|
||||
}
|
||||
const cardindex = ref(0);
|
||||
const cardtop = ref(0);
|
||||
const cardarr = ref([])
|
||||
const cardcon = (v,i) =>{
|
||||
cardindex.value = i;
|
||||
cardtop.value = Math.floor(i-1) * 154;
|
||||
console.log(v)
|
||||
thdNuMaterialList({nuId:v.nuId,id:v.id}).then(res=>{
|
||||
console.log(res.result)
|
||||
cardarr.value = res.result
|
||||
})
|
||||
if(v.izRead == 'N'){
|
||||
transReads(v,i)
|
||||
}
|
||||
}
|
||||
const addMaterial = ref([])
|
||||
const transReads = (v,i) =>{
|
||||
transRead({id:v.id})
|
||||
v.izRead = 'Y'
|
||||
}
|
||||
const comfig =(e,v)=>{
|
||||
let obj = {
|
||||
pkId:tharrlist.value[cardindex.value].id,
|
||||
kfId:v.kfId,
|
||||
wlId:v.materialInfo.id,
|
||||
thNum:e,
|
||||
nuId:tharrlist.value[cardindex.value].nuId,
|
||||
elderId:tharrlist.value[cardindex.value].elderId
|
||||
}
|
||||
addThc(obj).then(res=>{
|
||||
if(res.success&&res.result.status=='success'){
|
||||
uni.showToast({
|
||||
icon:'success',
|
||||
title:'提交成功'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
wuliao();
|
||||
thlist();
|
||||
},800)
|
||||
}else{
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title:res.result.message
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const wuliao = () =>{
|
||||
let obj = {
|
||||
pkId:tharrlist.value[cardindex.value].id
|
||||
}
|
||||
thcList(obj).then(res=>{
|
||||
console.log(res)
|
||||
addMaterial.value = res.result
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.carditem{
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
.thwl{
|
||||
width: 100%;
|
||||
height: 12vw;
|
||||
}
|
||||
.leftscrol{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.act{
|
||||
border: 2px solid #0385FA !important;
|
||||
background: rgba(255, 255, 255, 1) !important;
|
||||
}
|
||||
.card{
|
||||
width: 30vw;
|
||||
height: 13.6vw;
|
||||
background: rgba(255, 255, 255, 0.6);
|
||||
border-radius: 1.6vw;
|
||||
padding:1vw 1.4vw;
|
||||
border: 2px solid rgba(255, 255, 255, 0.6);
|
||||
margin-bottom: 0.8vw;
|
||||
position: relative;
|
||||
.rad{
|
||||
width: 1.2vw;
|
||||
height: 1.2vw;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
background: rgba(255, 87, 87, 1);
|
||||
}
|
||||
.cont{
|
||||
width: 100%;
|
||||
height: 10vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.ritcon{
|
||||
width: 19vw;
|
||||
height: 100%;
|
||||
.fwjd{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
view{
|
||||
width: 8.1vw;
|
||||
height: 3vw;
|
||||
background: #EFF2F8;
|
||||
border-radius: 1.2vw;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 1px solid #EFF2F8;
|
||||
font-weight: 400;
|
||||
font-size: 1.3vw;
|
||||
color: #B6B8BA;
|
||||
}
|
||||
.jx{
|
||||
background: linear-gradient(0deg, #F3FAFF, #E4F3FF, #CBE8FF);
|
||||
color: #249BFA;
|
||||
border: 1px solid #A8D4FF;
|
||||
}
|
||||
}
|
||||
.rq{
|
||||
font-weight: 400;
|
||||
font-size: 1.3vw;
|
||||
color: #888888;
|
||||
margin-bottom: 1vw;
|
||||
text{
|
||||
font-size: 1.8vw;
|
||||
font-weight: bolder;
|
||||
color: rgba(85, 85, 85, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
.conle{
|
||||
width: 10vw;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
image{
|
||||
width: 6.3vw;
|
||||
height: 6.3vw;
|
||||
}
|
||||
view{
|
||||
font-weight: bold;
|
||||
font-size: 1.4vw;
|
||||
color: #555555;
|
||||
margin-top: 1vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
.hli{
|
||||
width: 100%;
|
||||
height: 2vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.rig{
|
||||
width: 3.7vw;
|
||||
height: 1.6vw;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
image{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
text{
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
font-weight: 400;
|
||||
font-size: 1vw;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
.lig{
|
||||
font-weight: 400;
|
||||
font-size: 1.2vw;
|
||||
color: #666666;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
image{
|
||||
width: 1.7vw;
|
||||
height: 1.7vw;
|
||||
margin-right: 0.4vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.t-box{
|
||||
width: 100%;
|
||||
height: calc(100vh - 8vw);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 1vw;
|
||||
.rightscr{
|
||||
width: 65vw;
|
||||
height: 100%;
|
||||
background: #F9F9F9;
|
||||
border-radius: 1.6vw;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.leftscr{
|
||||
width: 30.4vw;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.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: 7.3vw;
|
||||
height: 3.3vw;
|
||||
border: 1px solid #D9DADC;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
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.7vw;
|
||||
color: #555555;
|
||||
border: 1px solid #D9DADC;
|
||||
image {
|
||||
width: 1.5vw;
|
||||
height: 1.3vw;
|
||||
margin: 0 0.5vw 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ipt {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 27vw;
|
||||
background: #E2E4E9;
|
||||
border-radius: 1.65vw;
|
||||
height: 3.3vw;
|
||||
|
||||
image {
|
||||
width: 1.8vw;
|
||||
height: 1.8vw;
|
||||
margin:0 0.5vw;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 25vw;
|
||||
height: 3.3vw;
|
||||
font-size: 1.4vw;
|
||||
padding-left: 1.6vw;
|
||||
|
||||
}
|
||||
}
|
||||
.back{
|
||||
width: 8vw;
|
||||
height: 3.3vw;
|
||||
border-radius: 1.6vw;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
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;
|
||||
border: 1px solid #D9DADC;
|
||||
image {
|
||||
width: 1.5vw !important;
|
||||
height: 1.5vw !important;
|
||||
margin: 0 0.5vw 0 0;
|
||||
}
|
||||
|
||||
}
|
||||
.rightbtn>view:active,.scr:active{
|
||||
color: #1083F8;
|
||||
background: linear-gradient(-45deg, rgba(223, 244, 252, 1), rgba(204, 228, 249, 0.43));
|
||||
border: 1px solid #1083F8;
|
||||
}
|
||||
.scr {
|
||||
border-radius: 1.65vw;
|
||||
font-weight: 400;
|
||||
font-size: 1.4vw;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 7.3vw;
|
||||
height: 3.3vw;
|
||||
margin: 0 0 0 0.7vw;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
border: 1px solid #D9DADC;
|
||||
color: #555555;
|
||||
image {
|
||||
width: 1.5vw;
|
||||
height: 1.3vw;
|
||||
margin: 0 0.5vw 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.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>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 909 B |
Binary file not shown.
|
After Width: | Height: | Size: 643 B |
|
|
@ -574,7 +574,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
)
|
||||
]);
|
||||
}
|
||||
const camera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/hldy_app_mini/pages/camera.nvue"]]);
|
||||
const camera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/项目/hldy_app_mini/pages/camera.nvue"]]);
|
||||
export {
|
||||
camera as default
|
||||
};
|
||||
|
|
|
|||
|
|
@ -577,7 +577,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
)
|
||||
]);
|
||||
}
|
||||
const fullcamera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/hldy_app_mini/pages/fullcamera.nvue"]]);
|
||||
const fullcamera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/项目/hldy_app_mini/pages/fullcamera.nvue"]]);
|
||||
export {
|
||||
fullcamera as default
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue