2
main.js
|
|
@ -19,6 +19,7 @@ import {
|
|||
createSSRApp
|
||||
} from 'vue'
|
||||
import donghua from '@/component/public/donghua.vue'
|
||||
import tanchuang from '@/pages/procurement/components/tanchuang.vue';
|
||||
// import arrowkeys from '@/component/public/newgame/arrowkeys.vue'
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
|
|
@ -26,6 +27,7 @@ export function createApp() {
|
|||
// 使用 uView UI
|
||||
app.use(uView)
|
||||
app.component('donghua', donghua)
|
||||
app.component('tanchuang', tanchuang)
|
||||
// app.component('arrowkeys', arrowkeys)
|
||||
return {
|
||||
app
|
||||
|
|
|
|||
|
|
@ -76,4 +76,26 @@ export const queryMaterialInfo = (params) => {
|
|||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
export const transRead = (params) => {
|
||||
return request({
|
||||
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/qld/transRead`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
// 作废
|
||||
export const cancellation = (params) => {
|
||||
return request({
|
||||
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/qld/cancellation`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
// 作废
|
||||
export const confirmReceipt = (params) => {
|
||||
return request({
|
||||
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/qld/confirmReceipt`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<template>
|
||||
<view class="que" v-if="show">
|
||||
<image src="/static/index/procurement/que.png" mode="aspectFill"></image>
|
||||
<view>{{cont}}</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
cont: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.que {
|
||||
position: fixed;
|
||||
top: 9%;
|
||||
left: 12%;
|
||||
width: 76%;
|
||||
height: 88%;
|
||||
z-index: 100;
|
||||
background-color: #eff0f4;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
|
||||
image {
|
||||
width: 16.3vw;
|
||||
height: 16.3vw;
|
||||
}
|
||||
|
||||
view {
|
||||
text-align: center;
|
||||
font-weight: 300;
|
||||
font-size: 1.4vw;
|
||||
color: #555555;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="buttons-father">
|
||||
<view class="buttons-father" :style="transition?{opacity: `1`}:{opacity: `0`}" v-show="isShow">
|
||||
<view class="ipt">
|
||||
<input type="text" v-model="plzinfo.searchContent" placeholder="请领单号" @confirm="clickconfirm" />
|
||||
</view>
|
||||
|
|
@ -12,8 +12,25 @@
|
|||
重置
|
||||
</view>
|
||||
</view>
|
||||
<view class="right-button" @click="badshow=true" v-show="plsbuy[lefttarget]?.status==`1`">
|
||||
<image src="/static/index/warehouse/procurement/picking/bebad.png" />
|
||||
<view>
|
||||
作废
|
||||
</view>
|
||||
</view>
|
||||
<view class="right-button" @click="shouhuoshow=true" v-show="plsbuy[lefttarget]?.status==`4`">
|
||||
<image src="/static/index/warehouse/procurement/picking/shouhuo.png" />
|
||||
<view>
|
||||
收货
|
||||
</view>
|
||||
</view>
|
||||
<nomessage cont="暂无数据" :show="nomessageshow" />
|
||||
|
||||
</view>
|
||||
<view class="other-contain">
|
||||
<tanchuang :show="badshow" font="确定要作废这个请领单吗" @back="badshow=false;" @right="zuofei"> </tanchuang>
|
||||
<tanchuang :show="shouhuoshow" font="这个请领单确定要收货吗" @back="shouhuoshow=false;" @right="shouhuo"> </tanchuang>
|
||||
|
||||
<view class="other-contain" :style="transition?{opacity: `1`}:{opacity: `0`}" v-show="isShow && !nomessageshow">
|
||||
<view class="other-contain-left">
|
||||
<view class="left-selecttype">
|
||||
<view :class="selectType===index?`selecttype-target`: `selecttype`" v-for="(item,index) in tagsarray"
|
||||
|
|
@ -24,7 +41,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" scroll-with-animation class="left-menu-scroll" :scroll-top="leftscrolltop"
|
||||
@scrolltolower="plsbuytolower" :lower-threshold="400">
|
||||
@scrolltolower="plsbuytolower" :lower-threshold="200">
|
||||
<view style="height: 1%;"></view>
|
||||
<view class="pls-card" v-for="(v,i) in plsbuy" :key='i' @click="clickLeftMenu(i,v)" :style="{
|
||||
borderColor: i === lefttarget ? '' : 'transparent',
|
||||
|
|
@ -32,7 +49,7 @@
|
|||
}">
|
||||
<view
|
||||
style="background: #ff5757;position: absolute;width: 1.3vw;height: 1.3vw;border-radius: 50%;right: -0.5vw;top: -0.2vw;"
|
||||
v-if="v.izNew=='Y'">
|
||||
v-if="v.izYgRead=='N'">
|
||||
</view>
|
||||
<view class="pls-card-title">
|
||||
<view class="middle-title-spec">
|
||||
|
|
@ -189,7 +206,9 @@
|
|||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<defaultr cont="暂无数据" v-if="rightarray.length==0 && rightdonghua"
|
||||
style="width: 30%;height: 30%;position: absolute;">
|
||||
</defaultr>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -198,12 +217,35 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch, reactive } from 'vue';
|
||||
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
|
||||
import { queryQld, queryQldWlInfo } from '../api/api.js'
|
||||
|
||||
import { queryQld, queryQldWlInfo, transRead, cancellation,confirmReceipt } from '../api/api.js'
|
||||
import nomessage from '../common/nomessage.vue'
|
||||
import defaultr from '../common/default.vue'
|
||||
const props = defineProps({
|
||||
isShow: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
const tagsarray = ref(["全部", "待出库", "已出库", "已收货 ", "已作废"])
|
||||
// const nottrue = Array(10).fill(null)
|
||||
// 使用watch监听isShow变化
|
||||
const transition = ref(false);
|
||||
watch(
|
||||
() => props.isShow,
|
||||
(newVal, oldVal) => {
|
||||
// 当旧值为false,新值为true时延迟0.2秒调用方法
|
||||
if (!oldVal && newVal) {
|
||||
transition.value = false;
|
||||
// console.log("????",transition.value)
|
||||
setTimeout(() => {
|
||||
transition.value = true;
|
||||
}, 50)
|
||||
} else {
|
||||
transition.value = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
)
|
||||
onMounted(() => {
|
||||
|
||||
})
|
||||
|
|
@ -211,10 +253,18 @@
|
|||
|
||||
const selectType = ref(0)
|
||||
const changetype = (index : number) => {
|
||||
if ((selectType.value == index) && index) {
|
||||
return
|
||||
}
|
||||
leftscrolltop.value = 1
|
||||
setTimeout(() => {
|
||||
leftscrolltop.value = 0
|
||||
}, 50)
|
||||
lefttarget.value = 0
|
||||
selectType.value = index
|
||||
plzinfo.pageNo = 1;
|
||||
plzinfo.canpull = true;
|
||||
lefttarget.value = 0
|
||||
|
||||
switch (index) {
|
||||
case 0:
|
||||
plzinfo.status = `1,2,4,5`
|
||||
|
|
@ -239,7 +289,12 @@
|
|||
chongzhiLock = true
|
||||
plzinfo.pageNo = 1;
|
||||
plzinfo.canpull = true;
|
||||
lefttarget.value = 0
|
||||
firstgetqueryCgdList()
|
||||
leftscrolltop.value = 1
|
||||
setTimeout(() => {
|
||||
leftscrolltop.value = 0
|
||||
}, 10)
|
||||
setTimeout(() => chongzhiLock = false, 500)
|
||||
}
|
||||
let chongzhiLock = false
|
||||
|
|
@ -259,7 +314,7 @@
|
|||
const lefttarget = ref(0)
|
||||
const plzinfo = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 5,
|
||||
canpull: true,
|
||||
searchContent: "",
|
||||
status: "1,2,4,5",
|
||||
|
|
@ -271,23 +326,31 @@
|
|||
const leftscrolltop = ref(0)
|
||||
|
||||
const rightarray = ref([]);
|
||||
// 检测锁
|
||||
const cannomessage = ref(true)
|
||||
const rightdonghua = ref(true);
|
||||
const firstgetqueryCgdList = () => {
|
||||
rightarray.value = []
|
||||
plsbuy.value = []
|
||||
queryQld(plzinfo).then((res : any) => {
|
||||
console.log("加载", plzinfo, res.result.records)
|
||||
plsbuy.value.push(...res.result.records)
|
||||
alltotal.value = res.result.total
|
||||
if (!res.result.total) {
|
||||
// console.log("没数据了!!!")
|
||||
transition.value = true;
|
||||
if (((res.message === "缺少参数") || (!res.result?.total)) && cannomessage.value) {
|
||||
nomessageshow.value = true;
|
||||
return
|
||||
}
|
||||
cannomessage.value = false
|
||||
plsbuy.value = []
|
||||
plsbuy.value.push(...res.result.records)
|
||||
// console.log("入参", plzinfo)
|
||||
// console.log("查看数组", res.result.records)
|
||||
alltotal.value = res.result.total
|
||||
|
||||
// console.log("请购单数据呢???", res)
|
||||
if (res.result.records.length) {
|
||||
// queryInvo(0);
|
||||
rightdonghua.value = false;
|
||||
|
||||
queryQldWlInfo({ qldNo: res.result.records[0].qldNo }).then((element : any) => {
|
||||
console.log("aaaaa", element.result)
|
||||
rightarray.value = []
|
||||
rightarray.value.push(...element.result)
|
||||
rightdonghua.value = true;
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -312,6 +375,7 @@
|
|||
const getqueryCgdList = () => {
|
||||
if (!plzinfo.canpull) return
|
||||
queryQld(plzinfo).then((res : any) => {
|
||||
console.log("???加载", res.result.records)
|
||||
plsbuy.value.push(...res.result.records)
|
||||
alltotal.value = res.result.total
|
||||
if (res.result.records.length < plzinfo.pageSize) {
|
||||
|
|
@ -321,12 +385,14 @@
|
|||
}
|
||||
const clickLeftMenu = (index : any, item : any) => {
|
||||
let num = Math.ceil((index + 1))
|
||||
leftscrolltop.value = (num - 2) * 178.5;
|
||||
leftscrolltop.value = (num - 2) * 175.4;
|
||||
lefttarget.value = index;
|
||||
rightarray.value = [];
|
||||
|
||||
rightdonghua.value = false;
|
||||
queryQldWlInfo({ qldNo: plsbuy.value[index].qldNo }).then((element : any) => {
|
||||
console.log("aaaaa", element.result)
|
||||
rightarray.value = [];
|
||||
rightarray.value.push(...element.result)
|
||||
rightdonghua.value = true;
|
||||
})
|
||||
// form.cgdId = plsbuy.value[index].id
|
||||
// form.pageNo = 1
|
||||
|
|
@ -340,10 +406,17 @@
|
|||
// clickmiddle(0);
|
||||
// }
|
||||
// })
|
||||
// if (item.izNew == 'Y') {
|
||||
// item.izNew = 'N'
|
||||
// editIzNew({ id: item.id })
|
||||
// }
|
||||
if (item.izYgRead == 'N') {
|
||||
let param = {
|
||||
status: `yg`,
|
||||
qldNo: plsbuy.value[index].qldNo,
|
||||
}
|
||||
transRead(param).then((res : any) => {
|
||||
if (res.success) {
|
||||
item.izYgRead = 'Y'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
const serverUrl = ref("")
|
||||
|
|
@ -353,10 +426,68 @@
|
|||
serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/';
|
||||
// getSelectList();
|
||||
})
|
||||
// const emit = defineEmits(['changePageNumber']) // 也可以用类型签名(见下面)
|
||||
// const changePage = () => {
|
||||
// emit('changePageNumber', 0)
|
||||
// }
|
||||
const badshow = ref(false)
|
||||
const zuofei = () => {
|
||||
|
||||
cancellation({ qldNo: plsbuy.value[lefttarget.value].qldNo }).then((res : any) => {
|
||||
// console.log('作废', res)
|
||||
badshow.value = false
|
||||
if(res.success){
|
||||
|
||||
}else{
|
||||
plzinfo.pageNo = 1;
|
||||
plzinfo.canpull = true;
|
||||
leftscrolltop.value = 1
|
||||
setTimeout(() => {
|
||||
leftscrolltop.value = 0
|
||||
}, 50)
|
||||
lefttarget.value = 0
|
||||
firstgetqueryCgdList();
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none', // 'none' 表示不带图标
|
||||
duration: 3000
|
||||
})
|
||||
}, 300)
|
||||
|
||||
})
|
||||
}
|
||||
const shouhuoshow = ref(false)
|
||||
const shouhuo = () => {
|
||||
let param = {
|
||||
qldNo: plsbuy.value[lefttarget.value].qldNo,
|
||||
elderId: uni.getStorageSync('NUall').elderId,
|
||||
nuId: uni.getStorageSync('nuId')
|
||||
}
|
||||
confirmReceipt(param).then((res : any) => {
|
||||
console.log('收货', res)
|
||||
shouhuoshow.value = false
|
||||
if(res.success){
|
||||
|
||||
}else{
|
||||
plzinfo.pageNo = 1;
|
||||
leftscrolltop.value = 1
|
||||
setTimeout(() => {
|
||||
leftscrolltop.value = 0
|
||||
}, 50)
|
||||
lefttarget.value = 0
|
||||
plzinfo.canpull = true;
|
||||
firstgetqueryCgdList();
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none', // 'none' 表示不带图标
|
||||
duration: 3000
|
||||
})
|
||||
}, 300)
|
||||
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
|
@ -378,8 +509,9 @@
|
|||
.buttons-father {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
// background-color: red;
|
||||
transition: opacity 1s ease;
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
.ipt {
|
||||
display: flex;
|
||||
|
|
@ -411,43 +543,62 @@
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 6.5vw;
|
||||
height: 3.3vw;
|
||||
margin: 0 0 0 0.7vw;
|
||||
background: rgba(255, 255, 255, 0.6);
|
||||
background-color: #fff;
|
||||
border: 1px solid #D9DADC;
|
||||
color: #555555;
|
||||
box-shadow: 0.5rpx 3rpx 3rpx #dadee1;
|
||||
width: 6.5vw;
|
||||
height: 3.3vw;
|
||||
}
|
||||
|
||||
.shx {
|
||||
width: 6.5vw;
|
||||
height: 3.3vw;
|
||||
background: rgba(255, 255, 255, 0.6);
|
||||
background-color: #fff;
|
||||
border-radius: 1.65vw;
|
||||
border: 1rpx solid #D9DADC;
|
||||
border: 1px solid #D9DADC;
|
||||
font-weight: 400;
|
||||
font-size: 1.2vw;
|
||||
color: #222;
|
||||
font-size: 1.4vw;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-shadow: 0.5rpx 3rpx 3rpx #dadee1;
|
||||
margin: 0 0 0 0.5vw;
|
||||
color: #555555;
|
||||
|
||||
image {
|
||||
width: 1.8vw;
|
||||
height: 1.8vw;
|
||||
width: 1.5vw;
|
||||
height: 1.5vw;
|
||||
margin: 0 0.2vw 0 0;
|
||||
}
|
||||
|
||||
.shx-font {
|
||||
margin-top: 3rpx;
|
||||
// margin-left: -5rpx;
|
||||
|
||||
}
|
||||
|
||||
.right-button {
|
||||
position: absolute;
|
||||
right: 1.8vw;
|
||||
top: 0;
|
||||
width: 6.5vw;
|
||||
height: 3.3vw;
|
||||
background-color: #fff;
|
||||
border-radius: 1.65vw;
|
||||
border: 1px solid #D9DADC;
|
||||
font-weight: 400;
|
||||
font-size: 1.4vw;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
// margin: 0 0 0 0.5vw;
|
||||
color: #555555;
|
||||
|
||||
image {
|
||||
width: 1.5vw;
|
||||
height: 1.5vw;
|
||||
margin: 0.1vw 0.2vw 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.right-button:active,
|
||||
.scr:active,
|
||||
.shx:active {
|
||||
color: #1083F8;
|
||||
|
|
@ -463,6 +614,7 @@
|
|||
width: 100%;
|
||||
height: 1050rpx;
|
||||
display: flex;
|
||||
transition: opacity 1s ease;
|
||||
|
||||
.other-contain-left {
|
||||
width: 35%;
|
||||
|
|
@ -731,12 +883,15 @@
|
|||
height: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
position: relative;
|
||||
|
||||
|
||||
.right-ones {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex-wrap: wrap;
|
||||
|
||||
|
||||
.right-one {
|
||||
width: 570rpx;
|
||||
height: 261rpx;
|
||||
|
|
|
|||
|
|
@ -14,8 +14,9 @@
|
|||
<view v-if="hometype>0" @click="hometype=0">返回</view>
|
||||
</view>
|
||||
</view>
|
||||
<takehomep v-if="hometype==0" @changePageNumber="changehometype" ></takehomep>
|
||||
<requestformView v-if="hometype==1" />
|
||||
<takehomep v-if="!hometype" @changePageNumber="changehometype" ></takehomep>
|
||||
<!-- v-if是实际隐藏,isshow是控制动画 -->
|
||||
<requestformView :isShow="hometype==1" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -141,12 +141,12 @@
|
|||
{
|
||||
url: genPaths(
|
||||
'/static/index/newindex/curve',
|
||||
'lead_',
|
||||
12, // 张数
|
||||
'logistics',
|
||||
8, // 张数
|
||||
'png',
|
||||
1, // 起始索引为 1
|
||||
0, // 起始索引为 1
|
||||
false // 不补零
|
||||
), name: '请领'
|
||||
), name: '后勤'
|
||||
},
|
||||
{
|
||||
url: genPaths(
|
||||
|
|
@ -159,7 +159,14 @@
|
|||
), name: '设备'
|
||||
},
|
||||
{
|
||||
url: [`/static/back.png`], name: '返回'
|
||||
url: genPaths(
|
||||
'/static/index/newindex/curve',
|
||||
'return_',
|
||||
1, // 张数
|
||||
'png',
|
||||
1, // 起始索引为 1
|
||||
false // 不补零
|
||||
), name: '返回'
|
||||
},
|
||||
// {
|
||||
// url: genPaths(
|
||||
|
|
|
|||
|
|
@ -1585,13 +1585,10 @@
|
|||
});
|
||||
}
|
||||
const badshow = ref(false);
|
||||
const donghuacs = ref(false)
|
||||
const bebad = () => {
|
||||
if (!Number(plsbuy.value[lefttarget.value]?.status) && plsbuy.value.length) {
|
||||
badshow.value = true;
|
||||
moreindex.value = -1;
|
||||
donghuacs.value = false;
|
||||
setTimeout(() => donghuacs.value = true, 50)
|
||||
}
|
||||
}
|
||||
const zuofei = () => {
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 941 B |